#arma3_scripting

1 messages ยท Page 282 of 1

cerulean whale
#

It makes it look really thick if I make it black

#

*make the text black

halcyon crypt
#

ah no clue about that

#

try the shadow property I guess

#

shadow float optional shadow style: 0 = none (default), 1 = drop shadow, 2 = outline

#

is this The Daily WTF material or is there a question associated with it? ๐Ÿ˜›

ionic orchid
#

that's not the same thing

#

I think

#

it only makes one say it, then stops

jade abyss
#

@hasty violet Wouldn't a switch be better?

#
switch(true)do
{
    case (alive UnitCIV_W1) :    {UnitCIV_W1 say3D "Chanttwo";};
    case (alive UnitCIV_W2) :    {UnitCIV_W2 say3D "Chanttwo";};
    case (alive UnitCIV_W3) :    {UnitCIV_W3 say3D "Chanttwo";};
    case (alive UnitCIV_W4) :    {UnitCIV_W4 say3D "Chanttwo";};
    case (alive UnitCIV_W5) :    {UnitCIV_W5 say3D "Chanttwo";};
    case (alive UnitCIV_W6) :    {UnitCIV_W6 say3D "Chanttwo";};
    case (alive UnitCIV_W7) :    {UnitCIV_W7 say3D "Chanttwo";};
    case (alive UnitCIV_W8) :    {UnitCIV_W8 say3D "Chanttwo";};
};```
done in < 60s
#

๐Ÿ˜‰

#

But looks like ๐Ÿ’ฉ
๐Ÿ˜‚

#

+runtime difference of, erm.. 0.00Xms?

little eagle
#

Isn't this way less ugly

#define ALL_UNITS [UnitCIV_W1, UnitCIV_W2, UnitCIV_W3, UnitCIV_W4, UnitCIV_W5, UnitCIV_W6, UnitCIV_W7, UnitCIV_W8]

{
    if (alive _x) exitWith {
        _x say3D "Chanttwo";
    };
} forEach ALL_UNITS;

?

jade abyss
#

meh

#

+why define it? A simple

_ALL_UNITS = [UnitCIV_W1, UnitCIV_W2, UnitCIV_W3, UnitCIV_W4, UnitCIV_W5, UnitCIV_W6, UnitCIV_W7, UnitCIV_W8];

would do the same (or even put the Array directly after "forEach", when its not beeing used somewhere else )

halcyon crypt
#

some people need their macro fix ๐Ÿ˜› /jk

jade abyss
#

^^

cerulean whale
#

Anyone got an idea why my script is bypassing an exitWith statement (x2)... It gives me the debug message but doesn't exit....

#
{
        if (count (_x select 0) > (_x select 1)) exitWith { ["Error", "A field entered is too long", true] spawn H_fnc_Notifications; };
    } forEach _fields3;
dusk sage
#

Doesn't exit ๐Ÿ˜ฎ ?

#
{
    if (true) exitWith {};
} forEach xxx;
#

Works fine

austere granite
#

@little eagle I tried both a config entry and through ctrlSetFont and both have the exact same result

#

When commenting out the config line that chnages the font it works fine

austere granite
#

just a little heads up that this also happens on Esc menu, everything else is fine (Both vanilla and custom UI elements)

meager granite
#

_startMins and _startHours are defined in higher scope than setDate is

#

You can private them before condition

#

Or you can rewrite your condition so that declaration would be in same scope as setDate

#
_startMins = (if (!isNil "param_time") then {
    switch (param_time) do
    {
        case 0: { 38 };
        case 1: { 28 };
        case 2: { 18 };
    };
} else { 28 });
#

you might end up with nil _startMins if param_time is not 0 1 2 though, might want to add default into the switch just in case

#

If I just establish them outside of the if-then-switch-do entirely (essentially replacing the default conditions) would that fix it?
Yes it would work too

#

Basically if there was no private variable defined in earlier scope, it will be defined wherever you first assign it

jade abyss
#

Or just do it like that:

_startMins = 28;
if (!isNil "param_time") then {
    _startMins = switch (param_time) do
    {
        case 0: { 38 };
        case 1: { 28 };
        case 2: { 18 };
    };
};
...
...
setDate [2018, 11, 12, _startHours, _startMins];```
#

@hasty violet

#

^^

  • you also don't need that "else"
meager granite
#
_startMins = (switch(currentNamespace getVariable ["param_time", -1]) do {
        case 0: { 38 };
        case 1: { 28 };
        case 2: { 18 };
        default { 28 };
});
jade abyss
#

fuck it, yeah. Even better ^^

#

best possible way

jade abyss
#

Yeah, i will call you a wizard if you could change a Var with that GETVariable ๐Ÿ˜„

still forum
#
38-((currentNamespace getVariable ["param_time", 1])*10)

? ๐Ÿ˜„

jade abyss
#

๐Ÿ‡ซ ๐Ÿ‡บ ๐Ÿฆ„

cerulean whale
#

Is there a solution for setName in multiplayer?

thin pine
little eagle
#
currentNamespace getVariable 

???
wtf guys

thin pine
#

Hey maybe it's part of a super complicated system that dynamically cycles through parsing, profile, ui and mission namespaces with the same variable names ๐Ÿ˜†

little eagle
#

I'd say use param instead, but that errors out in scheduled environment, which some people use.

halcyon crypt
#

param errors out in scheduled?

still forum
#

in scheduled Nil is undefined. Undefined -> error
Scheduled
undefinedVariable param [0,1] -> error undefined
unschedules
undefinedVariable param [0,1] -> 1

halcyon crypt
#

but is it the fault of param or is it the fault of whoever wrote the call / spawn? I mean it's supposed to have some stuff passed in to it

tacit pebble
#

I've implemented a second HUD to my game. The first one shows the health of the player at the bottom of the screen. The second HUD displays the cash. They both automatically update once the values of each change. Both of the functions work however when I add the cash HUD to the bottom right of my screen the health bar dissapears. If I comment the cash HUD back out of the game then the health bar shows again, any ideas what I could be doing wrong?

dusk sage
#

Post the code you use to initialise them both

tacit pebble
#

core\init,sqf

[] call life_fnc_hudCashSetup;```
dusk sage
#

As in the very line that makes them appear

tacit pebble
#

fn_hudSetup.sqf

cutRsc ["playerHUD", "PLAIN", 2, false];

fn_hudCashSetup.sqf

cutRsc ["playerCashHUD", "PLAIN", 2, false];

#

That displays the resource defined in RscTitles in Description.ext. They are both the .hpp files which create the display

Description.ext

    #include "dialog\progress.hpp"
    #include "dialog\hud_nameTags.hpp"
    #include "dialog\hud_stats.hpp"
    #include "dialog\hud_moneyStats.hpp"
};```
#

Interesting right? They both work yet cann't have both displaying at the same time

#

๐Ÿ˜€ ๐Ÿ”ซ

still forum
#

@halcyon crypt Its the fault of the Engine.. Inside scheduled Nil is error inside unscheduled Nil is not error. Param is fine

restive matrix
#

Is it possible to create and setup properties/sync'd objects of an editor module at runtime?

dusk sage
#

@tacit pebble Try using the alternative syntax to cutRsc

"playerCashHUD" cutRsc ["playerCashHUD", "PLAIN", 2, false];```
#

So you're on different layers, not the same

tacit pebble
#

That makes sense! Hope is restored! I will try that brother fingers crossed

#

@dusk sage love you

dusk sage
#

๐Ÿ‘

thorny monolith
#

Is there a version of cursorTarget that returns a position array? I'm trying to use an addAction to create an object exactly where the player is looking (to place a flag on a cleared mine). I've tried screenToWorld but that just seems to place it at a random point on the screen regardless of what values i place in the array (screenToWorld [0.5,0.5], screenToWorld [0,0] etc)

little eagle
#

getPosASL cursorTarget
???

dusk sage
#

think he wants his mouse position

little eagle
#

I think he wants a lineIntersectSurface from 0.5,05 in view direction

thorny monolith
#

getPosASL cursorTarget doesn't throw an error (which is an improvement), but it's not creating the object either.

#

I'll try lineIntersectSurface

little eagle
#
#define MAX_DISTANCE 1000

private _unit = player;

private _intersects = lineIntersectsSurfaces [
    AGLToASL positionCameraToWorld [0, 0, 0],
    AGLToASL positionCameraToWorld [0, 0, MAX_DISTANCE],
    _unit, objNull,
    true, 1
];

_intersects param [0, [[0,0,0]]] select 0
#

???

thick oar
#

I just want express how awesome param is.

little eagle
#

Should report the position of the first collision with a FIRE or GEO LOD or the terrain one km max in view direction from the cameras origin.

#

Could replace _unit/player with cameraOn, so it works with Zeus. Also might collide with the vehicle you're sitting in otherwise

thorny monolith
#

Thanks for the responses all. @little eagle I'll try to take that apart with diag_logs so I understand what it's actually doing/how to use the output in a createvehicle

little eagle
#

The last expression just reports a position. That position can be used with createVehicle

#

You could put that whole thing in a function if you want to use it elsewhere.

jade abyss
#

@little eagle
again:
Why?
#define MAX_DISTANCE 1000
Do you have any particular reason to do that or just habbit?

little eagle
#

Magic numbers. They told me to put them in macros in headers or at the top of the file, so I do that.

dusk sage
#

It's common in C / C like languages

jade abyss
#

Hm, okayyyy

restive matrix
#

I'm trying out the following to automagically assign AI units to the headless client if it exists, any suggestions/improvements?

waitUntil {not (isNil "HeadlessClient");};

private _HC = owner "HeadlessClient";

["HC_addAllAI", "onEachFrame", {
    if (isPlayer || (_x in units group _HC)) exitWith {};
    if (isNull _HC) exitWith {};

    {
      _x setGroupOwner _HC;
    } forEach allUnits;
}] call BIS_fnc_addStackedEventHandler;
#

going to end up staggering it a bit so its not each frame but not sure what else to improve

still forum
#

_HC is a local variable. That will not exist inside the EventHandler
Check isNull _HC before in units group _HC for performance reasons.
also in _x in units group _HC _x is undefined
also isPlayer needs an argument
In short.. 90% of your code is an error/wrong

little eagle
#

Pass _HC as variable and check _this in the scope of the event handler

restive matrix
#

yeah woops, thats what I get for copying from the forum

#

good spots, cleaning it up

little eagle
#

Also, this OEF handler is strange. it never stops

#

Like, it does literally setGroupOwner every frame

#

wtf

native hemlock
#

A little aggressive to say the least

little eagle
#

And pointless too

thorny monolith
#

Sorry me again, I've been playing around with just createVehicle at the players position. Running this:

'FlagSmall_F' createVehicle (getPosATL player);
sleep 0.05;
};```

results in the objects getting placed in a radius around the player rather than at the player position itself? Is it collision avoidance? 

https://www.youtube.com/watch?v=-j6zGz7NOEY
still forum
thorny monolith
#

doh, missed that

little eagle
#

Use createVehicle ARRAY to avoid this

#

the other command with the same name

still forum
#

createVehicle will almost never create the Vehicle at the location you tell it to. Always use setPos... or.. that

little eagle
#

It's on the wiki

thorny monolith
#

oh that's much more fun

#

get taken on a little flag ride

thick oar
#

Also avoid [0,0,0] as initial spawn location.

1.) Other stuff may already happen there
2.) According to Suma its a crazy land and full of weird engine stuff already happens there, so avoid.

thorny monolith
#

all the fun happens on null island

rotund cypress
#

what does ATL stand for? As in getPosATL

little eagle
#

"Above the land"

#

or

#

"Above terrain level"

rotund cypress
#

Aah ok thanks

weak obsidian
#

Short Q: I am creating a guard point with CreateGuardedPoint per script - what is the right way to delete it? Deletevehicle like with triggers?

half moth
#

Hey guys having abit of a problem. I'm trying to have a script run that will remove all gear, uniforms, weapons, ect from a player at spawn. In the initPlayerLocal.sqf I have null = [this] execVM "emptyloadout.sqf"; In the emptyloadout.sqf itself I have "waitUntil {!isNull player};

_unit = _this select 0;

removeAllWeapons this;
removeallassigneditems this;
removeuniform this;
removevest this;
removebackpack this;

if(true) exitWith{};

#

any ideas?

little eagle
#

initPlayerLocal passes the player object in _this

#

params ["_unit", "_isJIP"];

#

then just pass _unit instead of this to your loadout script

weak obsidian
#

@quicksilver how else do I create a "guarded by" trigger?

peak plover
#

Is it ok to use perFramehandeler instead of while?

civic maple
#

I think while is faster

half moth
#

thanks guys I'll give that a try

#

Thanks again, looks like it is working. Doing it this way I shouldn't have any JIP issues correct?

blissful fractal
#

Hi bois and girls. Im further developing on David's HUD script from altisliferpg.com. I had made it different form his but he is still the owner of the structure. I had implentent FPS in the system. The thing here I want to ask you guys is that the fps thing take the first fps value from the game when its gets called. Everytime the HUD update. The hole HUD update. How do i make a function that update my fps, health, thrist, hunger, cash, bank and players without the hole HUD need to blink when updating? Do you guys have a toturial I can learn or some exsamples ๐Ÿ˜ƒ I do not what it hand over. You can see the code her. http://pastebin.com/gv8gYzm7

restive matrix
#

anyone know whats up with units randomly losing their loadout after they are assigned to a headless client?

civic maple
#

no clue, but I've seen it several times myself

indigo snow
#

is the HC running the correct mods?

polar folio
#

you can use per frame handlers all day as long as you make sure you don't do it in a bad way. remember you are putting stuff into each frame. it's very powerful but also has bigger consequences, if your code is slow. also make sure you have a way to suspend things, as in, use time stamps to actually not do stuff EVERY frame unless you really need/want it to.

check this out. haven't used it myself but it might make use of perframe stuff: https://community.bistudio.com/wiki/BIS_fnc_loop

dusk sage
#

@blissful fractal Control the element from another function?

#

Also that file man

#

Jesus

blissful fractal
#

exsample that is what I thought too. But how to make it that is the think I do not know

#

yup xD

#

Thanks Badbenson I will take a look ๐Ÿ˜ƒ

dusk sage
#

Get the display -> displayCtrl, ctrlSetStructuredText (on the control). The file does all this already, but for every control

#

Just abstract that logic to just one

#

I don't think he was replying to you

blissful fractal
#

oh ๐Ÿ˜„

cerulean whale
#

Hey, how would one set a picture using CT_ACTIVETEXT? I do ```SQF
picture="textures\radio.paa";

#

but that doesn't work

#
picture[] = {"textures\radio.paa"};
``` doesn't work either
#

hmmm

blissful fractal
#

Well my coding experience is not create when we come to .hpp files ๐Ÿ˜„ But what about

#

text = "textures\DanskLifeStudioIcon.paa";

#

That is what I use for logo ๐Ÿ˜ƒ

cerulean whale
#

That's for RscText, not CT_ACTIVETEXT

restive matrix
#

@indigo snow Yeah, HC is running a copy of the server's mods

blissful fractal
#

Oh well now Ik that ๐Ÿ˜„

blissful fractal
#

like this?

#

_fps ctrlSetText format["%1", round diag_fps];

rotund cypress
#

Hi guys, is there a way for a progress bar to go vertical instead of horizontal?

cerulean whale
#

Anyone got an idea about how to set a picture to CT_Activetext?

rotund cypress
#

style = ST_PICTURE;

#

use rscactivetext

#

and ST_PICTURE

cerulean whale
#

so ST_Picture = "dir"; and STYLE = ST_PICTUR?

#

sigh, I can't spell

rotund cypress
#

yes

#

#define ST_Picture 0x30

#

Put that on top of hpp

turbid thunder
#

Is there a way to get the DISPLAY NAME of a certain vehicle / unit? I'm not talking about the variable name, but display name as in like, the name you would see when placing down a vehicle, like "Hunter (HMG)"?

#

@hasty violet What was your idea?

#

Ok. How many poor AI's died in the process of trying that?

jade abyss
#

@turbid thunder

_Typename = typeOf cursorTarget;
_Obj_Name = getText(configfile >> "CfgVehicles" >> _Typename >> "displayname");
systemchat str _Obj_Name;```
turbid thunder
#

@jade abyss Thank you ๐Ÿ˜„ Thought it had something to do with getting the infos from the configs, but I literally never did that before

jade abyss
#

And if you want the EditorPreviewPic:
_Pic = getText(configfile >> "CfgVehicles" >> _Typename >> "editorPreview");

#

(just had some old files open)

rancid ruin
#
Error Reserved variable in expression
#

what reserved variable names are there other than "setAttributes"?

indigo snow
#

All commands, to start with

rancid ruin
#

ah, should've checked

#

setAttributes is a strange name for a command which returns a structured text

halcyon crypt
#

test for a specific sound config?

thin pine
#

@tough abyss why no check for patches?

#

Why would you need a different way is what I wonder :P

#

If you need an expensive way, i believe the command activatedAddons returns pbo names

#

With lots of mods that array becomes huge tho

#

But technically you can check if a jsrs pbo exists in that array

#

But marcels way is faster :)

velvet merlin
jade abyss
#

gg ๐Ÿ˜„

tough abyss
#

starting to think you are stalking kk edits on the biki. but nice change

turbid thunder
#

@velvet merlin A welcome change especially because rabbits arent synced anyways and sometimes cause LOCKED doors to magically open

halcyon crypt
#

is KK part of BI now or is he still a modder/external?

little eagle
#

KK edits on the wiki are a faster and more reliable alternative to reading the actual (dev branch) changelogs.

tough abyss
#

Does anyone know how to change the background colour of an RscListNBox ? This is what I have for it

{
    style = 16;
    type = 102;
    shadow = 0;
    font = "RobotoCondensed";
    sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
    color[] = {0.95,0.95,0.95,1};
    colorText[] = {1,1,1,1.0};
    colorDisabled[] = {1,1,1,0.25};
    colorScrollbar[] = {0.95,0.95,0.95,1};
    colorSelect[] = {0,0,0,1};
    colorSelect2[] = {0,0,0,1};
    colorSelectBackground[] = {0.8,0.8,0.8,1};
    colorSelectBackground2[] = {1,1,1,0.5};
    colorPicture[] = {1,1,1,1};
    colorPictureSelected[] = {1,1,1,1};
        colorPictureDisabled[] = {1,1,1,1};
    soundSelect[] = {"",0.1,1};
    soundExpand[] = {"",0.1,1};
    soundCollapse[] = {"",0.1,1};
    period = 1.2;
    maxHistoryDelay = 0.5;
    autoScrollSpeed = -1;
    autoScrollDelay = 5;
    autoScrollRewind = 0;
    class ListScrollBar: Life_RscScrollBar{};
    class ScrollBar: Life_RscScrollBar{};
};
thin pine
#

@tough abyss so...which ones of the color properties have you tried?

tough abyss
#

Is it possible to change the XY WH of a dialog built in hpp through sqf?

halcyon crypt
#

yes

#

ctrlPosition

tough abyss
#

Thank you

vague hull
#

love the new call extension syntax
but hows the 64bit naming convention for shared librarys on linux

myExtension_x64.so or myExtension_x64?

halcyon crypt
#

it doesn't look at the extension (for choosing between x86 and x64 anyway)

#

so both I guess ๐Ÿ˜›

little eagle
#

Linux has no x64 Arma branch, because there is no port so far

halcyon crypt
#

and that

tough abyss
#

Linux will have 64bit version, arma just doesnt do a public dev branch for it.
And yeah it will be xxxxxxxx_x64.so

little eagle
#

I doubt anyone has even begun porting these changes to Linux.

steel mantle
#

on static turrets, is it possible with making of mods to create like a optic you can put on a static turret when its alredy ingame and placed down?

little eagle
#

You mean just like you would do with rifles?

steel mantle
#

yes

little eagle
#

No

steel mantle
#

what about gun seperate and then you have a script that attach the gun to the turrent base? like mounting the gun you have in your hand to the static turret base

little eagle
#

You would have to replace the whole model of the static weapon.

#

The whole object. Because changing the available optics is not supported by SQF.

steel mantle
#

Okay thanks

#

is there any other method to do this?

little eagle
#

No

#

I mean. Maybe someone can come up with an ugly work around, but I don't see it.

steel mantle
#

what about in atributes when you place down the static turret in 3EDEN you got a option in there to add a optic to it?

little eagle
#

You would have to replace the whole model of the static weapon.

#

Might as well just make two different objects at that point. Because that would be easier to use.

steel mantle
#

okay thanks

vague hull
#

@tough abyss thx for the answer :)

tough abyss
#

Hi!

#

Tip that everyone knows: enableSimulation false does magic with fps. Setting it to 500 zombies make server fps still 50... OOOOoohooohooOOOHOHoohooooooohHHh,....!

turbid thunder
#

@Donnovan#6284 And disables zombies aswell

#

FFS tagging why u no work

open vigil
#

Because he's not online

turbid thunder
#

Oh, wait that matters? I thought you could tag anyways and they'd be notified upon returning :/

open vigil
#

They will. It just does not highlight blue when they're not online.

turbid thunder
#

Oh, ok then

dusk sage
#

It's a bug @turbid thunder

#

It highlights offline people

cerulean whale
#

Anyone got an idea when I do isNil for a variable that is nil it doesn't return anything? ```SQF
player setVariable ["Test",nil];

test = isNil (player getVariable "Test")
Test doesn't even respond, however if I do it asSQF
player setVariable ["Test, ""];

#

I'm going to check if ```SQF test = isNil str (player getVariable "Test")

#

works

turbid thunder
#

Because isNil requires a STRING

cerulean whale
#

Ye, that will work then

turbid thunder
#

isNil "player getVariable 'test'" That works too

#

@cerulean whale Did you know that getVariable also has a syntax for a default return value? varspace getVariable [name, defaultValue]

cerulean whale
#

I thought it would but didn't really look into it

#

just realised this won't work because the object I am testing on is configurated

#

just a p3d

#

but I have a workaround

still forum
#

isNil "player getVariable 'test'" No thta doesn't work. isNil "test" is the correct way

indigo snow
#

The second is definitively doing something else

turbid thunder
indigo snow
#

isNil {player getVariable "test"} would work too but using the default variable is better in the end

still forum
#

Oooh.. Overlooked the player

turbid thunder
#

@indigo snow Ahhh, now I get the "Code" syntax requirement

#

But true, default variables have made everything so much easier

indigo snow
#

It calls the code and sees it it returns nil

turbid thunder
#

Never thought about the brackets myself though

still forum
#

Never knew isNil can have code in "" Wiki is saying nothing about that

indigo snow
#

isNil {hint "hi"; a = time + 1; nil}

#

{} is a CODE type in arma, SQS used to put it all in quotes instead iirc

#

Pretty sure thats why some commands have the code as strings instead of in code blocks

#

fnc_a = { hint str damage player }; a = isNil fnc_a < cant always check if functions are undefined with isNil

peak plover
#

What's the easy way to understand ace QGVAR

#

Q is qoutes obviously

civic maple
#

GVAR is Global VARiable

peak plover
#

Soo... for captives module QGVAR is ACE_captives_isHandCuffed

civic maple
#

wait, is QGVAR assigned to the value of ACE_captives_isHandCuffed?

peak plover
#

_unit getVariable [QGVAR(isHandcuffed), false]

#

_unit getVariable ["ACE_captives_isHandcuffed",false]

#

Correct?

civic maple
#

yes

peak plover
#

there should exist an app to translate ace into english

turbid thunder
#

ACE is english

dusk sage
#

I think that was sarcasm

#

but nvm

peak plover
#

In today's post-post Ironic era it's hard to tell the differnece...

jade abyss
#

REALY HARD

peak plover
#

Anyhow. How do I save all the variables in ace for persistance. I'm stuck at the medical

civic maple
#

what type of persistance?

peak plover
#

If someone's game crashes or he gets disconnected whatever. He must rejoin, if he was bleeding prior to this, I wish him to continue bleeding.

jade abyss
#

gather every Variable Names and store it in missionNameSpace with his GUID.
When he connects in -> Update his Vars (i guess they are client side) by just sending them over with remoteExecCall (quickest/dirtiest/fastest/easiest Version)

peak plover
#

Ohh I got that part figured out

civic maple
#

I thought missionNamespace was local to the client, I'm probably wrong though

peak plover
#

I just need to know if there's a function to gather the needed values, or should I just sniff through ace code

jade abyss
#

missionNameSpace setVariable ["VarName", "BlaStuff", true]; = global/JIP

civic maple
#

ah, thank you

willow basin
#

Uhm, really great that ArmA 3supports hyperlinks in hint messages . But how is the user supposed to click on them? xD any hints how to open a website? else i'll just make a workaround via callExtension ^^

rancid ruin
#

you can whitelist URLs in cfg and then use a dialog to open those URLs

#

but i'm not sure it works in MP

#

either way you're never gonna be able to click a hint. start testing dialogs

willow basin
#

Yea, I already use as that for job descriptions. But htmlLoad can't handle more complex HTML which is why I'm asking if I cant open it in webbrowser somehow ^^

rancid ruin
#

i doubt it

#

think of the security issues if any mission maker could make people open websites

willow basin
#

well yea, there could be something like a confirmation request or via steam browser ^^ but then I'll probably have no other option than to force it via callExtension, of course only with users approval ๐Ÿ˜‰

#

yet thanks for your help ๐Ÿ˜ƒ

rancid ruin
#

what are htmlLoad's limitations anyway? i've never used it

#

do you mean it doesn't load all HTML tags or what?

willow basin
#

htmlLoad only seems to accept the very-very basics like headers (h1,h2,h3..) or paragraphs (p-Tag). tables are broken. Things like hr or divs are not even displayed for me ^^ but I even need forms which is just too much for htmlLoad. Something like the linked pages on https://armitxes.net/api/a3/jobs/_webIndex would work with htmlLoad but nothing else.

little eagle
#

@still forum

Never knew isNil can have code in "" Wiki is saying nothing about that
It can't. It searches for a variable name that looks like code instead. Which could be used with missionNamespace s/getVariable

cedar kindle
#

if it's not there then check ace3 macros

vague hull
#

anybody had problems arma not loading an extension as soon as it trys to mysql_init()?
if I comment that line out it will load the dll just fine

tough abyss
#

Thats question is prob better off asking in tool makers.
Also you should consider making a program to load dlls for testing with
Plus you havent given any code and mentioned which mysql connector library you are using etc
So basically not enough info to help you with your problem

#

But chances are you didnt take into account mysql_init is not thread safe when it auto inits the library.

vague hull
#

ok, I will write on over there

royal abyss
#

anyone here?

#

im looking at a script atm. and it has a "duration" set to 9999999999999... isnt it possible to set it to -1 or something?

meager granite
#

at config you mean

#

and no, you have to have positive number

little eagle
#

Just use the scientific notation and write 1e10 if you dislike the eye cancer that is writing eight nines consecutively.

#

That equals over 300 years, so it basically is infinite for our purposes.

warped moon
#

Quick question, when a mod that has 4 different PBOs inside of it, players download the mod trough A3L, and the mod initiates every single PBO on joining, is there any way we can disable it trough initplayerlocal? :]

tough abyss
#

Nope

warped moon
#

Any way?? ๐Ÿ˜ƒ

#

(I mean disable certain PBOs that come with the mod (different features))

tough abyss
#

Ask the addon creator(s) to add that feature in.

warped moon
#

His words: "not my problem"

#

so yea

tough abyss
#

Whats the addon am curious now

warped moon
#

PM

halcyon crypt
#

don't PM, it's good to "shame" such modders ๐Ÿ˜›

warped moon
#

its not to shame him, it's his decision in the end... :/

halcyon crypt
#

shame was the wrong word ๐Ÿ˜ƒ

warped moon
#

haha :p

#

Ah well, he said he was going to separate the mod features, in different mods, in his next update. I asked this 2 months ago, I guess it won't be happening soon. I'll just disable it then, thanks for the help โค

warped moon
#

Another quick question for the gods here, is there any way where I can disable the "F" key when people are in vehicles? :]

young current
#

would you like to disable F or the action it performs?

#

And also what action it does on your keybinds

warped moon
#

oh just an annoying menu that comes with the "enhanced movement" mod. There's no way to disable it so yea.. The F key is tied to a function, I'm guessing, If I could disable that only, would be way better

young current
#

Don't know how to do that other than editing the mod itself if it already overwrites the key.

#

but that has its issues too

#

you should ask the mod author

warped moon
#

yea ๐Ÿ˜› Thought so.. feelsbadman ^^

young current
#

cant you just not press F when you use the mod though?

#

or do you need it for something else

hallow timber
#

Is there not a menu when you press escape that enables you to rebind the keys

young current
#

if its a modded key it might be scripted in and not in the keybinds

halcyon crypt
#

yeah it should be an option in the EM settings

hallow timber
#

Yeah the option isn't in the controls section, there is a window to the right side of the screen when you press escape with the settings for EM

still forum
#

@warped moon Enhanced Movement will get an update in a few weeks. I've been working with the Author to do performance improvements.
And AFAIK you can disable any hotkey in EM
I know the F key.. And I just unbound it or bound it to a key I never use... No problem whatsoever

young current
#

there you go then!

warped moon
#

@still forum yea Ive talked to him too, was just wondering if there was a way around it. Since people are abusing it atm ๐Ÿ˜› ^^

still forum
#

You should be able to disable the key with a script. I'm currently running EM beta I don't have the latest release version right now to look up how to do scripts

warped moon
#

could u help me with that? ๐Ÿ˜ƒ

still forum
#

ugh... yeah... 5 min

warped moon
#

thanks bud

young current
#

@warped moon as Im not familiar with EM myself what kind of abuse you're talking about?

still forum
#

Okey.. No sorry.. The code is so bad you can't remove the key handlers without editing the clientside Mods pbo.
So you have to wait for next EM release which will be soon anyway

warped moon
#

haha okay thanks for letting me know ๐Ÿ˜ƒ

still forum
#

You could detect if players have the interaction part of his Mod loaded and kick them if they do.
Maybe but It may be a little complicated to get that fully working

halcyon crypt
#

can't you constantly overwrite the variable that EM tests for the key? ๐Ÿ˜›

still forum
#

Keyhandler is called every Frame. You would have to remove it after the keyDown eventhandler and before the next Frame...

warped moon
#

true @still forum it's just annoying that it CAME WITH the mod in the first place :/

#

I know servers who disabled it though @still forum but I don't know how, sadly

halcyon crypt
#

@still forum I meant the variable that gets set by the settings menu thing

warped moon
#

@still forum I've gotten to the point where I could both "disable" the menu and the actionmenu, but when a user presses F, it kicks him out of a locked vehicle either way. Thats only EM mod that is causing it.
Commands used:
waituntil {!isNil "babe_int_init"};
["EH_action"] call babe_core_fnc_removeEH;
["EH_ModMenu"] call babe_core_fnc_removeEH;

still forum
#

profilenamespace setVariable ["babe_int_b1",[[0],"babe_int_fnc_use","[]"]] //Use
profilenamespace setVariable ["babe_int_b2",[[0],"babe_int_fnc_self","[]"]] //Selfinteraction

This should overwrite the hotkeys with key 0. But will also save it in the players settings

warped moon
#

okay cool, ill try that

scarlet spoke
#

When defining a macro over multiple lines do I have to use <space>\ as a line delimiter or is a simple \ sufficient?

little eagle
#

no space needed. \ just escapes the newline

scarlet spoke
#

Okay then the wiki is misleading ^^

#

Thank you! ๐Ÿ˜ƒ

#

Is that a "new" behaviour since ArmA 3 or has it been in th game for longer?

little eagle
#

wiki?

scarlet spoke
#

I will correct it but I need to know whether I have to add an annotation that this is only since ArmA 3 or not

little eagle
#

shrug. You don't need a space.

scarlet spoke
#

๐Ÿ™ƒ

indigo snow
#

the wiki itself shows it's not needed on that first #define line ๐Ÿ˜›

scarlet spoke
#

Yeah I just edited it ๐Ÿ˜„

#

It no longer states that a space is needed either ๐Ÿ˜›

#

Oh and while we're still at it... can I start a preprocessor somewhere later in a line? Something like that: <SomeStuffInHere> #define myMacro?

still forum
#

No.. It detects preproc macros by scanning for a # at the start of the line

scarlet spoke
#

Okay thank you

little eagle
#

SQF preprocessor is advanced enough so you can have whitespace before the #. It doesn't have to be the first char in the line.

still forum
#

I guess thats just because the preprocessor is skipping any spaces anyway.
Yeah It's skipping all whitespaces before the #

#

whitespaces being any character <0x21

little eagle
#

That's what it does, but that is not true for every preprocessor as I was taught.

still forum
#

Yeah.... Yeah.. There are preprocessors that do stuff differently.. also heard that

little eagle
#

It's good to know the differences, in case someone asks why you can do X in Arma when you can't do it elsewhere or vice versa.

#

To that one guy that had problems with animate in MP

#

Fixed: The "animate" parameter of the animateSource script command was not correctly passed to remote clients

shadow sapphire
#

Is there a script version of enhanced movement?

#

Also, does anyone here know how to create a waypoint based on another unit's waypoint??

#

@TAG me if you have anything for me. Thanks! I'm getting back to it in the mean time.

scarlet spoke
indigo snow
#

thats pretty normal

ionic orchid
#

you can do...

newArr = oldArr - [valueToRemove];

...I think

shadow sapphire
#

@scarlet spoke, thanks a ton! Will try now!

willow pike
#

Is there a way to findout if a vehicle is Blufor, Opfor, .. when empty?

#

even complicated ones are okay.

jade abyss
#

When empty -> Civilian

#

always

#

What you can try is:
attach a Variable to the Car with the Side on it.

willow pike
#

getNumber (configFile >> "CfgVehicles" >> (typeOf _veh) >> "side");

#

works well. ๐Ÿ˜ƒ

#

Was just going to post it.

jade abyss
#

sure sure.
but (side _veh) when empty = civilian

willow pike
#

0 = EAST
1 = west
2 = INDEPENDENT
3 = CIVILIAN

#

What I wanted to know is what side it usually is on when empty.

jade abyss
#

Then write it next time ๐Ÿ˜›

#

But yeah, getting the cfg might be the best way

willow pike
#

--Is there a way to findout if a vehicle is Blufor, Opfor, .. when empty?

#

I think it stands there pretty clear.

jade abyss
#

If you handle with so many beginners for certain amount of time... you just think basic (wich would be the Command "side").

willow pike
#

Sure. ๐Ÿ˜ƒ

hallow spear
#

anyone know how to create an effect similar to setLightUseFlare that works in the daylight? perfect at night, not seen during the day. I've played with particle effects, but cant get a similar effect yet

shadow sapphire
#

@hallow spear! What's up, brother??

#

How can I make this work?

[group _G1, getPos this, 1000] call BIS_fnc_taskPatrol;```
shadow sapphire
#

@tough abyss, rats! I should have checked here sooner, haha. I already figured it out. Thanks so much, though!

#

Oh... why do you have the parenthesis, though? I did it without them and it works fine. Is it better to have them anyway?

civic maple
#

good habit

#

makes it easier to read

little eagle
#

remove them. makes it easier to read

#

: P

shadow sapphire
#

Haha

#

How might I create an offset for copywaypoints?

#

I'm trying to get AI to move in more secure platoon formations, instead of running around on top of each other or thousands of meters away from each other.

little eagle
#

origin getPos [distance, heading]

shadow sapphire
#

Origin?

little eagle
#

A position or object

#
Syntax:
origin getPos [distance, heading]         (Since Arma 3 v1.55.133361)
Parameters:
    origin: Object, Position2D or Position3D

    [distance, heading]: Array
    distance: Number - distance from position
    heading: Number - in which compass direction

Return Value:
    Array - format [x,y,z], where z is land surface in format PositionAGL
shadow sapphire
#

So in this context:

_G2 = [(getMarkerPos "M1"), EAST, ["O_Soldier_SL_F","O_Soldier_TL_F","O_Soldier_F","O_Soldier_F","O_Soldier_AR_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
{_x execVM "Gear\FN_centralRed.sqf";} forEach units _G2;
_G2 copyWaypoints _G1;```
#

May I have a link to that page?

little eagle
civic maple
#

protip, type sqf after the three backticks

shadow sapphire
#

Oh. I know getpos.

civic maple
#

that enables syntax highlightning

little eagle
#

Check under alternative syntax

#

There are 2 getPos commands

civic maple
#

after the first three backticks

#

not the last ones

#

gimme a sec

#
_G2 = [(getMarkerPos "M1"), EAST, ["O_Soldier_SL_F","O_Soldier_TL_F","O_Soldier_F","O_Soldier_F","O_Soldier_AR_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
{_x execVM "Gear\FN_centralRed.sqf";} forEach units _G2;
_G2 copyWaypoints _G1;
#

so you do three backticks, and then sqf, and then new line

#

then code, then new line, and then three backticks

shadow sapphire
#

Wow! That's neat!

civic maple
#

yup

little eagle
#

If you just use copyWaypoints, then you have to retroactively iterate through the waypoints of the second group and you have to move each of them.

shadow sapphire
#

I see.

#

Hmm...

#

Maybe I'll come back to that and just stick with sleeping thirty seconds between groups for now.

little eagle
#

Doesn't sound too hard tbh. Like 5 lines.

shadow sapphire
#

But I'm VERY ignorant about this stuff, haha. Five lines in new territory for me would probably take five hours.

#

Especially because I want for the groups to maintain relative position as they move, so there would be some waiting and stuff in there that I don't think I grasp yet.

little eagle
#

searching the wiki for the needed commands...

#

_wPos = waypointPosition waypoint;
waypoint setWPPos _wPos;

#

waypoints groupName

#
{
    private _waypoint = _x;

    private _wpPosition = waypointPosition _waypoint;
    _wpPosition = _wpPosition getPos [90, 1000]; // move position 1000 meters east
    _waypoint setWPPos _wpPosition;
} forEach waypoints _group;
#

I think that's it? lol

shadow sapphire
#

Really now? I'll give it a shot!

#

Oh, wait. How do I use it?

little eagle
#

Idk. It moves all waypoints of _group 1000 meters to 90 (east)

shadow sapphire
#

Oh! Okay, so I replace group with the relevant group name. Got it.

little eagle
#

Yeah. They're variables. Can insert anything there. If it's a group, the game won't complain

#

usually

#

oh wait

#

origin getPos [distance, heading]

#

might have to switch around the 1000 meters and the 90

#

idk.

shadow sapphire
#

Yeah, had to switch them. This works quite well, but I fear that over time, it would get them all jumbled up again, since they don't maintain relative position or wait for each other.

little eagle
#

Yeah. That'd be more complicated

#

You mean that the individual groups maintain a "super formation" among each other, right?

#

Just like IRL

shadow sapphire
#

Haha, yeah, I mean a super formation @little eagle.

#

@tough abyss, I still think it would be sorta worth it, because if they are in an appropriate formation when they take contact, that's the important part.

#

Oh, I was thinking a platoon moving to contact.

#

Yours @tough abyss is more like a platoon deliberate attack, which is also something I'm working on!

#

And you're right, without disabling certain parts, a platoon attack with sub elements is not going to work well!

little eagle
#

The best thing I can come up with is having them wait at their individual waypoints until all groups have reached their equivalent waypoint.

shadow sapphire
#

That's pretty cool!

#

@little eagle, that would be my first move. Do you have any tips about how to get that to happen?

little eagle
#

waypoint setWaypointStatements [condition, statement]

shadow sapphire
#

@tough abyss, yeah, the disableAI stuff is a friggin treasure. Thanks to that, my community developer was able to write a break contact script for our AI. We won't have ridiculously high casualties on both sides now, because when they are beaten, they will leave!

little eagle
#

statement would set a variable to true and condition would check all the other ones of the other groups

shadow sapphire
#

@little eagle, and this would work with the copied waypoints?

little eagle
#

If you use arrays ...

#

It's very abstract, but simple if you know what you're doing.

tough abyss
#

May be a error: if you never used moveTo on a agent, if you use moveToCompleted on it, it must return true, not false.

shadow sapphire
#

Haha, "if you know what you are doing." That's not me, unfortunately. I'm not going to try to compel you to keep doing stuff for me, but as long as you're giving me help and attention, I'll take it!

little eagle
#

Yeah, I don't think anyone here besides QS knows what I mean.

shadow sapphire
#

@tough abyss, that's why you make it into a campaign featuring that stuff, haha.

little eagle
#

It would be a very elegant solution. I can see it already. But it wouldn't look like anything you find in a random mission. : P

shadow sapphire
#

We're doing that with our AI for our campaign sandbox. Dang... Where do you live @tough abyss? Too bad you're not in my community, I think you'd be very interested in some of the stuff we'be been working on.

#

We have support scripts that do some things like that. Are we allowed to link videos here?

jade abyss
#

NO!

#

Video bad!

#

Made by satan

shadow sapphire
#

@tough abyss, what are your moveto comments about?

jade abyss
#

BAD SATAN!

#

(of course can you post links to Vids, when it belongs to the topic ๐Ÿ˜„ )

shadow sapphire
#

I'll check it out!

tough abyss
#

@shadow sapphire its to move agents. Some logic wait for the agent to have **moveToCompleted _agnt ** as true to performe the next action. But before you use moveTo on the agent for the first time moveToCompleted return false, and its like if the agent if moving forever. I believe if you never used moveTo on an agent, moveToCompleted must return true, not because of my case, because its more logic.

shadow sapphire
#

@tough abyss, thanks for the explaination! That's all way over my head, though, haha. I'm... terrible.

tough abyss
#

@shadow sapphire no problem mate, thanks anyway!

shadow sapphire
#

Yeah, basically, we disable the mortar AI, then we make it where if any group leader from the mortar's side can see players and the AI can pin us down for a certain amount of time, they will start bracketting shots, when they land a shot close enough to the player position, then the next shot is a fire for effect with three rounds from each of the mortars in the group. That's the gist of it anyway.

#

It's a pretty convincing simulation of requesting indirect fire support. The mortars are usually very far from the fight.

#

Vanilla mortars are OP, haha.

#

We also disabled all of the therman and night vision optics on all vehicles and static weapons and we disable the artillery computer for our server.

#

We are working on ways to make everything as immersive and realistic as practical.

#

Haha, that's good, though! Motivation to break contact.

#

If your group isn't breaking contact at least some of the time, then you need to jack up the difficulty, I feel.

#

We are working on some very neat things in my community, but the problem is that to fully appreciate the stuff we are putting into it, we will need at least sixty active players and I have no idea how to go about that. Doesnt matter right now anyway, we haven't had a session in over six months, because we've just been in heavy development.

#

Haha, right. We don't need the players for testing so much.

civic maple
#

How big is your community?

shadow sapphire
#

@civic maple, right now? Hard to say. IDK who we will actually have retained through this development cycle. We were at low twenties every session, we've peaked at forty players one session, but that was rare. Most common was low twenties.

#

I think we'll have low teens who still are on board after our eight month break, haha.

civic maple
#

kk, my community currently has a bit too many people :/

#

"a few lines"

shadow sapphire
#

I'm building a website with search optimization and the like, so hopefully that will allow us to reach some potential recruits.

How does one have too many people?

civic maple
#

Well, we play with popular streamers, which create an influx of new people

#

we have usually 60-70 people per mission, and we play 2-3 missions per day

shadow sapphire
#

@tough abyss, it looks like you were working on something similar to what we are doing!

#

@civic maple, right now, I wouldn't be into that, but man... if I could tap those numbers when our project is ready to play, I'd be SO happy!

civic maple
#

well, if you need people for it, feel free to send me a PM

shadow sapphire
#

We play a rather serious scenario. We play persistent campaigns where AI think and act with strategic and tactical goals and who fight like humans (break contact, treat wounded, call for support). We also have a PR system where based on our relationship with the civilian AI, militia will spawn and be allies or enemies. We also have to handle our own logistics. AI deliver our logistics to our main operating base in theater, but players have to move it from there to our child bases. Speaking of bases, we have bases that players of sufficient rank can deploy or dismantle. The bases are where we can store our stuff and it's also where you log out and log in. If you die, then you are deployed back to the main base and the community suffers a penalty. Otherwise, whatever base you log out at will be the base you log in at.

#

@civic maple, it might be a few months before everything is cleared to go, but I'd love to tap you for human resources, if you think they'd be into it.

civic maple
#

yeah sure, if we're still a community at that point :P

shadow sapphire
#

Why wouldn't you be??

#

Thanks!

civic maple
#

We formed around 6 months ago, and there's been a bit of drama recently

shadow sapphire
#

OH, no!

#

That's really impressive that you have presumably over a hundred members and you only started six months ago. My community has never gotten close to that.

civic maple
#

We have around 400 members in total, but as I said, we've had big streamers playing with us

shadow sapphire
#

That's pretty friggin sweet.

willow pike
civic maple
#

roleDescription?

little eagle
#

What even does that do.

#

One thing you should know about roles. When switching to units placed in editor on the fly in MP, it could mess up the role of the player. Could be bug, could be intended, but I would not recommend doing this. Create new unit dynamically if you need to switch to. Anyway, if role of the unit is messed up so is roleDescription.

royal abyss
#

Commy2 thanks for your awnser from my question in the morning does the duration affect the performance?

#

and if so how big is it ?

#

lets say i make a script that needs to stay as long as a server period lets say 4 hours... would it be easyer to write 10e10 or 9999999 or go for the 14400 or type 144e100

turbid thunder
#
                _unit = _x select 0;
                hintsilent format ["%1",_unit];
                _string = _x select 1;
                _flaggy addAction [format ["Spawn as: %1",_string], {loadoutUnit = _unit;}];
            } foreach loadout_west_list;```
Apperently, ```_unit``` is undefined within the addAction code, but defined in the ```hintsilent format``` code. Anyone got an idea why and how to fix that?
thin pine
#

@turbid thunder try this
_flaggy addAction [format ["Spawn as: %1",_string], {loadoutUnit = _this select 3;},_unit];

#

the code block in addAction is in a separate scope (scheduled environment)

#

_unit isn't defined there

turbid thunder
#

that is, slightly confusing right now

thin pine
#

you can pass parameters to that scope/block using the third parameter of addAction (= arguments)

#

there are already 3 default parameters passed to that code block. _target, _caller and _id

#

the fourth parameter can be anything, whatever you fill in ๐Ÿ˜ƒ

turbid thunder
#

I see

thin pine
#

To make it easier for yourself, pretend that code block is a different SQF file that was execVM'ed

turbid thunder
#

So basically, I insert variables into the return array from addaction by simply typing them down at the end of the codeblock? Ok thx ๐Ÿ˜„ Didnt know one could do that

thin pine
#

if you want to pass multiple variables into the code block you'd need to put them in an array of course

turbid thunder
#

makes sense

thin pine
#

i.e.

#

_flaggy addAction [format ["Spawn as: %1",_string], {loadoutUnit = (_this select 3) select 0; potatoUnit = (_this select 3) select 1;},[_unit,_localPotato]];

turbid thunder
#

Poor potato

#

๐Ÿฅ”

#

Alright but in my case one variable will be surficiant

thin pine
#

๐Ÿ‘

little eagle
#

@royal abyss It makes no difference, but e100 might be too large and overflow (that is one hundred zeroes). No idea.

#

To make it easier for yourself, pretend that code block is a different SQF file that was execVM'ed
That is exactly what it is actually. A different script instance where local variables don't carry over.

royal abyss
#

hmm

#

so it depends

#

thanks for the info ๐Ÿ˜ƒ

leaden knoll
#

Hi everyone, I have a trigger that must fire for only certain vehicles, defined in an array, that moves into the trigger area. But the script must only execute once per vehicle and only on those that are entering the area for the first time. What would the activation code and condition code be? I have been trying for a while now without luck

leaden knoll
cerulean whale
#

You could just do if and in

leaden knoll
#

Yes I am going to vehArray in thisList and thrn a custom script to add and remove vehicle in execute array

little eagle
#

You cannot do vehArray in thisList, because in command can only search for elements inside an array. I think the best way would be something like this:
count (myTag_vehArray arrayIntersect thisList) > 0

scarlet spoke
#

Actually you can do vehArray in thislist but this will search for exactly this array inside of thisList and not for the components of vehArray ^^

little eagle
#

Yeah. You can do it, but it does not do what you think it does.

scarlet spoke
#

Yep

leaden knoll
#

@little eagle thanks yes, I quickly realised the error while testing. Just didnt bother correcting it here

shadow sapphire
#

Okay, could anyone help me turn the directions in this script from absolute directions to relative directions? I think the easiest way may be to grab the group leader's heading and use that, but I'm too ignorant to know where to start with that.

#
_G1 = [(getMarkerPos "M1"), EAST, ["O_Soldier_SL_F","O_Soldier_TL_F","O_Soldier_F","O_Soldier_F","O_Soldier_AR_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
{_x execVM "Gear\FN_centralRed.sqf";} forEach units _G1;
[_G1, getPos leader _G1, 500] call BIS_fnc_taskPatrol;

Sleep 30;

_G2 = [(getMarkerPos "M1"), EAST, ["O_Soldier_TL_F","O_Soldier_F","O_Soldier_F","O_Soldier_AR_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
{_x execVM "Gear\FN_centralRed.sqf";} forEach units _G2;
_G2 copyWaypoints _G1;

{private _waypoint = _x;
    private _wpPosition = waypointPosition _waypoint;
    _wpPosition = _wpPosition getPos [100, 90];
    _waypoint setWPPos _wpPosition;
} forEach waypoints _G2;

_G3 = [(getMarkerPos "M1"), EAST, ["O_Soldier_TL_F","O_Soldier_F","O_Soldier_F","O_Soldier_AR_F"],[],[],[],[],[],180] call BIS_fnc_spawnGroup;
{_x execVM "Gear\FN_centralRed.sqf";} forEach units _G3;
_G3 copyWaypoints _G1;

{private _waypoint = _x;
    private _wpPosition = waypointPosition _waypoint;
    _wpPosition = _wpPosition getPos [200, 270];
    _waypoint setWPPos _wpPosition;
} forEach waypoints _G3;```
round scroll
#

@shadow sapphire are you aware of the _obj getPos... syntax?

shadow sapphire
#

I am not.

round scroll
shadow sapphire
#

I mean, I think I'm using that here, but is there something more to it?

round scroll
#

no, that's the way to do relative positions imo

shadow sapphire
#

I am doing relative positions already.... I should have phrased my question differently.

indigo snow
#

_wpPosition getPos [200, 270]; replace the 270 with getDir leader _G1/2/3 (depending in which bit of code you replace it)

shadow sapphire
#

I need relative directions to plug into here.

#

Oh! @indigo snow got me already!

#

But what's the syntax for getDir leader _G1 +90?

#

You know what I'm talking about or no?

indigo snow
#

well what you put there would probably already work, if it errors do (getDir leader _G1) + 90

#

your only danger is that it takes the way the groupleader is facing and hes not guaranteed to be facing exactly along his axis of travel

#

so grabbing the relative dir between current pos and next WP pos might work better

shadow sapphire
#

Yeah... I know.... but I'm not good enough to know a better way.

#

Oh? Would you have any links or tips on where to start with that?

indigo snow
#

yea this command

#

im back to studying now tho, good luck with it

shadow sapphire
#

Okay!

round scroll
#

how do you get the position of a waypoint?

indigo snow
#

in your script, _wpPosition should be the position of the next waypoint

shadow sapphire
#

Thanks a ton! I think this is what I needed!

noble juniper
#

since when can you only fail once with loading something through loadfile or preprocess.. ?

I trying to figure out if i can preProcess a config.cpp correcty, and i can't load anything, and after the first "not found " error Mesaage i don't get any reaction from the "load" commands.

i need to relaod the world to fix it and even then it only works once.

And my test file is in the arma root folder.
so .. loadFile "bla.sqf"; = file not found !
same for "/bla.sqf","\bla.sqf";

little eagle
#

It fails every time, but you get the pop up only once.

noble juniper
#

ok

little eagle
#

once per session.

noble juniper
#

doesen't feel like it but ok.

#

how about the file and path ?

#

i mean root and bla.sqf

little eagle
#

loadFile reports "" if there is no file under that path

noble juniper
#

but root folder ?

little eagle
#

Are you doing this for a mission?

noble juniper
#

mod

little eagle
#

wait

#

no slash searches:

  • mission folder
    if nothing found
  • arma root folder
noble juniper
#

thats what i thought .

little eagle
#

It should be the same paths as you have with textures, models

noble juniper
#

bla = loadFile "bla.sqf";

#

bla.sqf is in the arma 3 root folder.

#

it contains something

#

sqf should be allowed to be loaded

little eagle
#

Is bla.sqf just a file in root? You need to enable filePatching to load unbinarized files.

noble juniper
#

thx

#

that is probably the reason

#

yes it was -...-

#

lol

#

my test config contained includes... bb arma ....

tough abyss
#

Strange: if agents get stuck, if i minimize and then return to the game, they unstuck.

halcyon crypt
#

the scripting stuff slows down when A3 isn't in focus

#

probably related

tough abyss
#

@halcyon crypt i believe the command doWatch have priority over moveTo on the agents.

#

So the agent preffer to keep watching instead to move.

#

(confirming this now)

#

But strangely when i minimize, they stop to watch.

spring dune
#

Heya there

#

Guys, how I can make checker by uniform class?

#

Nah, other way...

#

I have 8 SSIs (arm patches)

#

For different &a common uniform types

#

So, they ' re running locally

little eagle
#

"checker by uniform class"
???

spring dune
#

Yup, something like dat

#

If OCP then load ocp ssi

#

If BDU then BDU

little eagle
#

one patch per uniform class?

spring dune
#

If no one from list, load default (rebellion) full colored

little eagle
#

Is this for a mission?

spring dune
#

It's local yup

little eagle
#

And you want to assign those insignias on unit spawn?

spring dune
#

Doesn't matter for my or so, script will work locally

#

Yup, for each playable

little eagle
#

Oh, only for players

#

Would use
initPlayerLocal.sqf
for that

spring dune
#

For mp or sp ***

little eagle
#

Sure. initPlayerLocal.sqf works in SP, MP

spring dune
#

The issue not in loading structure

little eagle
#

That is the first thing I think about when doing stuff

spring dune
#

Well I just can't figure out how that language works.

#

)))))

little eagle
#

SQF?

spring dune
#

Maybe u have any suggestions?! Logically - one holder will be loaded if uniform class doesn't match with any listed and if equal then load right SSI img

little eagle
#

I have no idea what that sentence means lol

#

SSI ???

spring dune
#

My weird English sorry

#

Shoulder sleeve insignia

little eagle
spring dune
#

Well u was right it's a checker by uniform class. Ty for basics but that's not what I really searching for. ๐Ÿ˜† maybe u have any ideas how to wright it?!

#

R

tough abyss
#

@halcyon crypt found the problem was a but on my part.

little eagle
#

maybe u have any ideas how to wright it?!
A bunch of if's?

#

or a switch?

#

I don't see the problem

spring dune
#

A bunch of if's

#

Can't imagine switch way, but I understand ur suggestion

#

Difference between our exp , u don't see but I see. ๐Ÿ˜†

#

Ty anyway

blissful fractal
#

Hi bois, I got this code. I know that the left position in x is x = 0
But what is the value for the right side ๐Ÿ˜ƒ

#

type=CT_STRUCTURED_TEXT;
idc=13371;
style=ST_LEFT;
x = 0.01 * safezoneW + safezoneX;
y = 0.700 * safezoneH + safezoneY;
w = 0.55;
h = 0.11;
valign = "left";
sizeEx=0.035;
size=0.035;
font="PuristaMedium";
colorBackground[]={0,0,255,0.6};
colorText[] = { 1 , 1 , 1 , 1 };
shadow=false;
text="";

indigo snow
#

x+w

blissful fractal
#

Well w means how width it is. But I want to move the class to the right side of the screen instead the left side.

#

So for I can do that I need to know the vaule for x and when I know that I need to take the x - w ๐Ÿ˜ƒ

#

Or I'm wrong?

static spire
#

got a super duper noob question for yall

#

so right

#

how do i filter stuff inside an array

#

like if i have an array of stuff in a trigger area

#

and i want just the vehicles from that array

#

is there some sort of way of going vehicles in airfieldObjects

#

etc

civic maple
#

What exactly does setWindForce do?

#

because I set it to 7200 setWindForce 0.8;, and the wind is fucking insane

#

@static spire ```sqf
_array select { _x isKindOf "AllVehicles"; };

#

should work

static spire
#

@civic maple not really what i needed, but i got it working anyway. cheers.

civic maple
#

kk

cerulean whale
#

Is there a way to attach an object to another object but keep it in it's current position?

native hemlock
little eagle
#

object1 attachTo [object2]

#

if you set not offset and mempoint, it will attach with the current offset

cerulean whale
#

Oh ok, I was trying worldToModel earlier however it always inverted the sides (I figured thaat out but commy's method is easier). Thanks for the help

#

Is there also a way to maintain direction? I tried getDir and setDir but that didn't work

#

I got getRelDir working, I just had player and cursorObject round the wrong way

little eagle
#

setDir will be relative to the object you're attached to, so you just have to do a bit of math and subtract the direction of the object you're attached on from the direction of the attached object.

polar folio
#

this is kind of a vague hint but i remember when working with attachto that the order in which you execute stuff like setdir and setvector matters. so before you give up on something that SHOULD make sense, be sure to try changing around the order. i can't remember the details so excuse me if it's bullshit ๐Ÿ˜„

rancid ruin
#

badbenson

#

you are the man for making enhanced movement

#

have an internet beer on me

static spire
#

is there a way to do the inverse of the arrayIntersect command?

little eagle
#

union?

#

copy pasting this from Slack:

#
private _fnc_arrayUnion = {
    params [["_array1", [], [[]]], ["_array2", [], [[]]]];

    _array1 = _array1 + _array2;
    _array1 arrayIntersect _array1 // return
};
static spire
#

I'm an idiot

#

that's so obvious

#

thank you

little eagle
#

triggers check every 0.5 seconds and not every frame

broken mural
#

Is there a way to spawn the gbu visual without the explosive damage? And other explosives of the same nature?

rancid ruin
#

disable simulation maybe

#

or just create the p3d model as a simple object

broken mural
#

That just created the actual bomb, commy. haha

peak plover
#

I'm trying to get started on dialogs

#

Any pointers?

still forum
rancid ruin
#

safeZone is your master now @peak plover

#

nah my pointer would be to create a blank dialog in your description.ext and then do everything in script with ctrlCreate til you're comfortable

peak plover
#

Allright

knotty iron
#

Question: Might anyone know where I can find a list of all BIS made particle effects? I want to spawn explosion effects without damage. Any help would be greatly appreciated and before anyone possibly gets upset with me... I have searched; Google, the Wiki, and BIS Forums.

peak plover
polar folio
#

@knotty iron as long as you don't ask "how easy would it be to.." and ask specific questions, i don't see the problem

#

actually. i don't know how close the arma 2 sprite sheet is to the arma 3 one. it's very close but might not be identical

rancid ruin
#

there's a particle FX editor mission which is pretty good too

#

i got high and played with that for like 5 hours straight once, fun times

polar folio
#

you too?

rancid ruin
#

it's a pretty far-out mission, man

polar folio
#

arma 3 is featured on that site

#

side note. there are more used than that one now

#

so i guess going for the path nigel gave is the safest route

knotty iron
#

I was sincere when saying I've searched the wiki and I could've been more clear in what I'm looking for which is a list of pre-made particle effects/explosions without the blast... for example, creating an artillery explosion itself on command

#

and the wiki post only displays the A2 stuff as well as it doesn't show a list :\

polar folio
#

i knew you were. no sarcasm. i thought your question was ok

#

ah wait. so you only want the effect? not make a new one? look for particleClass command

#

sec

#

look at the bottom under "see also"

#

bunch of good shit there

knotty iron
#

I'd prefer not to but ultimately won't mind if I have to make the list myself but I just need to know where to compile all the particle effect names from? Such as
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Addons\data_f.pbo

polar folio
#

class CfgCloudlets

knotty iron
polar folio
#

btw. slightly talking out of my ass here. but as far as i remember. some particle effects won't work with that command. my theory was always that it is because the engine uses some hardcoded variables like "intensity" to scale certain anims based on config values to be able to reuse them for certain values.

#

if you open the main config that has class CfgCloudlets in those folders nigel gave you. you will come across it. i think there are other similar ones too

#

also to get the list
"true" configclasses (configfile >> "CfgCloudlets")

knotty iron
#

I hadn't clicked that link from Nigel (ty Nigel) till you referenced it but I don't know where those folders are located?

polar folio
#

data_f as you said i think

#

btw. note that above code will get you config entries. to get classnames do this
_cfgs = "true" configclasses (configfile >> "CfgCloudlets");
_classnames = _cfgs apply {configname _x};

peak plover
knotty iron
#

Thank you both and I love how nigel only communicates in images :p

tough abyss
#

No easy way to get an array with near units even the ones inside vehicles?

polar folio
#

doesn't nearEntities catch crew?

knotty iron
#

Are the default (bis created) particleclasses used in mods like BlastCore cause I just realized if I Blastcore, wouldn't I need their class names instead or do they use the vanilla particleclassnames?

peak plover
#

nope nearentities does not catch crew

tough abyss
#

@polar folio @peak plover yes, nearEntities dont get it.

polar folio
#

dang

tough abyss
#

nearObjects also.

#

i'm using allPlayers and checking the distance for each player.

polar folio
#

what's wrong with reading out the crew though? isn't that pretty straight forward?

peak plover
#

Try this : _nearUnits = [];{if (_x distance player < 100) then {_nearUnits pushback _x}} count allunits;

#

Aah donnava.

tough abyss
#

@peak plover i'm using a code like that.

#

@polar folio its because for that you need to detect all vehicles on the same radius and search on all of then for players. Too heavy.

#

@peak plover thanks.

peak plover
jade abyss
#

@peak plover Pls stop posting simple pics as answers.
Codelblock can be used with

```sqf
bla
```

peak plover
#

''' test'''

#

test

#

Ohhhh

polar folio
#

lol

jade abyss
#

If you add ```sqf
it uses the sqf-Syntax for highlighting

#
_test = find deleteVehicle _Var;
peak plover
#
setpos getpos _me```sqf
jade abyss
#

```sqf <- Single line -> Enter -> Code starts -> Code Ends -> ```

peak plover
#

Sweeet ๐Ÿ˜„

#

I have a idea...

jade abyss
#

makes it easier to read and modify, if errors are in it + i personaly hate opening img just to see a simple answer (just like with the path's before, but thats just my personal note)

peak plover
#

On how you can do cache scripts without comparing distance

#

createmarkerlocal that's an ellipse where the unit is. then ```sqf
count (allPlayers inAreaArray _marker) > 0

#

Isn't that what the new dynamic simulation uses?

#

true dat

tough abyss
#

@peak plover this inAreaArray command is fast?

#

With that code now my zombies can see players inside vehicle ๐Ÿ˜„

peak plover
#

Nah the inAreaArray seems slower ๐Ÿ˜ญ

tough abyss
#

Ahhh ๐Ÿ˜ฆ

polar folio
#

on its own or with createmarker?

#

doesn't actual player count matter too?

peak plover
#

Slower than distance

#

Yes player count would matter

#

I switched allPlayers with allUnits

#

nearentities is still the fastest, but does not work for crewed units

#

Therefor it is what some might call fecal matter

#

Currently takes me "0.491013" seconds to check ~350 groups distance to player

#

The distance comparision is not that bad

jade abyss
#

MS not S, or?

peak plover
#

S

#

0.4 seconds

#

I'll try a few more

#
 3:29:55 "TOTAL AIMASTER GROUPS - 1439"
 3:29:55 "2.59302"
#

But it does not seem to work with crewed units

jade abyss
#

try something like:
if(!isNull (objectparent _x)then{ forEach crew objectParent _x} blablub stuff

vapid frigate
#

could try this one too sqrt (selectMin (allPlayers apply {_pos distanceSqr _x}))

#

1.6ms running it on an array of 1000 positions instead of allplayers

peak plover
#

What does that even do?

vapid frigate
#

doesn't give you the unit though, just the smallest distance between a player and _pos

peak plover
#

distanceSqr gave me some wierd numbers ๐Ÿ˜ญ

vapid frigate
#

yeh its better performing but gives you the distance squared as advertised

#

so sqrt makes it a normal distance again

peak plover
#

but does that not undo the benefits

vapid frigate
#

benefits?

peak plover
#

The faster speed

vapid frigate
#

you're best to do as few sqrts as possible, yeah (which normal distance does internally)

#

if you can, best to just square the value you're comparing it to (X*X)

#

or sqrt it at the end

peak plover
#

seems like it's going to end up redundant

vapid frigate
#

what is?

peak plover
#

X*X etc...

#

But did you try nearEntitites?

vapid frigate
#

its just a different way to do it.. using distanceSqr is faster but less readable

#

than using distance

peak plover
#

using x*x it's 3 times as fast you say ?

vapid frigate
#

i didn't say that

#

and no, it might not even be noticable at all with SQF overheads, but computers aren't good at doing square roots

peak plover
#

We'll then I got atleast something in common with a computer

tepid heath
#

anyone home?

#

cannot for the life of me get this to function correctly in the Condition field of a trigger "{typeof _x isEqualTo "B_truck_01_box_F"} count thisList > 0"

jade abyss
#

Error?

#

Script looks fine, if i don't miss something

tepid heath
#

no error, trigger just isn't firing

#

if i change the > to a == then it will fire but that's obvious

jade abyss
#

And it is the "B_truck_01_box_F" that goes in?

#

Add a systemchat Log for you, to see what he finds.

#
{
     typeof _x isEqualTo "B_truck_01_box_F";
     systemchat str (typeOf _x);
} count thisList > 0```
tepid heath
#

yes the correct class name object is being inserted into the trigger area

#

spams the class name in sys chat

jade abyss
#

Correct one?

tepid heath
#

yeah

jade abyss
#

and? Is it beeing executed or not?

tepid heath
#

negative

jade abyss
#

+SinglePlayer?

#

MP?

tepid heath
#

at this ppoint all im trying to do is a hint

jade abyss
#

Whats beeing executed?

tepid heath
#

SP in editor, ill try MP quickly

jade abyss
#

Stuff someone need to know, if he wants to help you

#

If it's not working in SP, it shouldn't work in MP also

#

@tepid heath

tepid heath
#

doesn't work in SP

#

i dont think its counting the list properly for the trigger?

jade abyss
#

...

tepid heath
#

based on this thread the conditions should be working fine

jade abyss
#

"Whats beeing executed?"

tepid heath
#

just a hint at this point

#

hint "conditionisworking";

jade abyss
#

So its spamming in Systemchat the Classname of the found Vehicle, correct?

tepid heath
#

yes

jade abyss
#
{
     typeof _x isEqualTo "B_truck_01_box_F";
     systemchat str ((typeOf _x == "B_truck_01_box_F") count thisList);
} count thisList > 0```
Pls put that in.
tepid heath
#

Generic error in expression

jade abyss
#

stupid arma

#

who is working with triggers anyway ^^

tepid heath
#

i am

dusk sage
#

Add braces in his systemChat @tepid heath

tepid heath
#

omfg i got it working

jade abyss
#

What was it?

tepid heath
#

by just repasting the literall same code and putting the same class name in

#

wtf arma?

jade abyss
#

Something was wrong then.

dusk sage
#

Heh

tepid heath
#

clearly but i have no idea what it was.

dusk sage
#

Magic

tepid heath
#

its just a simple basic trigger with only 1 condition

jade abyss
#

Something must be done differently this time.

dusk sage
#

Well you knew the trigger was working earlier

#

But not what it was executing

tepid heath
#

ah well, that trigger now saved as a composition so i dont have to mess it up again ever

#

thanks guys appreciate it

jade abyss
#

yepyep

tough abyss
#

Its possible to make a mod like Epoch or Exile without the use of sqf scripts?

#

Why sqf is seens like a villain?

rancid ruin
#

you err...kinda need SQF to do anything

thin pine
#

@tough abyss dude, what?

queen cargo
#

there still is SQS @rancid ruin

#

the ugly disabled brother of SQF

pliant stream
#

You can use ASM/C/C++/Rust etc.. but your mod will break after every binary patch. :)

civic maple
#

ez pz

tough abyss
#

Welll, not my fault, its not me saying "SQF is the source of all badies". So Efusion will have a script language? :)

thin pine
#

I don't get the hate on SQF so much. I mean sure it isn't low level like C++ and yes there are limits. But for a scripting language within a game I don't see the hate some have and/or spread justified.

#

My two cents

pliant stream
#

No OOP, no optimizer, dynamic typing, no pointers/references, easy multithreading but no synchronization

#

etc..

open vigil
#

Shame the (planned) Java implementation was dropped

tough abyss
#

Efusion will have somthing like SQF?

halcyon crypt
#

no, it'll be C++-ish

#

wonder how that will affect any future linux/mac ports though ๐Ÿ˜ฆ

peak plover
#

How to I set a variable as nil?

#

nvm var = nil works, but had to unpause game ;S

tough abyss
#

@halcyon crypt it will be possible to do all the mods we do today with Arma 3?

halcyon crypt
#

sure, probably, just not SQF I guess

#

no clue to be honest, don't think there's anything public about it?

#

there might even never be an A4 ๐Ÿ˜›

little eagle
#

You think BI just drops their best selling series?

halcyon crypt
#

things happen ๐Ÿ˜›

#

but no, I don't think so

#

did A3 outperform DayZ in sales?

#

according to steamspy DayZ has more sales

#

3,607,877 ยฑ 53,862 vs 2,906,221 ยฑ 48,388 (# of sales, not revenue)

#

no clue about accuracy though

little eagle
#

If they say so then probably.

halcyon crypt
#

Arma has a healthier community ๐Ÿ˜›

little eagle
#

Isn't the DayZ game still unfinished or something?

halcyon crypt
#

probably, haven't played it in ages

turbid thunder
#

@little eagle it is but it has seen quite some updates. Still early access though

#

Question: Is there actually any situation where SQS is worth using over SQF?

indigo snow
#

when making a mission in OFP

turbid thunder
#

Why's that?

indigo snow
#

since SQF wasnt around until armed assault 1 ๐Ÿ˜›

turbid thunder
#

Ah so basically just one of many leftovers from the past. Its weird since I once downloaded a paradrop script and it was SQS and I forgot it even existed until someone her mentioned it

rancid ruin
#

dayz standalone is looking good...60+FPS in chernogorsk, better than arma 3

static spire
#

someone tell me why the hell this is flagging up an error cheers :))))

{_actions = actionIDs _x; if (_actions == [0]) then {_x addAction ["<t color='#FF0000'>Despawn</t>",{deleteVehicle _x},"",0,false,true]} else {};} forEach vicsNoSupply;
#

its saying that the comparison is an issue, but i dont see how it could be

turbid thunder
#

@static spire else {}; can be safely removed from code unless you actually want it to have an alternative outcome. Can you describe the issue more specific? Usually the game tells you that it expected something different than it recieved. What does it tell you it expected and what does it tell you that it recieved?

static spire
#

it just tells me theres a generic error

turbid thunder
#

Oh arma.... ohwell I need to boot up arma myself, mayby I can figure smth out

static spire
#

if it helps this error only shows up when _actions = [0], it works fine when its an empty array

indigo snow
#

generic error > This error occurs when the type of data an operator is expecting does not match.

static spire
#

oh

#

hmm

indigo snow
#

what is _actions?

turbid thunder
indigo snow
#

you cant compare == over different types

turbid thunder
#

Should be an array

static spire
#

they're the same type

#

both arrays

#

right?

indigo snow
#

are you on dev?

turbid thunder
#

1.63

#

Latest version is 1.66 ๐Ÿ˜„

static spire
#

1.66

#

yeah

indigo snow
#

check the return of that command

static spire
#

both arrays, definately

halcyon crypt
#

_actions isEqualTo [0] is probably "better"

#

you shouldn't be able to compare arrays with ==

static spire
#

alright, let me test that

indigo snow
#

< missed out on that

static spire
#

well, that fixed it

#

cheers

turbid thunder
halcyon crypt
#

๐Ÿ˜ƒ

indigo snow
#

isEqualTo can compare across types which is mainly why its nice

static spire
#

sorry to ask so much, but yano im p terrible at this

#

here is my current stuff

#
{_actions = actionIDs _x; hint format ["%1",_actions]; if (_actions isEqualTo []) then {_x addAction ["<t color='#FF0000'>Despawn</t>",{deleteVehicle _x},"",0,false,true]} else {};} forEach vicsNoSupply;
#

it works, but the problem is that deleteVehicle _x doesnt work, because its in an action on a vehicle outside of the forEach

#

so when i do the action, it tells me _x is not defined

halcyon crypt
#

check the arguments parameter

tough abyss
#

I believe not.

halcyon crypt
#

_x addAction ["<t color='#FF0000'>Despawn</t>", {deleteVehicle (_this select 3)}, _x, 0, false, true]

#

something like that

turbid thunder
#

^

halcyon crypt
#

The entire thing could be simplified to:

{
    if (count (actionIDs _x) == 0) then {
        _x addAction ["<t color='#FF0000'>Despawn</t>", {deleteVehicle (_this select 3)}, _x, 0, false, true]
    };
} forEach vicsNoSupply;
#

or (actionIDs _x) isEqualTo [], not sure which is "faster"

static spire
#

would (_this select 0) work without the _x argument if i just wanted the object name?

turbid thunder
#

Yup

#

As long as the vehicle you want to delete = the vehicle the addaction is attached to

static spire
#

yeah

turbid thunder
#

then yeah that'll work

static spire
#

works perfectly, thanks guys

shadow sapphire
#

Anyone know if I can apply a custom texture to the AAF's Gorgon via a script?

meager granite
#

setObjectTexture

inner swallow
#

@lavish ocean or someone else who can edit the wiki:

Command: inAreaArray

For syntax: positions inAreaArray [center, a, b, angle, isRectangle, c]
The wiki says center: Array or Object - center of the area in format Position3D, Position2D, Object or Group

However using an object returns the error:


if (>
18:48:33   Error Type Object, expected Array```

using `inAreaArray [getPosASL _x, 20, 20, 0, false, 10];` works.
#

Wiki needs to be edited or bug needs to be fixed

peak plover
#

I think you got it wrong?

#

If you want ot use that syntax then positons must be an ```sqf
[getpos unit1,getpos unit2]inAreaArray [town_1, 500, 500, 0, false, 10]

polar folio
tough abyss
#

if i trow a unit in the air with setVelocity, it will be affected by wind?

polar folio
tough abyss
#

Sorry to ask, but vehicle vehicle player for a player in a jeep return the jeep? Thanks!

cerulean whale
#

vehicle player returns the vehicle. ```SQF
typeOf vehicle player

tough abyss
#

@cerulean whale but for the sake of optimization vehicle vehicle player can occur... Any problem on that?

indigo snow
#

... how would that optimize anything?

tough abyss
#

Less treatment.

indigo snow
#

i do not understand what that has to do with vehicle vehicle player

cerulean whale
#

What do you mean vehicle vehicle player?

#

How would that make any sense? What are you trying to achieve?

tough abyss
#

I have a var that can be a player or a vehicle

#

But if its a player, i know is a player in a vehicle

#

and i want the vehicle

cerulean whale
#

vehicle player returns the vehicler....

tough abyss
#

thanks

cerulean whale
#

player returns the playter

#

vehicle player returns the vehicle

#

typeOf vehicle player returns the type of vehicle that the player is in\

tough abyss
#

Ok, there is a g force in Arma 3? ๐Ÿ˜„

#

i'm doing ballistics

#

Trowing a zombie in a helicopter

#

From the ground

indigo snow
#

you can fall so there is gravity, yes

tough abyss
#

So i need to know what setVelocity to apply

#

Yes, but what it is? 9.8 m/s^2?

inner swallow
#

@peak plover no, the first array can take an array of objects

array inAreaArray [position, a, b, rotation, isRectangle, z]

i.e. in your example town_1 needs to be an array (i.e. position)

#

So i'm pretty sure the wiki needs to be tweaked.

#

because it says town_1 can be an object

#

which it can't

tough abyss
#

Just sharing: make a unit crouch and jump in a heli (for zombies): ```Sqf
private ["_calc1"];
_o = getPosworld _agnt; //ORIGIN (THE JUMPER)
_t = getPosWorld vehicle _killer; //TARGET (THE HELI)
_v = 50; //VELOCITY
_g = 9.8; //GRAVITY
_dx = _o distance2D _t; //HORIZONTAL DISTANCE
_dy = (_t select 2) - (_o select 2); //VERTICAL DISTANCE
for "_i" from 1 to 6 do {
_calc1 = _v^4 -_g*(_g*_dx^2 + 2*_dy*_v^2);
if (_calc1 > 0) exitWith {};
_v = _v + 10;
};
if (_calc1 > 0) then {
_a = atan ((_v^2 - sqrt(_calc1))/(_g*_dx)); //TROW ANGLE
_h = [_t select 0,_t select 1,(tg _a)*_dx]; //TARGET TO HIT
_velVec = (vectorNormalized (_h vectorDiff _o)) vectorMultiply _v;
_agnt setDir ([_agnt,_killer] call BIS_fnc_dirTo);
_agnt setUnitPos "MIDDLE";
_agnt doWatch ASLToAGL _t;
_agnt setVelocity _velVec;
};

indigo snow
#

no