#arma3_scripting

1 messages ยท Page 99 of 1

cosmic lichen
#

But if variables are undefined that should be avilable if a player connects then something is borked anyway

granite sky
#

Those are local variables so you'll need to tunnel a few levels down from there.

half tartan
#

gotcha

#

becti is delicious, spicy, incredibly complicated spaghetti all the way down

queen cargo
#

ye ... ty ...

#

not like thats what i already know

#

the question is how to get the most recently added backpack

fallen locust
#

you dont

#

thats why said things above

#

:P

#

Have Fun :)

queen cargo
#

you are not rly helpfull

#

anyway

#
_this addBackpackCargoGlobal [_backpackType, 1];
_backPack = (everyBackpack _this) select (count _backPacks);```
#

either that works or he can do it himself ...

fallen locust
#

it wont

#

well depends on a backpack classname or object name

#

smt like that

queen cargo
#

ye ...

#

anyway

#

have to play fallout

#

so that thats not working is no option

#

say it to arma

#

when you start it next time @fallen locust

tough abyss
#

Any solutions how to fix flag not changing texture even tho right command?

fallen locust
#

what?

granite sky
#

IIRC that's a known init timing issue.

#

Not sure on the best solution but you could probably just spawn & delay.

tough abyss
#

So just hit play then go back to editor?

granite sky
#

Does the command work if you run it from the debug console with cursorObject or whatever?

tough abyss
#

Never tried but I will do it

queen cargo
#

that thats not working is no option

granite sky
#

I'm not sure that those flags are changeable.

winter rose
#

also:

  • where is the texture located
  • does the flag pole have a "texture" field where you could set the value
granite sky
#

yeah I took too much notice of "even tho right command"

#

There's a whole lot wrong with this :P

tough abyss
#

Really?

#

I didn't knew it

granite sky
#

pretty sure that texture needs a lot more path.

fallen locust
#

thats how it is

#

its a fact

granite sky
#

An example flag texture path that we use:
"rhsafrf\addons\rhs_main\data\flag_rus_co.paa"

fallen locust
#

and to make it work with some trickery it requires more code then just a few lines

queen cargo
#

pah!

#

no time

#

fallout waits

#

and it whispers to me "dude! come back! there are still raiders to kill"

half tartan
#

_teams = _logic getVariable "cti_teams"; this indicates that the variable in question is stored somewhere else and the server needs to go get it, right?

#

...which also means:

_logic = (_side) call CTI_CO_FNC_GetSideLogic;
_teams = _logic getVariable "cti_teams";
if(!(isNull _team)) then {
    if !(_team in _teams) then {
        [_team, _side] call CTI_SE_FNC_InitializeGroup;
        
        //--- The leader may had a disabled slot
        if (CTI_Log_Level >= CTI_Log_Information) then {["INFORMATION", "FILE: Server\Functions\Server_OnPlayerConnected.sqf", format["Player [%1] [%2] does not belong to any CTI Groups on [%3]. Performed late-initialization and updated the Global Teams", _name, _uid, _side]] call CTI_CO_FNC_Log};
        
        //--- Update the global teams
        _logic setVariable ["cti_teams", _teams - [objNull] + [_team], true];
    };
};```

the above code is what the server cries about in the log when it fails the init; from my understanding, it hinges on the first "call" to get the tools needed to figure out wtf a "_teams" is.

according to https://community.bistudio.com/wiki/Scheduler a call is a scheduled script, so if the server is under heavy load, it can panic and not go through completely. not usually a problem, except in the case of server init when players are actively trying to join and start the mission; thus causing "_teams" to be misconstrued as an unassigned variable
#

does my assessment seem like i'm on the right track to y'all?

#

because i feel pretty confident in it but i'm also very, very new to this

sullen sigil
#

spawn is scheduled, call is not

#

if "cti_teams" doesnt have a value at the time you are trying to get the variable then _teams will be nil

#

you need a default value with the alt syntax (though i am under the impression you need the variable to be defined in the first place)

half tartan
#

...gotcha, thank you

sullen sigil
#

ofc if script spawns within it then all code in the spawn is scheduled

#

but thats generally construed as bad practice from what i have seen and spawn fnc should be used instead

half tartan
#

i feel it's worth mentioning that this code will be 10 years old in a month

sullen sigil
#

it is probably worth rewriting at that point

half tartan
#

the mission is approaching 28Mb in size and i've never scripted anything before so i am very afraid.

#

im very appreciative of the help, though

sullen sigil
half tartan
#

....gotcha

thick sage
#

Hey everyone. I would like to share with you sqf-analyzer, a VS code extension to develop missions or addons in sqf. You can find it on VS code extensions tab or at https://marketplace.visualstudio.com/items?itemName=SQF-analyzer.sqf-analyzer

It supports

  • type identification and annotation
  • go to definition (both local variables, cross-file global variables and functions defined in config/description)
  • function arguments identification and annotation
  • all kinds of error identification (function calls with incorrect types, both builtin and defined in config.cpp/description.ext, wrong number of arguments, etc.)
  • complete preprocessor support (e.g. it can parse the config.cpp of ACE, CBA and antistasi)
  • semantic tokens (e.g. keywords vs functions vs variables vs comments)
  • windows, mac and linux

It still does not support:

  • external addons (e.g. if your mission depends on addon A, it cannot identify errors in using functions from addon A)
  • CBA-based functions during initialization (i.e. it can't tell that such function is defined in the namespace and thus analyze code accordingly)
  • much more ^^

I am looking for feedback to make it more robust to the different mission and addon variations, as well as bugs, improvements, etc (here or github issues)

Hope it reduces the mental workload in creating the amazing content that this community creates

(image of it being used with Antistasi, bonus if you can identify why the analyzer is complaining)

winter rose
grizzled cliff
#

a lot of stuff not comitted yet, and it's not functional (in game) yet.

storm crystal
#

how do you make a titleText appears to everyone in a script ?

split oxide
#
[["line1\nline2\nline3", "PLAIN"]] remoteExec ["titleText"];```
storm crystal
#

does it work if I do?

["", "BLACK FADED", 999] remoteExec ["cutText"];
split oxide
#

you need the second set of straight braces, [ ], around the first argument, see the third part of Example 1 on remoteExec, so

[["", "BLACK FADED", 999]] remoteExec ["cutText"];```
would work
faint oasis
#

Hi, i have a question ? Is it possible to toggle the detail mode on a control map ? Because when you are in the map, you have a button to toggle the detail mode or the satellite mode but in an RscMap in a gui, you only have the satellite map not the detail one.

leaden ibex
#

This is not entirely the correct place for this question, but still the best I would say.
We have an event against a community that uses A3Sync, so us, workshop users, need to add their mods that aren't on workshop manually to Arma 3 launcher.
I've written a simple program that downloads the mods, generates the Arma 3 launcher preset HTML, but I need to import the local mods to the launcher, otherwise they won't be recognised.

Is there a way to point to the folder of the mod in the HTML, or can I run the launcher with some cmd params to import the mods? Or do I have to trust that my players aren't full stupid? monkaHmm

(I would love to tell them all to just use A3Sync and what to do, but HAha I would assist at least 40 people with broken workshop folders, even if I tell them DON'T)

little raptor
#

you can run the whole game with command line params, instead of using the launcher

leaden ibex
#

Yeah, but different people have different parameters, like memallocs etc

south swan
#

or if the launcher is strictly needed - you can generate the entire -mod=... string and say people to paste it into Command Line parameter of the launcher ๐Ÿ™ƒ

little raptor
#

well just tell them to add the local folder to Watch folders meowsweats

leaden ibex
#

Yeah, all of those are options. But people... Are people painsChamp

sullen sigil
#

Currently trying to attach an object to the player at their holster position, cannot make it work as for some reason returned offset is incredibly small
Currently using the following to do so, don't understand why it doesn't work:
https://sqfbin.com/momafivuvaliquvohike

#

(yes i am trying to make a dummy item in the holster)

little raptor
#

because you have to attach it to leg bone I guess

#

the holster must follow some leg bone, I guess right leg?

#

so the proxy offset has to be relative to that leg too

sullen sigil
#

tried putting _pistol in the bone btw and no dice there either

little raptor
#

because it doesn't exist

sullen sigil
#

it's a proxy tho? meowsweats

#

oh as in

#

doesnt exist in world

#

which is why im doing this convoluted workaround

little raptor
#

doesn't exist in model

sullen sigil
#

ofc

#

eh?

little raptor
#

I mean player model

sullen sigil
#

ah

little raptor
#

it's in vest model

sullen sigil
#

ya

#

well that's progress

little raptor
#

well your whole code seems wrong tho think_turtle

sullen sigil
#

suppose I need to... somehow find the distance between the holster and leg bone?

little raptor
#

oh private _pistol = selectionNames player select {"holster" in _x};

#

nvm didn't see that

sullen sigil
little raptor
#

but it shouldn't exist in the vest model

sullen sigil
#

im confused

#

leg bone exists but doesnt exist in vest model, yes?

little raptor
#

no the holster thing. I thought you were using the proxy from what I said a couple of days ago

sullen sigil
#

im still confused

little raptor
#

me too ๐Ÿ˜…

kindred zephyr
#

whoops, misread that

#

xD

sullen sigil
#

is it clear what im trying to do

little raptor
#

it is, but idk why you're using a selection from player model in vest model

#

does it even exist?

sullen sigil
#

im not, im using selection from vest model

#

because you cannot get selectionposition of holster from player

little raptor
#

selectionNames player select {"holster" in _x};

#

selection is from player model

sullen sigil
#

oh
player selectionPosition [_pistol, 1] works

#

i do be bruggin

little raptor
#

you're using it in the vest model

sullen sigil
#

it does

#

it returns something

little raptor
#

well what is the selection name anyway?

sullen sigil
sullen sigil
little raptor
#

then I don't understand the point of the dummy shenanigans

sullen sigil
#

im not using dummy any more

#

i was using it as a "workaround" when i didnt need to for holstered proxy

little raptor
#

well still you can't just attach it like that to the leg
like I said you should get the rel pos and orientation

sullen sigil
#
{
    detach _x;
    deleteVehicle _x;
} forEach attachedObjects player;
private _pistol = selectionNames player select {"holster" in _x};
_pistol = _pistol#0;
private _proxyOffset = player selectionPosition [_pistol, 1];
private _proxyVectorDirAndUp = player selectionVectorDirAndUp [_pistol, 1];
_proxyOffset = _proxyOffset vectorDiff (player selectionPosition "rightupleg");

private _sphere = createSimpleObject ["Sign_Arrow_Blue_F", [0, 0, 0]];
_sphere attachTo [player, _proxyOffset, "rightupleg", true];
_sphere setVectorDirAndUp _proxyVectorDirAndUp;
_sphere setObjectScale 0.5;```
results in
#

vectordirandup looks incorrect tho

little raptor
#

did you translate them to world?

sullen sigil
#

its attached tho meowsweats

little raptor
#

or is it the attached obj?

#

ok

little raptor
#

everything must be relative

sullen sigil
#

i do that with selectionvectordirandup tho

little raptor
#

no

#

that's relative to player model

#

it must be relative to leg bone

sullen sigil
#

oh

#

how wonderful

#

i assume its not as simple as vectordiff of the vectordirandups

little raptor
#

ofc not

#

you need matrices

sullen sigil
#

my absolute favourite (i hate matrices)

little raptor
#
_bvx = _bvy vectorCrossProduct _bvz;
_svx = _svy vectorCrossProduct _svz;
_mat = [_bvx, _bvy, _bvz];
_relMat = matrixTranspose(_mat matrixMultiply matrixTranspose[_svx, _svy, _svz]);
_relPos = flatten (_mat matrixMultiply (_proxyOffset apply {[_x]}));

_relVUP = [_relMat#1, _relMat#2];
#

something like that I guess

#

bvn are bone's

#

svn are pistol selection vectors

sullen sigil
#

vy being vdir and vz being vup?

little raptor
#

yes

sullen sigil
#

thank you i love you no homo

#

Returns that, think that looks about right?

#

Given if I was to orientate a gwh to that it'd have the pistol about right

#

Thanks leopard ๐Ÿ˜„

little raptor
sullen sigil
little raptor
#

did you also use the relPos I gave?

sullen sigil
#

oh i didnt notice that

#

thats with relpos

#

(its possible i have the wrong bone)

little raptor
#

what if you do _relPos = flatten (matrixtranspose _mat matrixMultiply (_proxyOffset apply {[_x]}));

sullen sigil
little raptor
#

what is the code rn?

sullen sigil
#
{
    detach _x;
    deleteVehicle _x;
} forEach attachedObjects player;
private _pistol = selectionNames player select {"holster" in _x};
_pistol = _pistol#0;
private _proxyOffset = player selectionPosition [_pistol, 1];
private _proxyVectorDirAndUp = player selectionVectorDirAndUp [_pistol, 1];
private _boneVectorDirAndUp = player selectionVectorDirAndUp ["rightupleg","HitPoints"];

_proxyVectorDirAndUp params ["_svy", "_svz"];
_boneVectorDirAndUp params ["_bvy", "_bvz"];
_bvx = _bvy vectorCrossProduct _bvz;
_svx = _svy vectorCrossProduct _svz;
_mat = [_bvx, _bvy, _bvz];
_relMat = matrixTranspose(_mat matrixMultiply matrixTranspose[_svx, _svy, _svz]);
_relPos = flatten (matrixtranspose _mat matrixMultiply (_proxyOffset apply {[_x]}));

_relVUP = [_relMat#1, _relMat#2];

private _sphere = createSimpleObject ["\A3\weapons_F\Pistols\P07\p07_F.p3d",[0,0,0]];
_sphere attachTo [player, _relPos, "rightupleg", true];
_sphere setVectorDirAndUp _relVUP;
_sphere setObjectScale 1;```
little raptor
#

your proxy offset is missing the vector diff...

#
private _proxyVectorDirAndUp = player selectionVectorDirAndUp [_pistol, 1];
_proxyOffset = _proxyOffset vectorDiff (player selectionPosition "rightupleg");
#

from what you had earlier

sullen sigil
little raptor
#

that part was should still be there

sullen sigil
#

yeah im just tidying up and accidentally deleted it

south swan
#

And then you get the vest with different proxy placement (and weighted by multiple bones)

sullen sigil
#

this is mostly just so i can have pistols in my two secondaries appear in the holster

little raptor
#

yeah you shouldn't really use attachTo

sullen sigil
#

i intend on having cba setting for boneinfo

#

is there anything i should be using instead?

little raptor
sullen sigil
#

wouldnt even be the worst thing ive done with eachframes

#

as you know

#

though i suppose for all players within 10 meters or so wouldn't be too bad -- anything further is beyond the point of being able to see it probs

south swan
#

๐Ÿง  include your own holster model, attach model to leg/whatever, show pistol in it

sullen sigil
#

suppose i can just modeltoworld the selectionposition and vectormodeltoworld the vectordirandup? think_turtle

#

though createSimpleObject is GE so may not be the greatest notlikemeowcry im blind

little raptor
#

it has local arg

sullen sigil
#

yeah just saw that lmao

#

KJW's "Doing stupid things in eachframe loops"

little raptor
#

that way you know you have the right selection

sullen sigil
#

heres the fun part some vests have multiple pistol selections

#

but thats just forEach instead of _pistol = _pistol#0;

south swan
#

Rip your sanity

sullen sigil
#

i lost my sanity long long ago

#

about here.

#

still have a weird offset tho

#
{
    detach _x;
    deleteVehicle _x;
} forEach attachedObjects player;

MYFUNNYOBJECT = createSimpleObject ["\A3\weapons_F\Pistols\P07\p07_F.p3d",[0,0,0],true];

onEachFrame {
    private _pistol = selectionNames player select {"holster" in _x};
    _pistol = _pistol#0;
    private _boneInfo = ["rightupleg","HitPoints"];
    _boneInfo params ["_bone","_lod"];
    private _proxyOffset = player selectionPosition [_pistol, 1];
    private _proxyVectorDirAndUp = player selectionVectorDirAndUp [_pistol, 1];
    private _world_proxyOffset = player modelToWorldWorld _proxyOffset;
    private _world_proxyVectorDirAndUp = _proxyVectorDirAndUp apply {player vectorModelToWorld _x};
    MYFUNNYOBJECT setPosASL _world_proxyOffset;
    MYFUNNYOBJECT setVectorDirAndUp _world_proxyVectorDirAndUp;
    systemChat str [_world_proxyOffset, _world_proxyVectorDirAndUp];
};```
#

as a sidenote i need to create a groundweaponholder regardless for this for attachments etc

little raptor
#

then you have the wrong lod or proxy blobdoggoshruggoogly

#

or maybe there's another transformation that's missing

sullen sigil
#

possible that its just the model offset or something due to the muzzle stuff also being there?

#

just to check, theres no way to get the bones a proxy is connected to via script is there

little raptor
#

no

sullen sigil
#

thought so, suppose it'll probably be functionality requiring a lot of headache

#

uh
think pistol proxy position on the player is constant

#

changing vest doesnt change where its appearing

little raptor
#

then maybe you should use the vest

sullen sigil
#

ya trying that now

little raptor
#

like I originally proposed blobdoggoshruggoogly

sullen sigil
#

did you? meowsweats

little raptor
#

here

cold depot
#

I just saw your post about warlords aircraft spawning.

I made a wiki page on github with a bunch of examples of how aircraft are spawned in various warlords missions which are hosted on github. The wiki also includes info on how to setup airfields in warlords.

Here is the link:
https://github.com/korbelz/WarlordsReduxMe.altis/wiki/Aircraft-spawning-examples

GitHub

Bare metal Warlords Redux. Core gameplay features extended with added customization. 100% Vanilla, no extra scripts, add-ons or mods needed. - korbelz/WarlordsReduxMe.altis

sullen sigil
still forum
#

omg rendering pistols in holster, my past is haunting me

wary needle
#

anyone know of any breathing soundfile names?

still forum
sullen sigil
sullen sigil
still forum
sullen sigil
#

doesnt work if not local otherwise it works fine

#

just eachframe it

still forum
sullen sigil
#

various instances of me setting my scale to 0.1 and running around altis

sullen sigil
#

just cannot get my head around this at all lmao

still forum
#

Ah I think I did rendering of magazine inside pistol in holster

sullen sigil
#

that sounds incredibly difficult for sqf

sullen sigil
#

isnt it part of the engine now? meowsweats

still forum
#

yes since I did that in 2020

#

loong time ago

sullen sigil
#

its that recent of a change? i missed that lol

still forum
wary needle
#

thanks daddy

sullen sigil
#

i can get the offset for the vest, just cant figure out how to apply that to the player now

little raptor
#

get it relative to right leg

sullen sigil
#

but how when im creating a dummy model with no player bones in it meowsweats

little raptor
#

well also translate it to model first

little raptor
#

I guess you don't need to

#

i.e. vest coords is the same as model

sullen sigil
#

oh hang on a moment i dont think the gun is moving when you change stance

#

idk if thats a me error or if its a limitation

little raptor
#

which code?

sullen sigil
little raptor
#

proxyoffset = _vest selectionPosition [_pistol,1];
proxyvdirup = _vest selectionVectorDirAndUp [_pistol, 1];
deleteVehicle _vest;
that's wrong

#

oh nvm that's in vest

sullen sigil
#

ya

little raptor
#

well like I said you MUST GET IT IN LEG COORDS

sullen sigil
#

i dont know how to do that given the vest has no leg

little raptor
#

T pose model blobdoggoshruggoogly

south swan
#

But it does if the holster depends on it

sullen sigil
#

does it really ๐Ÿค”

little raptor
#

I'm pretty sure the vest just uses the T pose

sullen sigil
#

selectionnames on the vest returns this

#

no easy way to figure out which the pistol holster is using though

south swan
#

Which lod are those selections from? Memory?

sullen sigil
#

just all selections

#

selectionNames _vest

#

_vest selectionNames "Memory" returns []

#

so does anything with that syntax

sullen sigil
#

given it doesnt change position or orientation (does by like .05) when changing stance think ill have to call it a dead end though

drifting portal
#

is there a way to get the object of container added by addBackpackCargoGlobal?

#

(i need to add multiple bags to a box with different items inside them)

little raptor
# sullen sigil i dont know how to do that given the vest has no leg
_tPose = createSimpleObject [getText(configFile >> "CfgVehicles" >> "b_soldier_f" >> "model"), [0,0,0], true];
private _pistol = selectionNames _tPose select {"holster" in _x};
pistol = _pistol#0;
   
private _proxyOffset = _tPose selectionPosition [pistol, 1];
private _proxyVectorDirAndUp = _tPose selectionVectorDirAndUp [pistol, 1];
private _boneVectorDirAndUp = _tPose selectionVectorDirAndUp ["rightupleg", "memory"];
_proxyOffset = _proxyOffset vectorDiff (_tPose selectionPosition ["rightupleg", "memory"]);

_proxyVectorDirAndUp params ["_svy", "_svz"];
_boneVectorDirAndUp params ["_bvy", "_bvz"];
_bvx = _bvy vectorCrossProduct _bvz;
_svx = _svy vectorCrossProduct _svz;
_mat = [_bvx, _bvy, _bvz];
relMat = (_mat matrixMultiply matrixTranspose[_svx, _svy, _svz]);
relPos = _mat matrixMultiply (_proxyOffset apply {[_x]});

deleteVehicle _tPose;
MYFUNNYOBJECT = createSimpleObject ["\A3\weapons_F\Pistols\P07\p07_F.p3d",[0,0,0],true];
onEachFrame {
    private _bonePos = player selectionPosition ["rightupleg", "memory"];
    private _boneVectorDirAndUp = player selectionVectorDirAndUp ["rightupleg", "memory"];
    _boneVectorDirAndUp params ["_bvy", "_bvz"];
    _bvx = _bvy vectorCrossProduct _bvz;
    _mat = matrixTranspose [_bvx, _bvy, _bvz];
    _matt = matrixTranspose (_mat matrixMultiply relMat);
    _pos = _bonePos vectorAdd flatten(_mat matrixMultiply relPos);
    MYFUNNYOBJECT setPosWorld (player modelToWorldVisualWorld _pos);
    MYFUNNYOBJECT setVectorDirAndUp ([_matt#1, _matt#2] apply {player vectorModelToWorldVisual _x}); 
}
#

something like that

#

could have errors tho because I copied and pasted from different places...

sullen sigil
#

will try now, tyvm

little raptor
#

also you shouldn't use hitpoints LOD for the rightupleg sel

#

I changed it to memory but dunno if it exists

#

check in the game

sullen sigil
#

running without issues but isnt positioned properly on kipchak vest

#

checking on regular rifleman vest now

little raptor
#

I guess

sullen sigil
#

that looks painful

little raptor
#

rightupleg missing I think

#

use another LOD

#

try the old hitpoints for now

sullen sigil
#

hitpoints also doesn't work i think

drifting portal
little raptor
#

it does but I don't think you have a choice blobdoggoshruggoogly
(tho I'm not familiar with all inventory commands)

#

but I don't think it's that slow

drifting portal
little raptor
#

unless the everyBackpack command is slow

drifting portal
#

what to do about other containers tho too? (vests and uniforms)

#

everyContainer to get

little raptor
sullen sigil
#

rightupleg does exist in memory lod btw

little raptor
sullen sigil
#

will try

#

yes i did the _vest bit

little raptor
#

right tpose coords are reversed

#

can you create a vest model and player model?

#

just want to make sure

sullen sigil
#

as in just _vest and _tpose?

little raptor
#

yes

#

I want to check visually

sullen sigil
little raptor
#

are they at the same pos?

sullen sigil
#

i setposasl them both to players pos

#

fairly consistent offset

little raptor
#

then the vest coords aren't the same as model coords as I guessed meowsweats

sullen sigil
#

I think this is probably more hassle than it is worth lmao

#

Given 90% of the time you don't even look at your holster

little raptor
sullen sigil
#

energy better spent trying to fix the latency on my capital ships given thats the only project i have worked on since february until last week kekw

sullen sigil
#

i shall try in a minute arma is loading

#

just got an mpu5 model so thats yet another project on my list

little raptor
#

actually that one is also wrong let me fix it

#

I shouldn't have reversed all coords...

sullen sigil
#

yes you shouldve

little raptor
#
relMat = relMat apply {[-(_x#0), -(_x#1), _x#2]};
relPos = relPos apply {[-(_x#0), -(_x#1), _x#2]};

well no I think this is the correct one

#

actually no not that either think_turtle

sullen sigil
#

i dont know enough to know what that means

#

oh i put them in the wrong place anyway

little raptor
#

hopefully I reversed them correctly this time

sullen sigil
#

he has developed an instance of p09 penis again

#

get some sleep i doubt this is something that can be fixed at liked 1am your time lol

little raptor
#

true ๐Ÿ˜…

sullen sigil
#

oh that was an accurate guess? i am a god

half tartan
#

hey, i'm having some trouble understanding how to get spawn scripts to run in order

#

e.g. onPlayerConnected {[_uid, _name, _id] spawn CTI_SE_FNC_OnPlayerConnected}; ->
onPlayerConnected {[_uid, _name, _id] call BIS_fnc_spawnOrdered; spawn CTI_SE_FNC_OnPlayerConnected};

hallow mortar
#

No, you use that instead of spawn. The wiki page describes the syntax.

half tartan
#

thank you i am very stupid

ornate whale
#

What is the best way to add an event handler to player object? I create an addon, thus I can no longer use initPlayerServer.sqf. I need them to be added when player spawns, respawns, takes control of, etc. OnUserSelectedPlayer event doesn't work properly in SP I think. And I don't want to use some infinite while-true-sleep cycle for it.

hallow mortar
#

Use a postInit function that adds EHs to catch the other events

half tartan
#

onPlayerConnected {[_uid, _name, _id] call BIS_fnc_spawnOrdered CTI_SE_FNC_OnPlayerConnected};

#

where am i missing a semicolon here?

hallow mortar
#

That's not the right syntax for BIS_fnc_spawnOrdered

half tartan
#

the original script is onPlayerConnected {[_uid, _name, _id] spawn CTI_SE_FNC_OnPlayerConnected};; i'm trying to replace spawn with BIS_fnc_spawnOrdered. instead of just replacing spawn would it be onPlayerConnected {[_uid, _name, _id] for "CTI_SE_FNC_OnPlayerConnected" call BIS_fnc_spawnOrdered};?

hallow mortar
#

No, it would be the syntax described on the wiki page

#

If you still have trouble in a minute I'll write more but reading it will be a start

half tartan
#

sorry. code in general is not a strong suit for me; i don't need you to write anything, i'll figure it out. thank you!

hallow mortar
#
onPlayerConnected {
  [[_uid, _name, _id],"CTI_SE_fnc_onPlayerConnected"] call BIS_fnc_spawnOrdered;
};```
however:
- you should use an event handler instead of the non-stackable `onPlayerConnected` (<https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#PlayerConnected>)
- I'm not sure that `BIS_fnc_spawnOrdered` is exactly what you want, I think "trying to get spawned scripts to run in order" is a red herring and it's either a symptom of a different issue or simply not necessary
half tartan
#

i appreciate the help

vapid scarab
#

So I am using a ZEN Module to paradrop an object. The module is placed on an object, then asking for the zeus to click on a spot in the world to paradrop the object over, then opening a menu with a height and smoke options.

I can create the ZEN Module and ZEN Dialog. The part I dont know how to do is the clicking a spot in the world. What functions or eventhandlers exist for this?

I want the same thing as the second click functionaly that the attachTo module has:

half tartan
#

i'm trying to fix an issue in the ancient warfare BeCTI mission, wherein player init sometimes "fails" mysteriously and can be fixed on a local LAN ~60% by aborting and re-trying to start the mission; but the hacky abort and restart fix doesn't work on a distant dedicated server

#

my best guess to this is the scheduler is failing to load certain variables required for player init while the server is under heavy load; thus, trying to get onPlayerConnected to run in spawnorder is the best fix i can think of

#

this code is approaching 10 years of age, though, and i'm rapidly approaching the conclusion that it might just not be worth it

granite sky
#

If it's spawning a function that needs some variables to be initialized then you could just use a while or waitUntil in that spawned function.

half tartan
#

problem is, i'm not even certain if that's the case, because the only error code i get only appears ~60% of the time when the init fails, and can occasionally appear even when the init succeeds, which makes me think it might not even be the issue

#

ergo, very appreciative for all help, learning a ton, love y'all, but all my herrings might be red today, lol

hallow mortar
high vigil
#

I dont think this works triggerAmmo, set it inside fired EH and nothing happens to the rocket

warm hedge
#

How exactly you do?

#

And what is the vehicle, weapon?

hasty current
#

Is it possible to have the singleplayer death screen in multiplayer + team switch enabled?

manic kettle
half tartan
#

thank you!!

rich bramble
#

@grizzled cliff Wow, carma has risen from the dead. Interested to see where these two porjects will be going :)

#

I've got a little whishlist and I'm hoping there's a few Santa Clauses in here that can help me. I'm looking for:

  • A system that handles a civilian population slowly (ideally controlled by events like civ deaths) turning aggressive on players/a certain faction
  • A way to quickly and efficiently 'barricade' vanilla A3 buildings. If you've got X-cam /mcc/sqf exports/presets of e.g. barricaded/fortified buildings that would be a great start.
  • A script/function that makes an (unarmed?) AI search dead bodies and crates in the vicinity until he finds a weapon + ammo. (Like a less-broken and more awesome version of "resupply")
drowsy geyser
#

Is it possible to use BIS_fnc_attachToRelative like this:
[object1, the vehicle within 3m of object1, true] call BIS_fnc_attachToRelative.
This is for the composition I am working on and there could be more than one of the compositions, thats why im asking

warm hedge
#

nearestObject or something

drowsy geyser
#

ah nice thank you

storm crystal
#

Could this would show the video for everyone?

[["decompteCB2_1.ogv"] call BIS_fnc_playVideo] call remoteExec;
manic sigil
#

... I mean, maybe it's just not a way I've seen before, but wouldn't it be

["decompteCB2_1.ogv"] remoteExec ["BIS_fnc_playVideo",0]
storm crystal
#

why the 0 at the end?

storm crystal
#

ooh yeah ty

storm crystal
manic sigil
#

Looks about right, yeah

polar belfry
#

Hello is there a way to make AI holster their weapon with actions? I want them to keep their weapons off sight and in case my players mess up they then will pull them out. I had done it in the past but can't remember it. I saw the command hideweapon on wiki

manic sigil
polar belfry
#

Weapon on back

#

They are like civilians with carry. The weapon exists in their holsters

#

Found something like this
player action ["WeaponOnBack", player]

#

Maybe replace player with "this"

manic sigil
polar belfry
#

What did switch weapon do? Did it make them holster the gun till something went wrong (eg someone firing?)

manic sigil
#

Hrn, yeah, on review it worked for my unit, but not an ai. Curious.

polar belfry
#

I see

polar belfry
#

is there a way to make AI lower landing gear for a plane. I used unit capture and unitplay but the AI doesn't lower the gear. It moves the flaps but not the gear

kindred zephyr
polar belfry
#

So how do I loop it properly

kindred zephyr
#

EachFrame eventhandler

polar belfry
#

I put a trigger near the avenue of landing. With
There is an action binded to that

Pilot1D action ["LandGear", Pilot1];
#

I put it conditiom true with activation present for blufor

kindred zephyr
#

you are still missing the loop

polar belfry
#

so something like this

kindred zephyr
#

im not sure if using onEachFrame command itself it a good practice, its often recommended to use the eventhandler version for the mission

#

but if they do the same, it should be ok

jaunty ravine
#

Is there some way you can add ammunition to a magazine in your inventory, i.e. not in your weapon?

kindred zephyr
#

yes, you can modify the unit loadout

#

however, its a bit more complicated that it sounds to do it like that, you might as well want to find a workaround to that

jaunty ravine
#

Would that work if I wanted to add only a certain amount of ammunition? For the sake of making the discussion easier, the project I am working on is refilling ammunition across magazine classnames that use the same ammo.

kindred zephyr
#

so a repacking script, got it

#

yes, its possible

granite sky
#

There are no commands to add bullets to a magazine or even to remove a specific magazine. What you generally do is remove all magazines of a type and add back what you want.

granite sky
unborn rivet
#

Need help with relative coordinates of object B to object A. I placed 2 objects in the editor, object A and object B. Is there a way to view/calculate the relative position in Eden Editor of object B to object A? Both are far apart.

granite sky
#

I'm not sure what sort of solution you're looking for. They have 3d coordinates which you can find easily enough.

kindred zephyr
#

getRelPos second syntax sounds like what he is looking for maybe?

unborn rivet
#

The GetRelPos seems to return position based on distance and degree selected. I do have 2 objects already set on the map, and need to check Object B relative position to object A, not the fixed map coordinates of both objects. Let's say, how many X and Y is object B from object A.

kindred zephyr
#

check second syntax....

unborn rivet
#

The second syntax states: obj1 getRelPos obj2 , what names do I substitute the obj1 and obj2, the class names of the object?

polar belfry
#

do eventhandlers work in MP

    // no params
}];```
kindred zephyr
#

assume that the position returned is AGL btw

kindred zephyr
polar belfry
#

so for multiplayer scenarios not a good idea

kindred zephyr
#

never said that, it just means that if you want it happening in all machines, all machines have to add it. If this is for the landing gear, if the AI is created/managed on the server then the only place that needs the eventHandler

granite sky
#

getRelPos is for if you care about the facing of the objects.

unborn rivet
kindred zephyr
granite sky
#

It's for attached objects and it's for 2.14?

#

wait, did 2.14 get released

kindred zephyr
#

i thought we were in 2.14

#

otherwise i wouldnt had mentioned it

#

welp, its dev

#

dammit

granite sky
#

If it's for attached objects then I'd be amazed if it didn't consider orientation anyway.

unborn rivet
kindred zephyr
#

its for a version that has not been released, at lest the getRelPos second syntax

#

the method John gave should work

granite sky
#

well, you'd have to define _objA and _objB

#

And where you run it from depends what you're trying to do with the output.

unborn rivet
kindred zephyr
#

are you returning the _relPos var itself?

#

or just defining and assigning its value?

unborn rivet
granite sky
#

Just put this straight into the console then:
(getPosATL objB) vectorDiff (getPosATL objA)

#

If you do _relpos = (getPosATL objB) vectorDiff (getPosATL objA) then that will set the local var but not return it.

granite sky
#

You can do this instead:

_relpos = (getPosATL objB) vectorDiff (getPosATL objA);
_relpos;
kindred zephyr
#

^

unborn rivet
high vigil
#

did this work for you? i tried triggerAmmo and doesnt work

granite sky
#

@unborn rivet I don't think the objects exist until you start the mission.

unborn rivet
granite sky
#

Just press escape.

unborn rivet
unborn rivet
spiral temple
#

Is there a way to know if a EH is deleted by itself when a vehicle gets deleted script side? Or do I have to check that in my delete vehicle function?

granite sky
#

If an EH attached to an object isn't deleted with the object then that's a memory leak and it's BI's fault. There's no way for us to know.

spiral temple
#

but in general it should be deleted with the object, right?

granite sky
#

It should be.

spiral temple
#

thats what i wanted to know. thank you!

wary needle
#

Is there any commands that list the nearest players from nearest to futhest
Or commands that fetch the closest player?

granite sky
#

No, you'd need a composite.

wary needle
#

Whats that?

granite sky
#

you would need to write code

#

Nearest player example:

private _players = allPlayers - entities "HeadlessClient_F";
private _nearest = objNull;
private _minDist = 1e10;
{
  private _dist = _targPos distance _x;
  if (_dist < _minDist) then {
    _nearest = _x;
    _minDist = _dist;
  }; 
} forEach _players;
split oxide
#

This would work as well, where _targ is the position or object you want to compare to

private _players = allPlayers - entities "HeadlessClient_F";
_players = _players apply {[_x distance _targ, _x]};
_players sort true;
private _closest = _players#0#1;```
#

maybe use distanceSqr instead of distance, but timing may not matter (especially since it's already sorting)

granite sky
#

SQF is so slow that distance and distanceSqr are basically identical perf :P

split oxide
#

It does show up depending on player count but at that point you're trying to optimize small impacts (I think it's like twice as long if I remember performance stuff I've done in the past)

#

but yeah twice approximitely zero is still zero

granite sky
#

Not the point. It's more that every command is so slow that the extra sqrt at low level is undetectable.

split oxide
#

right, I agree, what I was saying was using distance vs distancesqr (if I remember correctly from testing before) doubles line runtime, but it's still in the microseconds

granite sky
#

Your memory is wrong. It's more like 1/100 difference.

split oxide
#

probably was wrong, it's been years

granite sky
#

As an example, units group player apply {_x distance player}; for an 8-unit group takes about 0.009 ms on my hardware. distanceSqr is the same. units group player apply {_x}; is 0.0063 ms.

#

Now your version of the closest-player code should be faster than mine except sort is a disappointingly slow command :P

split oxide
#

Yeah, as I noted before, doesn't really matter much

granite sky
#

They're both pretty grim. There should be nearestInArray commands to go with inAreaArray.

#

For some practical applications you're better off doing multiple inAreaArray checks with different radii rather than going straight for the nearest-position checks, which is silly.

split oxide
#

maybe even a sort option for inAreaArray

hasty current
#

Any easy way to get the simulation type of a vehicle? CarX, TankX, that kind of thing

#

I'm thinking taking it from the config, but maybe there's a command for it that I don't know about

split oxide
little raptor
hasty current
#

Yeaah I figured that'd probably be the answer, thanks

kindred tide
storm crystal
amber basalt
#

Is there a possibility that side player doesn't return the right faction that the players is in, if that player is killed during while the script is being ran?

Code:

// BMP-2 [HF1]
case "BMP2_INS": {
_current_heavy_level = ((side player) Call WFBE_CO_FNC_GetSideUpgrades) select WFBE_UP_HEAVY;
if (_current_heavy_level < 2) then {
    _this removeWeapon "AT5LauncherSingle";
};
};

The BMP spawned on top of me, which runs this script to remove it's weapon. Never had this problem during like 10 years...

hallow mortar
kindred tide
#

i was looking for a command that invokes the construction interface but then realized it's just a module

kindred tide
#

i wonder how it does the RTS style camera controller and building

queen cargo
#

@grizzled cliff well ... always nice to have competition but ... thought carma was not capable of removing the large overhead?
((so ... then i will release 0.6.2 this WE :P))

#

@rich bramble first thing is ... large request, second is more or less easy to solve but requires you to set up a ton of barricade prefabs, third thing ... well ... kinda simple

exotic flame
#

Are objectIDs local or global ? I mean forexample on a multiplayer session, on my computer i have object 1780614: tracer_red.p3d, does it means that an other object on another computer of the session can have id 1780614 ?

granite sky
#

depends

#

That sounds like a bullet? Most of those are local objects.

#

Global objects have global IDs.

exotic flame
granite sky
#

what, like whether any other machine could use 1780614 as an ID for that local object or another one?

grizzled cliff
#

carma2 is using a totally different under laying system for objects

queen cargo
#

kk
will be interesting to see how you solved that without type safety

exotic flame
#

neverwind, i found the answer. An objectID is local but netId is global. A same objectid can correspond to different objects depending on the machine you're looking on, which means 1780614 can be a bullet on my computer but a grenade on an other computer

still forum
#

netId is playerID:ObjectID ye

acoustic yew
#

Ello, sorry for interjecting may if my code is okay because this doesnt work :/

{
                [vehicle _x, convoyMinSpeed] remoteExec ["forceSpeed", vehicle _x]
            } forEach units convoyGroup;```
warm hedge
#

Doesn't work how?

acoustic yew
#

they dont slow down

#

minSpeed is 3

winter rose
acoustic yew
#

ah okay

hallow mortar
#

forceSpeed is supposed to work for this

winter rose
acoustic yew
#

still it doesnt...

winter rose
#

welp
maybe it has to do withโ€ฆ l o c a l i t y

hallow mortar
#

Are you sure convoyGroup and convoyMinSpeed actually contain what they're supposed to?

acoustic yew
#

yes

#
curatorName = player;
convoyGroup = Convoy_1;
convoySpeed = 50;       convoySeparation = 50;
convoyMinSpeed = 3;
pushThrough = true;
vComAiEnabled = false;
lambsDangerEnabled = false;```
winter rose
#

note that 3 = 3m/s = 10.8 km/h

#

try in eden only
if vehicle _guy doesn't work, try driver vehicle _guy (even though you should get a list of them instead of calling that on every group member)

acoustic yew
winter rose
#
private _vehicles = units convoyGroup select { not isNull objectParent _x } apply { vehicle _x };
_vehicles = _vehicles arrayIntersect _vehicles;
private _drivers = _vehicles apply { driver _x } - [objNull];
{ [_x, convoyMinSpeed] remoteExec ["forceSpeed", _x] } forEach _drivers;
```I guess
sullen sigil
#
allUnits select {vehicle _x isEqualTo vehicle player};```
winter rose
#

no

sullen sigil
#

i am a master at scripting (please do not do this)

south swan
#

u wot

sullen sigil
#

i once set every variable in all namespaces to equal 0 and it didnt break nearly as much as i thought it would

winter rose
#

STEP AWAY FROM THE KEYBOARD SIR, I WON'T SAY IT TWICE *calling code BIS on my position, immediately!*

sullen sigil
#

BIS
inb4 dedmen corrects you

winter rose
sullen sigil
#

could you actually that sounds so much more fun

#

could you do player = true

winter rose
#

ye ๐Ÿ˜„
it was patched, but I almost couldn't leave the main menu given all the errors ๐Ÿ˜„

sullen sigil
#

allUnits apply {player pushBack _x};

#

mashallah ๐Ÿ™

winter rose
#

KJW is SCP 0x00000005 confirmed

sullen sigil
#

i'd have to be to write mods that run setobjectscale on every unit on every frame

winter rose
#

in MP

sullen sigil
#

it doesnt work if you are not local to the server in mp sadly

winter rose
#

and on every client ๐Ÿ˜„

sullen sigil
#

i didnt even look at locality when i wrote it

#

local args global effect

#

dear lord

winter rose
#

the guy breaks scripts more than I do, and that says something

sullen sigil
#

quite thankful it doesnt work in mp now

sullen sigil
#

using someone sending me screenshots of what i wrote in a discord message for syntax highlighting

winter rose
#

I won't comment on your toilet-breaking abilities

sullen sigil
#

it is truly astounding how the mod even works

#

but all it does is make the local host hoster change size or singleplayer change size

#

there are limits to it you cant go below like .1 scale

#

else shit breaks

winter rose
#

range 0.0001..65504

sullen sigil
#

i dont think i ever found an upper bound for scale aside from you just unrendering

sullen sigil
winter rose
#

not 65535 son, I am disappoint

sullen sigil
#

the larger you are the quicker you can run up hills too

#

which makes sense but it is very comical just stepping up a 20m drop

acoustic yew
ashen ridge
#

At the start of the mission i use on the serversqf 0 setFog 0.1;but after some time (1, 2 hours) the fog is at 0.457, and i use no command to change the fog (nor is server or clients).

#

The only weather command i use is setOvercast a couple of times.

#

Why the fogo changes?

winter rose
#

because reasons and randomisation

#

0 setFog 0.1; OK
but also 3600 setFog 0.1; to enforce no changes for an hour

south swan
ashen ridge
#

Can i use that?sqf 0 setFog 0.1; (3600*6) setFog 0.1;

acoustic yew
#

Sorry for interjecting, may I ask how I can get array for units of a convoy without the leader?

#

so I can use this

{        
_x join leader convoyGroup    
} forEach units convoyGroup;```
winter rose
acoustic yew
#

uhh

sullen sigil
#

units convoyGroup is all units in the group

#

so making those units join convoyGroup does nothing

winter rose
#

re-read your code ๐Ÿ˜„
"all the units of that group, join the leader of that group" yeah ๐Ÿ˜„

sullen sigil
#

reminds me of why i got so confused with 0 divisor errors before realising i was trying to find the distance to myself

#

i had forgotten to add player handling.

acoustic yew
sullen sigil
#
private _harold = leader convoyGroup;
_harold doMove getPosASL _harold;```
#

im pretty sure theres a dedicated command for moving back into formation but seeing as youre doing a convoy thing change getposasl if you want

#

(group leader orders all units in group to formation after reaching domove position)

acoustic yew
#

:0

#

okay :D

sullen sigil
#

havent tested that but imagine itd work

livid lava
#

Can someone explain to me how to add interaction to an object through which the player will receive a full loadout?

sullen sigil
#

mfw searching "addAction" returns results for addiction mmyes

sullen sigil
#

imo, friendliest method for mission makers:

//In obj init
this addAction [
  "myfunnyactionname",
  {
    private _loadout = getUnitLoadout bob; //bob is the variable name of the unit which has the loadout you want your player to have.
    player setUnitLoadout _loadout;
  },
  nil, //no touchy
  1.5, //no touchy
  true, //Do you want players to see the action in the middle of their screen?
  true, //Do you want the action to go from the middle of their screen after use?
  "", //no touchy
  "true", //no touchy
  10 //Radius from object action will appear
];```
#

ensure you have unit of variable name bob and set the loadout up on him, makes for easier editing

#

he can be anywhere, doesnt need to be seen by players

cosmic lichen
#

Better way would be to directly get the loadout from the config

sullen sigil
#

what if they want a custom loadout

#

thats the entire point of that part

#

set the loadout up on bob, keep bob hidden (or use him as the action object)

#

change bobs loadout accordingly, no faffing with arrays and stuff that are difficult for mission makers to understand if they dont script

cosmic lichen
#

Fair enough

sullen sigil
#

if you had set up the units loadout in config ofc you could just config lookup but thats most user friendly IME

granite sky
#

can even hide & disable simulation on bob if you have a lot of them :P

#

main issue is accidentally including in things like units west

sullen sigil
#

set as civilian

#

...does getunitloadout work on dead units?

little raptor
#

I'm gonna guess yes

sullen sigil
#

well then can just kill the unit too

granite sky
#

They drop their primary & secondary weapons though.

#

Not sure if you can re-add them :P

sullen sigil
#

ah, true

carmine perch
#

does anyone know how to fix this error i have no clue what chat to ask this in

#

missing 'description.ext::Header

kindred tide
#

do you still have to call an extra join in A3 to make sure the units side is set correctly?

kindred tide
#

it's needed in A2 or else their side will be such as written in config rather than the group's side

acoustic yew
#

tho I dont have a lot of experience with join command

kindred tide
#

i thought the reason you were doing that was because their side was wrong

sullen sigil
#

no, side is set fine with one join call

kindred tide
#

one yes, one. after you did, you know, _group createUnit ..., where group already knows what side it's on

#

so that one call to join is really an extra

granite sky
#

Yeah, still the same. I guess they were worried that it'd break some old missions if they changed it.

#

Although I can't imagine the use case for having units of two different sides in the same group.

kindred tide
#

i remember trying to create arbitrary number of sides, by having all units turn into renegades and then re-join their group, so that they wouldn't shoot each other

#

they still shot a few of their mates sometimes, i never figured out why

granite sky
#

In the conventional case they all shoot each other, because they use the group side for targeting, apparently.

#

Create redfor units in blufor group and they go full all vs all.

#

They're probably still taking orders from the leader and sharing target knowledge, because Arma.

kindred tide
#

oh, they shot each other if they re-joined their old group. but if i created a new group (of the same side), and joined all of them into it, they wouldn't shoot most of the time lol

#

they still seemed jumpy like there was actual tension

granite sky
#

I'm slightly worried that this wasn't 100% :P

#

Maybe there's still some logic looking at the original unit side.

kindred tide
#

it's good for modeling bandits behavior, they'd suddenly shoot their mates at random as if having some inner group conflict

wary needle
#

anyone know how to add a idle animation for agents? i cant get the panic one to work

#

_zombie addEventHandler ["AnimChanged", {
params ["_agent", "_anim"];
_agent playActionNow "Panic";
}];

kindred tide
wary needle
#

this was the only way i got it to work

little raptor
wary needle
little raptor
#

do you at least play the anim?

wary needle
#

?

little raptor
#

you must play some anim on the agent for the event to trigger at all

#
_zombie addEventHandler ["AnimChanged", {
        params ["_agent"];
        _agent playActionNow "Panic";
    }];
_zombie playActionNow "Panic";
wary needle
#

no im not saying what i have now doesnt work

little raptor
#

or

_zombie addEventHandler ["AnimStateChanged", {
        params ["_agent"];
        _agent playActionNow "Panic";
    }];
_zombie playActionNow "Panic";
wary needle
#

i just want to make it work whilst idle

little raptor
little raptor
wary needle
#

sorry i was unclear

#

the panic anim works when running or walking

#

when the ai is still he puts his hands down and just stands there

#

i want him to be paniced while idle

#

cant put videos shit

little raptor
wary needle
#

nope same problem

#

just tried it. only panis while moving

little raptor
#

maybe the action is not linked to the idle stand actions group

#

use its state instead

#

first make the unit play the panic action, then get its state: animationState myZombie

#

then use it like so:

_zombie addEventHandler ["AnimChanged", {
        params ["_agent"];
        _agent playMoveNow "WhatEverThatCommandGaveYou";
    }];
wary needle
#

i mean i can just fetch the animation from amimation viewer

little raptor
#

or that

#

whichever's easier for you

wary needle
#

i aready know where it it

#

is there a way to copy the name from the anim viewer?

little raptor
#

ctrl+C?

wary needle
#

cant highlight it though

little raptor
#

just select it from the list, then press ctrl+c

wary needle
#

ApanPercMstpSnonWnonDnon_G02

#

ApanPknlMstpSnonWnonDnon_G03

#

ApanPpneMstpSnonWnonDnon_G02

little raptor
#

well now use it with playMoveNow

wary needle
#

got my anims

#

yeo

#

yep

#

it works but how do i only make him do it when idle?

little raptor
#

by "idle" you mean stopped and not moving?

wary needle
#

i could not find an eh that did it

#

yeah

#

and i would still like the other anim to work

#

acualy i have a solution

#

my zombies have a "trigger" when they get shot at

little raptor
#
_zombie addEventHandler ["AnimStateChanged", {
    params ["_agent", "_anim"];
    if !("mstps" in _anim) exitWith {};
    _agent playMoveNow "ApanPercMstpSnonWnonDnon_G02";
}];

you can try that

wary needle
#

yeh i dont think that worked

#

he just standing there

little raptor
#

_zombie playMoveNow "ApanPercMstpSnonWnonDnon_G02";

#

or try with AnimChanged too

wary needle
#

yep did that

wise frigate
#

Hey guys, I am trying to set up a script which essentially takes the derived value of a variable and then issues a hint depending on the variables value (Numerical).
Here is what I have so far, but the numerical value doesn't appear to actually affect what text is shown on the screen.

Strength = 0.66;
Strength_Increase = 
{
    if (Strength < 0.99) then
    {    
        Strength = Strength + 0.33;

        if (Strength == 0.66) 
        then 
        (
            hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#29b00e'>NORMAL STRENGTH</t>"]
        ) 
        else 
        {
            hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#bf0000'>HARD STRENGTH</t>"]
        };
    };
};

Any help would be appreciated

wary needle
little raptor
wary needle
#

_zombie addEventHandler ["AnimChanged", {
params ["_agent"];
_agent playMoveNow "WhatEverThatCommandGaveYou";
}];

little raptor
little raptor
#

didn't you change "WhatEverThatCommandGaveYou"?

wise frigate
wary needle
#

yes i did

#

now its not working lmao

little raptor
wary needle
#

_zombie playActionNow "Panic";
_zombie addEventHandler ["AnimChanged", {
        params ["_agent"];
        _agent playMoveNow "ApanPercMstpSnonWnonDnon_G02";
    }];
#

i used this and it worked i mean

wise frigate
granite sky
#

If strength is always a multiple of 0.33 than yes, 0-3 is preferable.

little raptor
granite sky
#

Half your code is missing anyway

granite sky
#

It's just a function that's not called.

wise frigate
#

The function is called via a CBA Keybind, that part works so all good

wary needle
#

get an entire zombie script finished and built. cant add idle anims lol

kindred tide
#

maybe something else is changing the animation like every frame

#

forcing it to be something

#

so that the zombie doesnt look normal and stays in the zombie stance

wary needle
#

?

kindred tide
#

btw zombies were an easter egg in A1, they were reskinned civilians you could only spawn from script

kindred tide
# wary needle ?

i mean maybe some other script is already doing playAction/playMove on the zombie

wary needle
#

i removed it to test, nope

#
    _zombie addEventHandler ["AnimChanged", {
        params ["_agent", "_anim"];
        _agent playActionNow "Panic";
            if !("mstps" in _anim) exitWith {};
    _agent playMoveNow "ApanPercMstpSnonWnonDnon_G02";
    }];
#

if i use this the zombie just gets frozen

#

without the panic it also just frezzes

wary needle
#

FOUND THE ISSUE

#

for some reason even though its it a agent it needs to be a unit

wise frigate
#

Still having issues, Evertime I press the relevant key, the text is still being shown as HARD STRENGTH, I have checked the variable each key press and it does appear that the actual variable itself is changing between 1-3 on the key presses, just the text is alwasy HARD

Strength = 2;
Strength_Increase = 
{
    if (Strength < 3) then
    {    
        Strength = Strength + 1;
        if (Strength == 1) then (hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#3b378c'>GENTLE STRENGTH</t>"]); 
        if (Strength == 2) then (hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#29b00e'>NORMAL STRENGTH</t>"]); 
        if (Strength == 3) then (hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#bf0000'>HARD STRENGTH</t>"]); 
    };
};
Strength_Decrease = 
{
    if (Strength > 1) then
    {
        Strength = Strength - 1;
        if (Strength == 1) then (hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#3b378c'>GENTLE STRENGTH</t>"]); 
        if (Strength == 2) then (hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#29b00e'>NORMAL STRENGTH</t>"]); 
        if (Strength == 3) then (hintSilent parseText format["<t size='1.25' font='Zeppelin33' color='#bf0000'>HARD STRENGTH</t>"]); 
    };
};
["TEST","strength_increase", "Increase Strength", {_this spawn Strength_Increase}, "", [0xF8, [false, false, true]]] call CBA_fnc_addKeybind;
["TEST","strength_decrease", "Decrease Strength", {_this spawn Strength_Decrease}, "", [0xF9, [false, false, true]]] call CBA_fnc_addKeybind;

Really lost at this point, any pointers would be greatly appreciated!

granite sky
#

Your then statements all have the wrong brackets.

wise frigate
#

It would be something as simple as that...

#

Arma in a nutshell

kindred tide
#

how do i make a unit honk the car they're driving? (the car is civ)

fleet sand
wary needle
#

_ZOMBIE addEventHandler ["AnimChanged", {
params ["_UNIT"];
_UNIT playMoveNow "ApanPknlMstpSnonWnonDnon_G03";

}];
#

i got this working, how would i make it only work when idle?

wise frigate
#

Any idea how I could get the addCamShake function to work on a player that the person is looking at?
I want 1 player to be able to do an action (A), whilst looking at another player (B), and then have player (B) have a cameraShake effect

#

Been playing around with RemoteExec for that purpose but doesn't seem to work too good

winter rose
sudden yacht
#

Question, is there an event handler for when a unit completes a waypoint, or move to position?

winter rose
hallow mortar
torpid pike
#

is anyone here familiar with hemtt ? having some issues trying to compile GUI code

sudden yacht
#

i actually did something different instead. Thank you. ๐Ÿ™‚

hardy valve
#

hello does anyone know of a working script for a server to warn, and eventually kick a player for being afk?

kindred tide
#

it's very important that what goes before action is _vehicle, and not _driver

split oxide
#

Unless you mean the vehicle

dreamy kestrel
#

Q: what is a circular reference to a HASHMAP?

20:00:50 Warning Message: Circular reference found in HashMap, this will cause a memory leak!
20:00:50 Circular reference found in HashMap, this will cause a memory leak!
20:00:50 Circular reference found in HashMap, this will cause a memory leak!
...
#

intuitively I think it is a value in one of the KV pairs being the HASHMAP instance itself, but I do not think I have any of those going on.

granite sky
#

Like:

_hm1 = createHashMap;
_hm2 = createHashMap;
_hm1 set ["hm2", _hm2];
_hm2 set ["hm1", _hm1];
dreamy kestrel
#

really? that? hmm...

#

here's my dilemma...

#

or why that caused bunch of these things to stack up before A3 finally crashed... blobdoggoshruggoogly

#

I have inventory being arranged in terms of hashmaps. maybe not the greatest choice, but it offers easy key ident throughout.

#

inventory includes weapon platforms and their accessories, which each accessory has a value reference to the platform itself. this possibly being the circular reference.

granite sky
#

sure sounds like it

dreamy kestrel
#

I use that to identify the platform from the accessory for inventory management purposes, filtering compatible items, etc.

#

alternatives to that is a naked array, even KVP, but that just gets ugly real quick. but if it avoids this A3 pitfall blobdoggoshruggoogly

#

so I have a lot of this pattern going on navigating inventory, _x getOrDefault ['_parent', _x], '_parent' having been the platform in the case of an accessory hashmap.

granite sky
#

Sounds like you need a redesign then.

dreamy kestrel
#

blobdoggoshruggoogly maybe so, slightly, anyway, even with an intermediate RYO 'hashmap' ...

#

otherwise so close to a functional inventory manager...

inner nexus
#

Hey, I'm getting an error "invalid number in expression"
{_x addVest "rhs_6b2"} forEach units group;
{_x addHeadgear "ssh40_helmet"} forEach units group;

#

not sure what's causing it

dreamy kestrel
inner nexus
#

got it fixed, just needed to use units (group this) instead

molten yacht
#

Hmm

#

How would I... take a playableUnit and then ask "are you in a land vehicle of any type"

#

or, well

#

I wouldn't mind "are you in a car, APC, or tank" but let's start small

#

Ideally I could get a switching statement that says like case car: and case apc: but that seems foolish

granite sky
#

vehicle _unit isKindOf "LandVehicle" should mostly work

#

There's a slightly more proper method where you look at the simulation.

granite sky
#

It's a config value.

dreamy kestrel
molten yacht
#

Also, what's the best way to get the prefix off of a group's name? i.e. group player gives B ALPHA 1-2 and I really just want ALPHA 1-2.

warm hedge
molten yacht
#

more like get group ID

#

is what I want

#

oh wait

#

GroupID is just that

#

lmao

#

nvm

#

thanks, you led me to the correct result anyway because I clicked on the link

hasty thorn
#

G'day peeps, need a bit of help wrapping my brain around event handlers

ive been trying to run a code on all entities on a dedicated server
the logic im looking for is as follows:

-any entity, player or not "shot in the head"
-remoteExec "function"

anyone able to offer some advice?
and where in the mission.pbo does this need to sit

hardy valve
#

Hello i need a script to set damage to a predefined area to destroy the trees. Is this possible?

cold depot
#

There is a terrain removal(I forget the proper name) module in the editor that you can place on your map to remove items like trees.

hardy valve
fleet sand
storm crystal
#

is there any existing script to automatically flush cache?

little raptor
#

No

unreal breach
#

Hit me up im remastering scripts etc also can check ur scripts for any problems within the script

sullen sigil
#

Has anybody created a unix timestamp generator for arma mission time/date? Thought there were commands for it but they do not exist

#

Use case is having a constant time across all mission saves etc (that will be compatible with time skips)

split scarab
#

Tried using ChatGPT to help me write a script and it seems like exactly what I need except there's an error with curatorType that I can't figure out

Does anyone know?

if (isServer) then {
    {         
        _message = format ["Your name is %1",name player];

        private _curator = _x;
        if (curatorType _curator == "Zeus") then {
            _curator remoteExecCall ["systemChat", 0, _message];
        };
    } forEach allCurators;
};
sullen sigil
#

!quote 6

lyric schoonerBOT
winter rose
#

I forgot this one ๐Ÿ˜‹

sullen sigil
#

i had to search for it

#

speaking of gpt though, anyone tried github copilot with sqf? any good?

granite sky
#

There's also some tricky stuff in working out what's a head hit.

#

Non-head hits will often do small amounts of damage to the head, and ACE's extra hitpoint counts as head selection for some reason, so you need to use the hitpoint param rather than the selection.

shy hinge
#

@split scarab

granite sky
#

That script is so bad that I can't even tell what it's trying to do. Shoulda left the comments in :P

split scarab
granite sky
#

Messaging all zeus players:

private _zeusPlayers = [];
{
  _zeusPlayers pushBackUnique getAssignedCuratorUnit _x;
} forEach allCurators; 
"Test message to zeus players" remoteExec ["hint", _zeusPlayers];
#

Must be executed on the server.

split scarab
#

Will that work if I slap it in the Trigger Activation field?

granite sky
#

probably not. I don't deal with triggers.

#

I'm not even sure that triggers can do what you want. Depends what you want to happen if a second player enters the trigger zone.

split scarab
#

Hmm, I'm making a Zeus mission where players have to travel somewhere specific and I've setup stuff along the route but I wanted to put down triggers outside of the route to alert me when they're veering off course so I can possibly spawn stuff to discourage them from continuing off the route

#

So I was hoping to make the Trigger message the Zeus players so we know to deal with the stragglers

granite sky
#

A repeatable trigger won't fire again until it's been reset by everyone moving out of the zone. So if you wanted a message for each player that strays then it won't work well.

muted crystal
#

SELECT item_name, item_quantity FROM box_inventory WHERE box_id = boxID;
friends, I wrote this code to save the data of the items in the boxes on my server, but it does not work.

#

I give an example of what I want, for example, if there are 10 windings in 1 box, there are 8 left when 2 windings are missing. When I restart, I want it to continue from 8 chargers.

#

So basically I want to keep the database inside the box

kindred tide
#

should i use attachTo or waypointAttachVehicle to attach a "destroy" waypoint?

#

oh it looks like attachTo doesnt accept waypoint type

winter rose
little raptor
little raptor
little raptor
sullen sigil
velvet merlin
#

looking for some ideas for sorting such data in sqf

#

problems
a) models dont have consistent RES LOD naming
b) sort strings bunches strings together starting with the same time (ie 1, 1x, 1xx) [can be solving by adding leading 0s]
c) preferable order the data to be just index 0,1,2,3, etc regardless of th RES LOD naming - thus reshuffle the data accordingly

#

any intelligent way to achieve this or just basic array data reordering

sullen sigil
#

peculiar issue here; filepatching is making function viewer (using adt) return the updated file, but running str fnc is giving me the pbo function -- have i missed out on something here? pboprefix is pathed correctly (obviously, given function viewer is returning it)

little raptor
velvet merlin
#

LOD names

little raptor
#

name?

#

why not use lod resolution?

velvet merlin
#

its both RES LODs and special LODs

little raptor
velvet merlin
#

however model makers dont name their RES LODs consistently

#

so one does 0,1,2,3, another 1,2,3,4, yet another 1,10,25,100 or 0,0.5,1,2,5,10

little raptor
velvet merlin
#

if you look at the colums, its very hard to read as the values are not colum by column

#

you would want
value1, valu2, value3, value4, - , - , ..

little raptor
#

if it's not being updated your function is final

sullen sigil
#

Ah, it's cfgfunction'd -- I assume that's the purpose of CBA's PREP stuff?

little raptor
#

wut?

sullen sigil
#

using it in cfgfunctions means it is final right

little raptor
#

so are PREP functions

sullen sigil
#

they can be overwritten with mission restart

little raptor
#

I really don't know what's the goal here

velvet merlin
#

another example

#

"1"
"2"
"3"
"0"
"4"
"3.5"
"12"
"6"
"5"
"10"
"7"
"8"
"1.5"
"2.5"

#

input

little raptor
#

oh meowsweats

velvet merlin
#

sort leads to:
"0"
"1"
"1.5"
"10"
"12"
"2"
"2.5"
"3"
"3.5"
"4"
"5"
"6"
"7"
"8"

#

so 10 and 12 not at the end

#
  • you get a lot of additional columns
little raptor
#

sort by actual numbers

#

instead of strings

velvet merlin
#

yeah atm doing parseNumber to detect if the LOD is a RES LOD, and then sort

#

however next is to simplify to RES1, RES2, RES3, .. RESn

#

so drop the custom numbering and reduce to minimal amount

#

and finally fetch the data correctly from the array of the info per model

#

as said can be done in basic logic step by step - was wondering if there is a more intelligent way to do it

#

like "squash array" to reduce to only relevant entries

little raptor
velvet merlin
#

roger

#

the mess you have if you need to work with "legacy" data

little raptor
# velvet merlin

one thing that is not clear for me yet:
is all data being extracted from the game?

#

or are you just trying to sort them in SQF?

cosmic lichen
#

Why not do the sorting in Excel?

velvet merlin
#

you have too much faith there @cosmic lichen ๐Ÿ˜›

cosmic lichen
#

Huh?

muted crystal
#

?

sharp grotto
#

Otherwise it's INSERT

sullen sigil
#

is there any way of getting player uid in sp? meowsweats

kindred tide
#

i switched from units to agents to back to units and re-wrote same code 10+ times

tulip ridge
#

Running into a weird bug where a sound that should be played locally can be heard by other clients

private _voiceLine = selectRandom getArray (_config >> "voiceLines");
private _nearbyUnits = (getPosATL player) nearEntities ["CAManBase", 30];
[_voiceLine, getPosASL player] remoteExecCall ["CWR_fnc_playLocalSound", (_nearbyUnits)];
// fn_playLocalSound
params ["_file", "_position"];

if (CWR_Voice_EnableVoiceLines) then
{
    playSound3D
    [
        _file,
        objNull,
        false,
        _position,
        1, // volume
        1, // pitch
        0, // distance
        0, // offset
        true // play locally
    ];
};
#

(Sound effects on the other client were muted for the recording)

#

I have other code that references this same function, but does not have this issue

granite sky
#

That seems pretty clear that you're calling the top routine twice?

#

and therefore it's working as written.

#

Although you're probably double-stacking the calls as well because both units are local?

tulip ridge
#

Although technically that's not true, one second

kindred tide
#

interesting detail about RPT log file

granite sky
#

@tulip ridge Are there two players there? I figured one of them was AI.

tulip ridge
#

I have two instances of arma open on a local lan server

#

That's why there's a (2) in the other client's name

#

After throwing in some debug statements, the code does seem to be called once for each unit, but the sound effect only plays once per player

#

So I guess something is wrong with my check for ACE?

class Extended_PostInit_EventHandlers
{
    class CWR_ThrowGrenadeEH
    {
        init = QUOTE(if isClass (configFile >> 'CfgPatches' >> 'ace_common') then { call CWR_fnc_throwGrenadeEHACE; } else { call CWR_fnc_throwGrenadeEH; };);
    };
};
granite sky
#

Do you have any documentation on CWR_ThrowGrenadeEH?

#

oh, I guess that's just a function that you haven't pasted.

tulip ridge
#

It's just this, adding a fired event handler

player addEventHandler ["Fired",
{
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    
    [_unit, _magazine] call CWR_fnc_throwGrenadeMain;
}];
#

Ace version just uses a CBA event handler for ace_firedPlayer

granite sky
#

It's the ACE one that's breaking?

#

Or both?

tulip ridge
#

As far as I can tell, both

tulip ridge
granite sky
#

So you've confirmed that when you throw a grenade, the handler triggers on both clients?

tulip ridge
#

Was about to check if it runs on each client twice, but it definitely runs on the client that throws the grenade twice

granite sky
#

ah, that's different.

#

Is that because it's installing the handler twice?

tulip ridge
#

Shouldn't be, I was only getting one message saying the handler was created

granite sky
#

Other option is that it's firing the same handler twice for the same grenade throw.

tulip ridge
ornate whale
#

How can I get the head (eyes) orientation in azimuth degrees like getDir?

warm hedge
#

eyeDirection or selectionVectorDirAndUp and convert into direction 0-360

granite sky
#
_eyeDir = eyeDirection player;
_dir180 = _eyeDir#1 atan2 _eyeDir#0;
(_dir180 + 360) % 360;
tulip ridge
#

I think I might have figured out why some of the weirdness happening?
For actually sending the message in group chat I use:

[player, _message] remoteExecCall ["groupChat", (units group player)];

to send it, so maybe that's why?

#

There wasn't any noticeable difference when using group player for the targets

tulip ridge
#

Are players only ever local on their own machines?

warm hedge
#

Yes, players are always local on therir machines

tulip ridge
#

Yeah, but is a player ever local on another player's machine?
I'd assume no, but want to make sure

#

I'm assuming yes, because upon filtering out non-player units from _nearbyUnits and then putting remoteExecCall in a forEach _nearbyUnits, seems to be working

warm hedge
#

I do not think so. If a player is not local object, one cannot move the player unit properly

granite sky
#

Player objects are briefly server-local on creation, IIRC

#

After that they're client-local.

tulip ridge
#

I don't think that should be an issue? If anything I think it would just play a sound on the server's side, where the player spawns

#

Where's the setting for giving all players access to debug console?
Found it before but can't now

hallow mortar
#

It's in the Editor mission attributes, I wanna say under Multiplayer but not 100% sure

tulip ridge
#

Yeah I found it, thought I deleted my message after I did but my internet's been weird today

hallow mortar
#

[for the historical record, it's in the States section of the General attributes menu]

tulip ridge
#

Got it figured out now, I actually ended up fixing it by going to fix another part.

I do the voice lines with "tags", and since I made the message get processed for each player, it caused each player to check those tags and then play the voiceline

tulip ridge
#

What's the script command to create a tactical ping?

warm hedge
#

I think there's nothing

tulip ridge
#

Is it just like a draw3D or something?

warm hedge
#

If you want to recreate, that may do

tulip ridge
#

A feature for another day then
Was going to put a tactical ping where the player was looking for the "Contact" callouts for the chat wheel mod I've been working on

tulip ridge
little raptor
granite sky
#

yeah I wrote it correctly initially from memory and then misfixed it hours later after glancing at the wiki :P

native hemlock
#

Anyone have experience with tvTrees? I was messing around tonight and made this https://i.gyazo.com/ba065265d34607075ff00622a21cc9dc.gif, but it seems like tvTrees are limited. I couldn't find a way to change the text being displayed so every update to the text I would have to remove the 13 children and readd them with the updated name. In that example it seemed to work very smoothly but who knows how it might look in a multiplayer environment with a heavier load. I suppose another way would to be to remove the value I want to change, add it back and then use one of the sorting commands.

little raptor
#

Well it depends how you look at it ๐Ÿ˜…
x atan2 y is CW from north
y atan2 x is CCW from east

#

For getDir like behavior you want the first

storm crystal
#

Yo, how do I set a direction to look at on a plane?
I'd like it to look at the direction of _planedirpos when it spawns and I don't really know how to

_planespawnpos = markerPos "W1";
_planedirpos = markerPos "W2";
_plane = createVehicle ["B_T_VTOL_01_infantry_F", _planespawnpos, [], 0, "FLY"];
_pilot1 = group player createUnit ["B_Pilot_F", [0, 0, 0], [], 0, "NONE"];
_pilot1 moveInDriver _plane;
_plane moveTo _planedirpos;
little raptor
#

See the getDir command

tulip ridge
#

Is there not a chat command for direct communication?

#

Direct chat does have a channel ID of 5, but I can't seem to find a command to use it?

little raptor
#

but channel 5 is for directSay

#

it's not actually a "radio channel"

tulip ridge
#

Yeah but I was hoping there was an equivalent for sideChat, groupChat, etc. for direct chat

#

Unfortunate

south swan
#

maybe customChat blobdoggoshruggoogly

little raptor
#

systemChat meowsweats

tulip ridge
#

It was mostly just for the text styling (more white than system)

little raptor
#

well try customChat too blobdoggoshruggoogly

tulip ridge
#

I already tried customChat, it just didn't send a message at all

real tartan
#

looking for way to detect ( on player ), if item was taken from player's backpack by another player ( or zeus )

fleet sand
# real tartan looking for way to detect ( on player ), if item was taken from player's backpac...

You can check is item removed from backpack with removeItem command: https://community.bistudio.com/wiki/removeItem
But if you are vorried about stuff desapearing becouse of players then i would use lock backpack by diwako Github:
https://github.com/diwako/lockBackpack

GitHub

Adds the ability to lock your backpack for ACE 3. Contribute to diwako/lockBackpack development by creating an account on GitHub.

hasty gate
real tartan
fleet sand
sudden yacht
#
[10:24 PM]
Randomelement = selectRandom ["stuff"];
[10:25 PM]
Randomelement setpos pos1;

// then I get an error that there is no object.. help..

fleet sand
#
Stuff = nearestObjects [player, ["class1ect"], 200];
Randomelement = selectRandom [Stuff ];
Randomelement setpos pos1;
``` If you are not using this variables in other stuff make them private.
tulip ridge
tulip ridge
real tartan
tulip ridge
#

Change selectRandom ["stuff"] to just selectRandom Stuff

tulip ridge
sudden yacht
#

but.. Isnt it defined as stuff when i placed it.. I am easily confused.. Bear with me.

#

stuff = ect... that defines it right? Im not crazy.. right?

fleet sand
#
Stuff = nearestObjects [player, ["class1ect"], 200];
Randomelement = selectRandom ["stuff"];
  1. Stuff is with a capital letter and in selectRandom is with small s
    (Variables are casesensetive).
  2. in SelectRandom you are passing string as a element, and not passing array that you got saved in Stuff.
little raptor
#

Variables are casesensetive
no

little raptor
#

selectRandom command takes an array and randomly selects an element from it

#

so what you should do is: selectRandom stuff

#

in layman terms, stuff is something like [obj1, obj2, obj3, ....] so you don't need to wrap it into an array again

#

so if you did selectRandom [stuff], you'd get your array back again ([stuff] is an array of array of objects now)

#

(random can now only select one element, and it's the stuff array)

fleet sand
little raptor
#

yes

#

they're the same variables

#

SQF vars are case-insensitive

fleet sand
#

oh. The more you know.

sudden yacht
#

thanks leopard! i dont know why i was thinking about like the way i was ๐Ÿ™‚

thick sage
#

not only variables, but everything except preprocessor operators. E.g. [] Call {1} works

hallow mortar
#

Some string comparisons (e.g. isEqualTo, in) are case sensitive

calm lantern
#

hey need a white list for warlords we're they can not load modern guns into the server anyone got ideas

kindred tide
#

how do i show the mission results summary, like statistic, kills, failed objectives etc?

granite sky
#

You mean without ending the mission?

kindred tide
#

with or without, whatever

#

oh, it shows itself lol

#

i thought i had to do from script

#

how do i change what it says though

granite sky
#

CfgDebriefing entries.

kindred tide
#

looks like the relevant one for me is briefing.html

grizzled cliff
hardy valve
hallow mortar
calm lantern
#

hey can somone help me make the a script ?

warm hedge
#

Don't ask to ask just ask

calm lantern
#

I need to make a Para chute script

#

the goal is to be able to eject ai out of the plane with static Para chute I just started scripting dnt really have any idea and im trying to learn

#

@warm hedge

tranquil nymph
#

@native hemlock: yeah, there's not currently a tvSetText command

nocturne bluff
#

Its hurrible

pastel quartz
#

Hi all. How can I create a new team i.e. Bravo, spawn an AI-controlled soldier and assign it to that team please?

dusk gust
pastel quartz
dusk gust