#arma3_scripting

1 messages ยท Page 379 of 1

tame portal
#

Do you need say3D?

#

*playSound3D?

#

I would dig out a function for you to use but Im in rainbow six siege at the moment

#

If I read that correct your issue is that your playSound3D are queuing up?

#

I am fairly sure playSound3D does not queue

#

You with your thinking blobs

little eagle
#

too big

#

Let me retry.

tame portal
#

Crop it out and adjust it's size

#

Put some work into this man

#

This is serious business

young current
#

. . .

tame portal
#

Jesus

#

...

lone glade
#

๐Ÿ‘

little eagle
#

Looks so bad rescaled with Paint. PS is so good.

jade abyss
#

EmoteNoob ๐Ÿ˜„

little eagle
jade abyss
#

๐Ÿ‘

little eagle
#

๐Ÿ†

agile pumice
#

i keep getting a sound not found error when im staring at the file XD

#

i pretty much copied my other script which works

obtuse cosmos
#

๐Ÿ‡ฌ๐Ÿ‡ง

agile pumice
#

gonna try with a leading backslash

warm gorge
#

Is it possible to force put out a fire of a burning vehicle wreck without despawning it?

#

Nevermind, figured it out

#
{deleteVehicle _x;} forEach (_vehicle nearObjects ["#destructioneffects",5]);
quartz coyote
#

Hello, i'm having problems with this, it's executing Server side and I need it to detect a player entering a Triger

    if ((vehicle player) in (list SpawnProtectW) AND side player != WEST) then
    {
        {_x setdammage 1.0} foreach list SpawnProtectW;
        (parseText Format ["%1 was killed in <t color='#0000FF'>BLUE</t> Respawn Zone",name(list SpawnProtectW select 0)]) remoteexec ["hint"];
    };```
quartz coyote
#

this is not executing on Dedicated

copper raven
#

@quartz coyote player is null on dedi

quartz coyote
#

so shall I replace it by _x ?

copper raven
#

just run it on all pcs,locally thats what i would do

quartz coyote
#

No i'd like it to be the Server that handle's it

#

their most be a way of detecting the vehicle of the player in the area and killing it

lone glade
#

hint is AG EL dude

quartz coyote
#

right please speak english

#

i didn't get that

lone glade
#

Argument Global Effect Local

#

also didn't knew someone used the typo'd variant of setDamage

quartz coyote
#

And ? it's remoteexec-ed so thats no problem

lone glade
#

check the args for remoteExec

quartz coyote
#

it works lol thats not my problem ^^

lone glade
#

doesn't work on dedi, it doesn't

quartz coyote
#

I have a workflow full of that kind of hint .. and I works ...

#

maybe i'm not getting what you mean

#

:/

lone glade
#

try it with -2 as target for remoteExec

quartz coyote
#

...

quartz coyote
#

found my way to it

devout niche
#

Hey, how would I check if am object has been shot with a specific projectile, for example, check if a rock has been damaged by a specific rocket or bullet?

little eagle
#

Rocks cannot be damaged. They are indestructible.

devout niche
#

I used it as an example

#

I would just like to check if a specific projectile hit a object that I chose

devout niche
#

Thanks!

fallow sail
#

Hello, I've been playing around with objects created with 'createSimpleObject' and was wondering how I can enable simulation on that particular object.

_object1 = createSimpleObject = createSimpleObject ["ca\buildings\vez.p3d",[23428.5,18626,4.6 ]];
_object1 setDIR 315;

I have tried using enable simulation in multiple different ways, but it didn't seem to help.

_object1 enableSimulation true;

Thank you in advance.

dim notch
#

The whole point of simple objects is that they're decorative and have limited simulation, use createVehicle

fallow sail
#

Thank you worked like a charm, I had to end up using "Land_Vez" rather than "ca\buildings\vez.p3d" but that's easier than grabbing the model name anyway. The alignment on the Z axis is for the object is flush as well which is pretty handy.

_object1 createVehicle ["Land_Vez", [23430,18624.6,0],[""], 0, "NONE"];```
I had a feeling I had to use createVehicle when I was looking at the related articles on the wiki, but thought thats probably wrong. Should of tried it. v-v
still forum
#

@little eagle Enscript "It's the same people making it that made SQF" No.

warm gorge
#

Whats all this stuff about Arma 4 lately? Whats been said about it

simple solstice
#

if array select expression doesn't select anything, is anything returned?

warm gorge
#

What do you mean

tame portal
#

@simple solstice Empty array

warm gorge
#

Nevermind, I get you

simple solstice
#
_receiver = (call CBA_fnc_players) select {_x getVariable "testvar"};
if (count _receiver == 0) then {
_receiver = objNull;
};
``` so that would work to just null the receiver instead of [] I guess
little eagle
still forum
#

@simple solstice
_receiver = ((call CBA_fnc_players) select {_x getVariable "testvar"}) param [0, objNull]

simple solstice
#

@still forum thanks!

little eagle
#

Good answer!

tough abyss
#

what's a good practise to keep veteran level AI in a vehicle from driving over an entire squad of friendly AI? (Hunter driving over a rifle squad walking by the road)

simple solstice
#

param [0, [objNull]] would return [objNull]?

#

maybe its an obvious question but you never know with arma

little eagle
#

If _this is undefined or an empty array, the code you posted would report [objNull].

simple solstice
#

ok, thats what I want

agile pumice
tough abyss
#

Good find

simple solstice
#

do you have a pboprefix?

#

and is the sound actually packed in the pbo

little eagle
#

What's the script look like?

agile pumice
#

1 sec

#

I deleted my temp folder and am trying again

#

I think I realized what I did

#

I was trying to use say3d with the sound path instead of the classname

little eagle
#

Should've posted the script first.

sour saffron
#

anybody know what the script comman is to relinquish control of a UAv after BTH_fnc_UnitTakeControl was used to gain the original capture ?

little eagle
#

I googled it and don't you have a scroll menu action to return to the former unit?

sour saffron
#

you do but iwant to add it to an action and activate it in a linear proces at a certain step

little eagle
#

L34 to L49 of what I posted I guess.

sour saffron
#

objNull remoteControl _unit; think that needs to be objNull remoteControl Driver _unit but led me to the right idea ,cheers

tough abyss
#

param titillates me.

little eagle
#

Took you long enough to get on that train.

tough abyss
#

๐Ÿคท

#

I became rather... occupied wherever I see param.

little eagle
#

No reason to sodomize your code.

sour saffron
#

well that was hard work, seems logical now that when in a remotecontrol the thing you are controlling is the caller not you when triggering an addaction . ah well .

simple solstice
#
{
    if (_x select 0 isEqualTo "example") exitWith {_hasitem = true;};
} forEach _data;

Can this be somehow done using select, or is there just a better way to do this sort of things?

cedar kindle
#

private _result = _data select {(_x select 0) == โ€œexampleโ€ } param [0, โ€œnot foundโ€]

#

depends on what you want

#

just to check occurrence you can use in

dusk sage
#

Maybe ```sqf
_hasItem = "example" in (_data apply {_x select 0});

#

Might* be quicker

fallow sail
#

Hello, I'm having a small amount of difficulty with created units, for the life of me I can't seem to get them to turn and face a direction of my choosing.

_Unit setDir 315;

Doesn't seem to do the job.

This is what I'm working with.

_myGroup1 = createGroup east;
_myUnit = _myGroup1 createUnit ["UNIT_ID", [23437.6,18617.3,0.12],[], 0, "NONE"];

If I could get them to look and face in specific horizontal orientations, that would be perfect.

still forum
#

Why don't we have ARRAY find CODE ... That would make SOOOOO much things better

little eagle
#

@still forum Because we already have ARRAY find ANY, so it wouldn't be bwc.

fallow sail
#

@little eagle You're a legend โ™ฅ Thank you very much

still forum
#

maybe findIf then... It's easy to implement and would be friggin awesome

little eagle
#

selectApply

#

It would just be:

ANY in (ARRAY apply CODE)

Right?

still forum
#

no

#

like (ARRAY select CODE) select 0

#

but quitting after the first element is found. instead of iterating till the end

little eagle
#

isNil {ARRAY select CODE select 0}
?

still forum
#

but quitting after the first element is found. instead of iterating till the end

#
{
    if (_x select 0 isEqualTo "example") exitWith {_hasitem = true;};
} forEach _data;

that would replace that by
_data find {_x select 0 isEqualTo "example"} != -1

proven crystal
#

hello. i am trying to build a little killhouse for my guys. for that i want to have some AI standing around stupid and not firing back. Also they should respawn after a bit.
I made a little script for that, and in principle it works fine. Its just that the very first time i kill one of the guys and he respawns, he brings a buddy with him.
So The exact same unit spawns a second time right next to him. The unwanted dude is also set up as practice target.
If i kill them of again, they dont multiply further, and do as they are supposed to.
What could it be?

#

here is the script:

#
//nul = [this] execVM "fez\fez_practicetarget.sqf";



_target = _this select 0;

//making unit useless. they are just standing there waiting for bullets
group _target setCombatMode "BLUE";
group _target setBehaviour "careless";
_target allowFleeing 0;
_target setvariable ["NOAI",true];

//diag_log format ["saving unit parameters for respawn"];
_pos = getPos _target;
_dir = getDir _target;
_classname = typeOf _target;
_side = side _target;
_loadout = getUnitLoadout _target;



//wait till unit is dead. i added a little delay loop, i figure is saves a little cpu...
while {alive _target} do {
    sleep 60;
};
waitUntil{(!alive _target)};


sleep 120 + random 60;

_group = creategroup _side;
_vehicle = _group createUnit [_classname, _pos, [], 0, "NONE"];

_vehicle setDir _dir;
_vehicle setUnitLoadout [_loadout, true];


[_vehicle] execVM "fez\fez_practicetarget.sqf";
#

i dont see where that second unit should come from.

#

hm yea could do that i guess. but still i want to know what im doing wrong here

indigo snow
#
while {alive _target} do {
    sleep 60;
};
waitUntil{(!alive _target)};

???

proven crystal
#

yes it basically does the same, but as i wrote above it, i thinks its a little less calculation because i think waituntil checks on every frame

#

with that look i do a check every 60 seconds instead

#

but at one point i was fumbling around trying to find that bug so i just wanted to make sure its REALLY dead ^^

#

guess i can take out the waituntil line

grizzled spindle
#

Is there a way to see the eden editors hpp file?

queen cargo
#

You can save the file unbinarized @grizzled spindle

grizzled spindle
#

Which file is it in?

subtle ore
#

@grizzled spindle you arent making any sense, can you ellaborate?

austere granite
#

\a3\3den\config.cpp

grizzled spindle
#

Thanks @austere granite

lavish hamlet
#

Would i be possible to make a script, that would allow the Co-pilot of a helicopter to get a couple of addactions to destoy Engine, Tail rotor ect.. for traning of new pilots.. or would it fail cause the heli is local to the pilot ??

lavish hamlet
#

Nvm

simple solstice
#

got a solution?

#

remotexec is the answer

#

and use the helicopter object as a target, it will get executed on the machine where it's local

vestal mortar
#

Hello, Can someone help me please?>

austere granite
#

Yes, you get one question. That was it

vestal mortar
#

oh

subtle ore
#

Just ask your question

#

You don't need to ask perms

vestal mortar
#

oh ok, am i doing something wrong here?

this addAction ["Crafting Help", {hint "Testing"}];
tranquil crescent
#

the code needs to be inside of quotes

#

this addAction ["Crafting Help", "{hint 'Testing'}"];

tough abyss
#

it shouldnt matter

#

@vestal mortar make sure this is a valid object. If its your player then do player addAction ["name", {code}];

vestal mortar
#

Ok, 1 second

subtle ore
#

No, it doesn't take quotes

#

Only certain engine commands take quoted code

vestal mortar
#

i want it to run the hint command in the addAction itself but for some reason its not working

subtle ore
#

Generally they are conditions

#

@vestal mortar wher are you adding this at? A box?

#

Unit init?

vestal mortar
#

Unit init

#

it will be placed in a trigger

subtle ore
#

Is this sp?

vestal mortar
#

mp

tranquil crescent
#

sorry i was thinking of calling a script from that section, not code

tough abyss
#

๐Ÿค”

subtle ore
#

Okay, should be

this addAction["Crafting Help",
{
hintSilent "Test! It works!";
}];
tough abyss
#

beautiful

tranquil crescent
#

how do you do the color?

tough abyss
#

hmm i think it works with html?

#

(dont quote me on that)

#

wiki says player addAction ["<t color='#FF0000'>This Useless Action Is RED</t>", {hint "RED"}];

tough abyss
#

oh

subtle ore
#

Ooh..you mean on the action?

#

Formatted text

tough abyss
#

no clue what he means

vestal mortar
#

oh i forgot the ; haha lol thanks @subtle ore

tough abyss
#
if(true) then 
{false};```
subtle ore
#

@vestal mortar yep no problem

tough abyss
#

im surprised discord respects sqf

subtle ore
#

I am too

tranquil crescent
#
if(false) then {true};
tough abyss
#

no

tranquil crescent
#

damn

tough abyss
#
new line 
ending ```
#

eh i cant do it

#

well i can

#

but i cant show you

tranquil crescent
#

fuck it

tough abyss
#

",,,sqf
stuff
,,,"

vestal mortar
#

can someone tell me why this wont work in eden editor?

tranquil crescent
#

is it not sqf?

vestal mortar
#

yeah the file i want it to execute is a sqf

tranquil crescent
#

not you Ethan sorry

vestal mortar
#

oh

#

nvm

#

fixed it

#

haha

tough abyss
#

๐Ÿ‘

tranquil crescent
#
this allowsqf false ;
if (zbshadow cool != true);
vestal mortar
#

i'm legit so dumb i need to look before asking

subtle ore
#

@vestal mortar better to ask then never find out

vestal mortar
#

yeah true

#

@subtle ore would u know why this code isnt removeing the addActions

_myID3 = player addAction["Close",
{
player removeAction _myID1
player removeAction _myID2
player removeAction _myID3
}];
#

ive removed the ; and added the ;

#

and it hasnt fixed it really confused

#

i'm gonna make it just remove it self not the player having to click CLose

#

Can u not get a addAction that runs another addAction in itself to have a _myID4 before it? cause i doesnt want to create it if _myID4 is in there

subtle ore
#

@vestal mortar
try this instead

_myID3 = playerAddAction["Close",
{
params["_player","_user","_id","_args"];
_player removeAction _id;
}];
#

so in each one of your actions, the action will be removed

#

since addAction already passes a special variable for you to use to return the id of the action

vestal mortar
#

ok

subtle ore
#

otherwise, unless you specifically pass variables into the action they will not be able to be used

vestal mortar
#

ok

subtle ore
#

which is the next paramter after the code, so like this:

_myCookieVariable = 1;
player addAction["Cookie Action",
{
params["_player","_user","_id","_args];
hintSilent str _args;
},[_myCookieVariable]];
#

which _myCookieVariable would be available inside the addAction

vestal mortar
#

Aight, the Close one is still not working?

compact maple
#

Hello, someone know where can i report a bug ?

young current
#

@compact maple dropped you answer. dont spam on many channels ๐Ÿ˜

fallow sail
#

Hello, I'm currently learning and trying out waypointing. I created a unit which enters a vehicle using 'get in nearest' but now I'm curious on how to make the unit enter a vehicle more precisely. e.g. unit 1 get in vehicle 1.

_Turret1 = createVehicle ["O_mas_med_ins_HMG_01_high_F", [23502,18518.3,0],[], 0, "NONE"];
_Turret1 setDir 135;

_Turret1Gunner = createGroup east;
_myGunner1 = _Turret1Gunner createUnit ["O_mas_med_Insu_M_F", [23498.6,18527.5,0],[], 0, "NONE"];

_wpTurret1_1 = _Turret1Gunner addWaypoint [getPos _Turret1, 0];
_wpTurret1_1 setWaypointType "GETIN NEAREST";
plush cargo
#

@iX#8920 try waypointAttachVehicle and waypointAttachObject

plush cargo
#

Have an optimazion question.........

#

so each button on the right opens a sub menu to set speed, combat mode etc. Each submenu button has the same eh which has a switch statement to find which button and execute the correct code

#

rn i have 4 fncs that are almost the same that i want to combine into one. Problem is I dont know how to pass the different code correctly as a param. The code contains another of the params and also _x from foreach statement

cerulean whale
#

Is there a command to open the players inventory?

plush cargo
#

you want the players inv forced open on themselves or you want to remotely view it?

cerulean whale
#

open on themselves

plush cargo
#

this might work
player action ["Gear", player];

#

its for opening other inventories but it may work

little eagle
#

@plush cargo

["CommandMode", "SAFE", "\a3\Ui_F_Curator\Data\RscCommon\RscAttributeBehaviour\safe_ca.paa"] spawn SRTS_fnc_AnyModeChange;

//SRTS_fnc_AnyModeChange
params ["_type", "_mode", "_text"];

switch (toLower _type) do {
    case "commandmode": {
        ...
    };
    ...
};

???

#

@still forum Case insensitive switch structure, possibly with continue.

plush cargo
#

Figured on putting another switch in just wasnt sure if that or pass the code in the params. Thanks commy

still forum
#

@little eagle I can probably give you caseCI What should continue do? Not exit the switch at end of code?

candid jay
#

hey all, good morning! does anyone know if there is a way to retrieve the properties of a p3d from script? specifically iโ€™d like to know if an object is set to follow slope (thatโ€™s a p3d property Iโ€™m referring to, not the verticality that you can define for eden in configs)

still forum
#

no

#

Place it using script and see if it follows the slope ๐Ÿ˜„

little eagle
#

caseCI is fine I guess.

#

Not exit the switch at end of code?
Yep.

candid jay
#

i was thinking to have an external script loop all a3/ca objects and a tool such as dep3d but before i do that... i thought iโ€™d ask ๐Ÿ˜ƒ

#

eheh dedmen the objects are already there itโ€™s for my E2TB module (export to terrain builder)

still forum
#

I mean to check if followSlope is enabled. The only thing you can do in SQF to test that is to place it and check if it follows the slope

#

I don't know what the secret switch variable contains right now.. I guess I can do that..

#

I think you might already be able to do that in SQF...

little eagle
#

Get angle between terrains up vector at the objects position and the objects up vector. If smaller than a threshold, the object is aligned with the terrain.

#

I think you might already be able to do that in SQF...
breakTo/Out? Never tried.

still forum
#
switch "cond" {
case "cond" : {
//continue although matched
private _prupSwitchBla = "";
switch "cond" {
_prupSwitchBla = __secretSwitchVariable;
};
__secretSwitchVariable = _prupSwitchBla;
}
}
#

somethink like that ๐Ÿ˜„ I don't know if you are allowed to write to the __secretSwitchVariable.

#

Intercept can't even access it.. unless you pass it as parameter to continue

#

breakTo/Out won't work. the case statement set's the "triggered" flag and then on the next case statement it detects that it already triggered and exits.
All you can do is jump to the next case and then it's already too late

candid jay
#

commy2 clever but not adapted for my scope, since that threshold would apply also to objects that do not follow slope and add to imprecision

#

thanks for suggestions!

fallow sail
#

@plush cargo Thank you, I'll give it a try.

fallow sail
#

Played around a bit and ended up using.

_x moveInGunner _y;

works perfectly for what I need it for.

cunning nebula
#

be sure to also use assignAsGunner

fallow sail
#

It's for a static, I think it should still work.

peak plover
#

Umm

#

How many percent is 32 better than 25

#

25/100 * 32?

little eagle
#

What?! ๐Ÿ˜‚

peak plover
#

Ok

#

Base number 25

#

How many percent is 32

#

And how do I find that?

little eagle
#

32/25*100

peak plover
#

Ohh right thanks

#

๐Ÿคฆ

#

I guess I'm not smarter than a 4th grader

little eagle
#

Self awareness and courage to ask is all you need.

still forum
#

I also can't ever remember how to calculate improvement in percentage or 5x faster ot stuff..

still forum
#
private _scope = createProfileScope "TestScope";
//Waste 17ms of time for visualization
profilerLog "hey test";
if (true) then {};
profilerLog "post if";
//Waste 17ms of time for visualization

https://imgur.com/a/3rxjW
Do you peoples like that?

jovial nebula
#

Wut is this?

still forum
#

a script profiler.

#

It measures the time between when _scope get's created till it goes out of scope. With microsecond precisionโ„ข
Add private _scope = createProfileScope <Function name>; to the start of all your script files and you get a full callstack with runtime for each function that was called. Additionally you have profilerLog which add's log messages to the visualization. So you can log what arguments were passed to your function for example. The logs also show when they were logged. So you can profile sub-sections of your script without creating extra scopes
Works just like https://community.bistudio.com/wiki/Performance_Profiling but for scripts instead of engine stuff.

plush cargo
#

GiveItToMe.gif

#

is/of = %/100 was so drilled into me in grade school ill never forget it ๐Ÿ˜ƒ

jovial nebula
#

Wow it seems cool @still forum

subtle ore
#

@tough abyss loaded mission event handler yeah

shell carbon
#

Hi there,
does anyone know why this dosent work:
if ({cgr_side_target_1 in (list _side_trigger)} && {cgr_side_target_2 in (list _side_trigger)}) exitWith {_pilots_at_base = true};

still forum
#

Because CODE && CODE doesn't exist.

shell carbon
#

okay

still forum
#

You guys know that you can't assign a variable that is named after a command? stuff like player = "stuff"?
That is being checked at runtime. Even with local variables.
So everytime you do _localVar = 1 it goes through all script functions and checks if _localVar is a script function.
I wonder how much faster SQF scripts would be if that would be removed...
The check might make sense for global variables.. but there are no script command starting with _ so it makes no sense to check if one does...
And at runtime on every execution.. Instead of once when the script get's compiled
I'm done for today ๐Ÿ’ค ๐Ÿ’€ โ˜ 

rancid ruin
#

yes i did know that

#

i coincidentally named some variable to an existing function name and had to figure out wtf was wrong

ionic orchid
#

is there any global script that gets called when a server is shutting down?

#

(or at least a way to tell my server mod/dll that it's time to terminate)

jade abyss
#

@still forum _ForEachIndex (does that counts?^^)

little eagle
#

@ionic orchid addMissionEventHandler ["Ended", {

ionic orchid
#

okay i'll give it a go

#

I wasn't having much luck with exit.sqf

#

I think it must be unloading the mod dlls before the event triggers

little eagle
#

Doubt it since we are using some dll in the main menu with ACE.

ionic orchid
#

My issue is that the dll crashes the server on shutdown, before I've had the change to clean up all the loose pointers (I'll fix that later)

#

So I wanted to check if there was a way to explicitly call a cleanup method on the DLL before that crash happened

#

Ended sounds about right, but the event doesn't happen before the crash kicks in, so I'm assuming that Ended comes after the DLL is unloaded based on that

#

I'll keep poking

tough abyss
#

Its up to the dll to close down correctly

cedar kindle
#

the missionEH Ended only works in missions, when not using #missions command

tough abyss
#

dlls are not unloaded on mission end, only when server is shutdown

ionic orchid
#

that's the issue I have - I want to unload the dll on shutdown, but I want the dll to know it is being shut down

tough abyss
#

Then code the dll todo, its easy enough todo that with c++

ionic orchid
#

My guess is doing something with DLL_PROCESS_DETACH, assuming it does what it says on the tin

ionic orchid
#

Okay cool, process detach is the last message I get before the crash, that'll be what I need

#

I'll take a look at that one, cheers, it's a bit different from the default one that BI give you

#

Yeah, process detach works just fine, thanks again

arctic escarp
#

Would there be a way to stop a gun from firing at certain angles of the turret's movement?

lofty nymph
#

has anyone else had anissue when using tvsetpicture? i can get it to work but the picture looks very compressed and there is a gap to the left of it

plush cargo
#

@lofty nymph got a screenshot?

lofty nymph
#

@plush cargo https://i.gyazo.com/b24e941b27d1d5a4c279641a656b94f4.png trying to create a list of weapons which a play can then search through with the rsctree and rsc edit search combo. but unlike lbsetpicture, this dosent seem to alocate room for the bigger pictures, its just compresses them.

lone glade
#

change the column start pos

lofty nymph
#

how do i do that?

lone glade
#

in the config of your dialog

lofty nymph
#

ok, thx man

lone glade
plush cargo
#

thats for a lb though, i dont think tree has a column pos only row height

lone glade
#

tree doesn't afaik, you can't mix and match those two

#

use a listbox instead, there's no need for a tree there

lofty nymph
#

yh, but i need it to be searchable. so it filters down, thats why i used it. like this wiki example

#
{
    disableSerialization;

    _display = findDisplay 46 createDisplay "RscDisplayEmpty";
    
    _edit = _display ctrlCreate ["RscEdit", 645];
    _edit ctrlSetPosition [0,0,1,0.04];
    _edit ctrlSetBackgroundColor [0,0,0,1];
    _edit ctrlCommit 0;
    
    _tv = _display ctrlCreate ["RscTreeSearch", -1];
    _tv ctrlSetFont "EtelkaMonospacePro"; 
    _tv ctrlSetFontHeight 0.03; 
    _tv ctrlSetPosition [0,0.06,1,0.94];
    _tv ctrlSetBackgroundColor [0,0,0,1];
    _tv ctrlCommit 0;
    
    _classes = "true" configClasses (configFile >> "CfgVehicles");
    
    for "_i" from 0 to 5 do 
    {
        _tv tvAdd [[], configName selectRandom _classes];
        for "_j" from 0 to 5 do  
        {
            _tv tvAdd [[_i], configName selectRandom _classes];
            for "_k" from 0 to 5 do  
            {
                _tv tvAdd [[_i, _j], configName selectRandom _classes];
                for "_n" from 0 to 5 do  
                {
                    _tv tvAdd [[_i, _j, _k], configName selectRandom _classes];
                };
            };
        };
    };
};```
plush cargo
#

with listbox i dont believe you need to even change column, it keeps the picture ratio seen here

lone glade
#

use a ctrlEdit and do your search via sqf

lofty nymph
#

ok

plush cargo
#

tree also has tvsetpictureright or something like that

#

maybe that side keeps ratio?

lofty nymph
#

tried it

#

just compresses to right hand side

lone glade
#

nah, sizeEx controls it

plush cargo
#

you could also add a rsc picture that move y pos according to mousepos and xpos will stsay the same right next to the tree, click on tree rscpic shows next to it

lone glade
#

ooooor, use a listbox

plush cargo
#

shhhh they want to use the new fancy built in tree search

lofty nymph
#

how would i go about filtering a listbox then, say i type "katiba" into the rscEdit box. what function is best for sorting the listbox?

plush cargo
#

lbsort

lone glade
#

you make one using lbsort

lofty nymph
#

really, thought that was just alphbeticle

lone glade
#

well, it is

#

you remove items that shouldn't be there and "refill" the panel if the user removes characters

#

if you do caching for filling the panel it should be extremely fast even with a thousand items in the listbox

plush cargo
#

whats with the select random in there?

lone glade
#

where do you see selectRandom there?

plush cargo
#

not urs

lone glade
#

or god that recursive for do

plush cargo
#

was going to suggest that if theyre pulling from configs to load lb then the index will be the same could just search config isclass and get the index

#

wont work if doing it randomly though

lone glade
#

nope, index won't be the same

#

cache the config lookups, pull cached info when refilling listbox

#

for 623 items (weapons list with all my mods) the first run is about 140ms, the next ones are around 70-50ms

plush cargo
#

๐Ÿ‘

lone glade
#

but that's after dedmen did some major improvements, before it was around 200-300ms

plush cargo
#

@lofty nymph if you're interested...........

lofty nymph
#

?

plush cargo
#
 _baseRifles = "((configName (_x)) isKindof ['Rifle', configFile >> 'cfgWeapons']) && 
                (!isClass (_x >> 'LinkedItems')) && 
                (getnumber (_x>> 'scope') == 2)" 
                configClasses (configFile >> "cfgWeapons"); 
 _weapNames = [];
 {
    _weapName = (getText( _x >> "displayName"));
    _weapNames pushBack _weapName;
 }forEach _baseRifles;
 hint format ["%1",_weapNames];
#

base rifles only (no attachments)

#

also shows how to get the display name so your list is easier to read

#

suggest displaying the display name but storing the class in tvsetdata

lone glade
#

liiiistbooooooox

plush cargo
#

lbsetdata then :p

lofty nymph
#

thx, do u know a way of filtering out the weapon items as well i had an issue with them all comming through when i went through cfg weapons

plush cargo
#

i have something one sec

#

its pretty old though and i had very little idea what i was doing

#

really all you need is those type numbers in there

#

do not use all that count shit in there

lone glade
#

GOD DAMMIT USE PRIVATE
PLEASE FOR THE LOVE OF GODS, THOSE BRACKETS

#

aaaaaaargh i'm so triggered

plush cargo
#

lmao what did i say

#

and I quote, myself "its pretty old though and i had very little idea what i was doing"

#

gotta run, time for "stranger things" โค

lofty nymph
#

what is the use of private, i never understood it/

#

?*

lone glade
#

pushes the var to the innermost scope

#

so you don't somehow redefine it 4 scopes down and wonder why the fuck you're getting that "not a number" or type rror

lofty nymph
#

ok

earnest ore
#

Is there a nearObjects kinda method that searches inside of a square/rectangular area instead of spherical?

indigo snow
#

check with a radius of the largest diagonal and then do an inArea check for the square / rectangle

little eagle
#

@earnest ore

entities "" inAreaArray [position, a, b, angle, true];
#
position: Array -  center of the area in format Position3D, Position2D
a: Number - x axis (x / 2)
b: Number - y axis (y / 2)
angle (Optional): Number - rotation angle. Default: 0
meager heart
#

Hey, is there any way to replace default player animations without making an addon ?
I'm trying to create some sort of "better player actions" thing,
for example tactical ping with getsure https://gyazo.com/5cfbfdfd49bde4189971a8dfecb58324
and i have problem with throw grenades things.
I have this https://gyazo.com/bb3451381f34d6ff56828ae8b8fd6b61
It works like that: you hold throw button and see status bar wich display force and on key up it fires, but animations is only default one with forceWeaponFire or action UseMagazine with little 'zig hail' at start, sorry for bad english

earnest ore
#

@little eagle Hrm... Empty array.

entities [["House","Building"],[]] inAreaArray trigger;
#

Terrain objects not included, I guess?

indigo snow
#

no

little eagle
#

Terrain objects are not included.

#

In entities. Never tested if inAreaArray works with them. I'd say yes, but who knows.

#

nearObjects doesn't include them either afaik. And you have to be careful with the radius. You'd have to make it sqrt 2 times larger than the longest side of your rectangle. So that the square covers all the edges.

#

I think it was sqrt 2. Too lazy to think on a holiday.

#
nearestTerrainObjects [position, ["HOUSE","BUILDING"], sqrt 2 * (a max b)] inAreaArray [position, a, b, angle, true];
still forum
#

wat? I think you are on the wrong Discord.. @shell carbon

shell carbon
#

oh lol, didnt notice. Sorry and thanks for the heads up

lofty nymph
#

is there a way to stop the ditor pausing everytiume i hit escape?

#

editor*

lone glade
#

use MP test instead of SP

indigo snow
#

Theres also a launch param for it

#

-noPause ?

subtle ore
#

No pause runs simulation when alt tabbed

cunning nebula
#

@little eagle my hopes in nearestTerrainObjects have been crushed :/

#

was hoping it would be a good replacement for nearRoads

subtle ore
#

Wat

cunning nebula
#

but MAIN ROAD, ROAD, TRACK, TRAIL <--- all not defined

subtle ore
#

Why just not get the class?

cunning nebula
#

roads have no class

#

in fact they're not found by that command at all

#

even without any filter

subtle ore
#

Uhhhh....

lone glade
#

because roads aren't objects

cunning nebula
#

they're giving us false hopes :/

subtle ore
#

Rails are though?

cunning nebula
#

maybe

lone glade
#

rails aren't roads

subtle ore
#

No of course bnlt

#

Not

cunning nebula
#

but it would've been great to be able to differentiate between different road types with that command

#

just 1 solar power plant on altis ? i think not

#

oh hang on that was my fault there. it does list 10

subtle ore
#

๐Ÿค”

rancid pecan
#

Hello

#

how to selection question ?

#

example c# c# = example = Console.Readline(); if (example == true) else {}

#

How is the arma 3 te done?

subtle ore
#

@rancid pecan what does Console.Readline() do?

simple solstice
#

I think he wants to proceed on input

subtle ore
#

Meehhh you meddling c# kids are talking nonsense

cunning nebula
#

๐Ÿ˜ถ

subtle ore
#

๐Ÿค

tame portal
#

@subtle ore That's not even correct C#

#

Console.ReadLine() returns a string, and a string cannot be compared to a boolean

subtle ore
#

@tame portal /shrug
Don't expect me to be reading c# anytime soon

indigo snow
#

can BOOL == BOOL tho

tame portal
#

@indigo snow if (true == true) {

subtle ore
#

If(true)

#

Not if(true == true)

tame portal
#

if (true.ToString() == true.ToString()) {

indigo snow
#

i know sqf doesnt allow it but i was wondering if c# did

subtle ore
#

Ew wtf is that @tame portal

tame portal
#

I don't think so, compiler will throw an error because who the fuck does that

indigo snow
#

i know a guy

subtle ore
#

No one with brains

tame portal
#

Soon Microsoft will have taken over the world

cold quartz
#

if(true.ToString().Equals(true.ToString(), InvariantCaseInsensitiveCompare) ๐Ÿ˜‰

subtle ore
#

Looks fucking awful

tame portal
#

{
var up = new Exception("no");
throw up;
}

indigo snow
#

therefore it must work

cold quartz
#

lol

subtle ore
#

๐Ÿคข

tame portal
#

Hail C#

#

\[T]/

cold quartz
#

Could be worse. We could be writing vb.net

subtle ore
#

\ -_- /

tame portal
#

VBNET is the master of them all

#

Dim vbnetisstupid as Integer = 5

#

D I M

cold quartz
#

Whatever works

noble pond
#

its idiot language for people who've never programmed before lol, its not supposed to be like the hardcore languages

cold quartz
#

It's almost feature identical to c#

tame portal
#

I mean it uses .NET so everything is the same but the syntax

cold quartz
#

I think I read that MSFT plans to invest in c# and kind of let VB.net sit off to the side

tame portal
#

VBNET is not being supported anymore

#

and why the hell did my userlist in discord just disappear

rancid pecan
#

no no

cunning nebula
#

yes yes

rancid pecan
#

arma 3 yes no how do we ask?

#

๐Ÿ˜„

cold quartz
#

You want to create a prompt and get feedback?

#

er, get a response

cunning nebula
#

"how do we ask"

#

maybe you should ask yourself that

#

๐Ÿ˜‰

tame portal
#

@cold quartz Are you a c# dev?

cold quartz
#

yea, mostly just web app dev

tame portal
cold quartz
#

Yep

tame portal
#

Ah yeah I've been using WebForms for so long now, quite different to get into MVC, I mean the model isnt complicated, just need to force myself to stick to conventions

cold quartz
#

I took the same path.

subtle ore
#

Hey kids want some sqf?
I got some more in the van

hidden field
#

@subtle ore i have enough sqf for myself thx ๐Ÿ˜‰ (just noticed foreach returns result of last statement and foreach + apply allow exitwith inside of their loops while also return what exitwith should return, which is pretty neat if you ask me <.<)

earnest ore
#

Momwiki told me not to talk to strangers. They might remoteExec me.

dusk sage
#

can BOOL == BOOL tho
yes @indigo snow

little eagle
#

bool == bool errors

hidden field
#

oh my, looks like % (aka mod) does not like it if b ( a mod b) is a real number und would produce a 0 as return, instead it returns b O.o nothing you can't catch but something to be aware of

#

example 24 mod 1.2 ----> 1.2

dusk sage
#

@little eagle Was on about C#

little eagle
#

ok, sry

#

Nesias, modulo is only defined for whole numbers as quotient in maths.

#

"divisor"

hidden field
#

commy2: yes it is defined for whole numbers but it also can be used for real numbers

queen cargo
#

@hidden field think that actually is a rounding error

hidden field
#

@queen cargo maybe, "floating points" (afaik arma used fixed point number ?) can create rounding errors

lone glade
#

nah, all of arma numbers are floats

hidden field
#

funfact if you multiply both sides in my example by 10 (which would them integers) you will get 0 back <.<

queen cargo
#

@hidden field as I said
Probably rounding error

subtle ore
#

@hidden field i hear count is a good alt

dusk sage
#

funfact if you multiply both sides in my example by 10 (which would them integers) you will get 0 back <.<
Which is correct @Nesias#1812

still forum
#

@hidden field Every number in Arma is single-precision floating point.
For rounding it's probably using fmod

lofty nymph
#

anyone here know how to get vehicle and weapon descriptions from there cfg files?

still forum
#

configFile >> "CfgWeapons" >> classname >> "description"

lofty nymph
#

ty

cerulean whale
#

Is there a way to open the inventory while under water?

plush cargo
#

Is not always logged in description for some reason, had to do this a while back.

SRVC_fnc_VehInfo = 
{    
    private ["_text"];
    disableSerialization;
    _vehInfoCbo = ((findDisplay 5501) displayCtrl (14));
    _vehNameCbo = ((findDisplay 5501) displayCtrl (16));
    _veh = vehicle player;
    _class = typeOf _veh;
    _nameText = parseText (getText (configFile >> "CfgVehicles" >> _class >> "displayName"));
    
    if (isClass (configFile >> "CfgVehicles" >> _class >> "Armory")) then
    {    
        _text = parseText (getText (configFile >> "CfgVehicles" >> _class >> "Armory" >> "description"));
    } else
    {
        if (isClass (configFile >> "CfgVehicles" >> _class >> "Library")) then
        {
        _text = parseText (getText (configFile >> "CfgVehicles" >> _class >> "Library" >> "libTextDesc")); 
        };
    };
    _vehInfoCbo ctrlSetStructuredText _text;
    _vehNameCbo ctrlSetStructuredText _nameText;

};
real tartan
#

is there a way to make border of circle bolder?

#

_marker setMarkerShape "ELLIPSE"; _marker setMarkerBrush "SolidBorder"; _marker setMarkerSize [100, 100];

little eagle
#

is there a way to make border of circle bolder?
No for markers.

Is there a way to open the inventory while under water?
lol no

still forum
#

"@sterile mica Harris#7502" No not really

#

Discord?! WTF

queen cargo
#

Wp @still forum

tame portal
#

I like how discord knows who you want to tag

#

And then it still fails

#

Like wtf

#

Stop giving me suggestions if you can't handle them yourself discord :D

cold quartz
#

So, I've been told that if in the unit description I add something like Team leader @ Viking 1-1 that in the lobby, the group name will be listed as Viking 1-1 and the unit will be listed as Team Leader beneath it. Is that correct?

#

Hmmm, maybe I should post this to mission_makers instead...not specifically a scripting question. Well, getting to the scripting part: does that actually change the groupID of the group they belong to or will the group continued to be named Alpha 1-1 or somiliar?

indigo snow
#

thats when you use CBA

#

it doesnt change the groupID at all, its just a hack of the gui of the slotting screen

little eagle
#

Yeah. It has nothing to do with the group id anyway. It's the RoleDescription of the group leader (first slot displayed for each group in the lobby).

cold quartz
#

Ok. That's kind of what I thought. Do you know of a way to programmatically retrieve that? It's CBA specific feature so I should go ask them but maybe you know of a way off the top of your head?

lone glade
#

commy wrote that code just saying

cold quartz
#

I completedly missed seeing that link

little eagle
#

Are you trying to replicate this without mods?

cold quartz
#

Ok, the reports that I had received had people saying that in susbequent radio communications, stuff like that, that the group name specified after the @ would also appear...it made me think that it may have been affecting the groupId and that I could poll it from there.

little eagle
#

No, it's just for the lobby. To name a group, do as usual and name the group in the editor.

cold quartz
#

Na. Some players want to see their lobby names in Athena and I'm trying to figure out how to grab that info. I'll probably just end up having them use setGroupId or something.

#

Gotcha

lone glade
#

"lobby name" you mean profileName?

cold quartz
#

No, sry, the slot names that the @ thing creates

little eagle
#

You have to enter the group names twice if you want them to match ingame and in the lobby unfortunately.

#

If it were possible I would've avoided that. But this was the only way to get the group names into the lobby screen. By changing the name of the leader to include the group name and then have an ui script that breaks them up.

cold quartz
#

Hey man, no explanation needed. Most people would only care about how it looks in the lobby anyways.

little eagle
#

Same. I didn't care how, just wanted it to work. But I love this shit and can't stop running my mouth about it.

cold quartz
#

lol completely understandable

#

This stuff is like building a house, the builder notices all the tiny litlte mistakes or things they'd like to change. The rest of us just see a nice house.

lone glade
#

MCC is a public port-a-potty

#

yeah, a bit rude to port-a-potties

little eagle
#

Where did this come from?

lone glade
#

the "house" metaphor

cold quartz
#

and this is where I exit..thanks for the help!

little eagle
#

port-a-potties
Mobile toilet?

lone glade
#

I wonder if it was updated...... I wanna look now....

little eagle
#

What's so bad about toilets? If you happen to need one, and none's there, you're fucked.

lone glade
#

they tend to smell and not be very welcoming when there's a lot of people using them

#

3 years later, still not using git properly

little eagle
#

Zeus is pretty bad. You should at least do better than zeus.

#

and not be very welcoming when there's a lot of people using them
That's a problem with people. not toilets.

#

It's acceptable. If it were perfect, one would complain about priorities.

lone glade
#

AI is fine imho, pathing algo could be better tho

#

it's not really AI at that point, it's bloat making the FSMs run slower and thus dumbing down AI

#

that's default behavior in safe, it's normal

little eagle
#

It's not a problem with advanced AI scripts like the fsms. They can't even enter doors reliably without getting stuck. AI is fundamentally broken.

lone glade
#

yup, which comes back to pathing algo

#

depending on the height of the building it either works or completely shits the bed

little eagle
#

Everyone has their pet peeves, huh?

cosmic kettle
#

regarding ai, is there a mission one could look at to get a grasp of how it's done right?

little eagle
#

Yes. Wish the API was low level, but with what we have, nothing can be done to mend the biggest issues.

cosmic kettle
#

I mean from a scripting pov. Having a hard time on how to get squads do exactly what I'm asking certain times...

#

like too many obstacles and they freeze imo

#

glad to know it's not just me then.

cosmic kettle
#

thx @tough abyss I'll check that out.

lavish hamlet
#

does anyone know why this doesent work ??

if (!isServer) exitwith {};


_armorSpawns =  ["armor1","armor2","armor3","armor5","armor6"] call BIS_fnc_selectRandom;

_armored =[getMarkerPos  _armorSpawns,0, "rhs_t72ba_tv" ,EAST] call BIS_fnc_spawnVehicle;

[_armored, getmarkerpos "patrol", 1000] call BIS_fnc_taskPatrol;


it spawns but i dosent move.

plush cargo
#

BIS_fnc_spawn vehicle returns = [vehicle, crew, group] and for task patrol you need the group so it shoud be
[_armored select 2,getmarkerpos "patrol", 1000] call BIS_fnc_taskPatrol;

#

@lavish hamlet

simple solstice
#

@lavish hamlet use selectRandom

#

instead of the function

lavish hamlet
#

tried both diden see a difference

simple solstice
#

just a side note

#

performance improvement

lavish hamlet
#

ahh okay ๐Ÿ˜ƒ

#

thanks

simple solstice
#

engine solution > function

blissful chasm
#

Since the recent CUP Terrains update, the hangar doors default closed on server start. I had asked in the questions channel how do you make the default open on server start. I got a reply of using Door_7_sound_source. I am very novice at scripting. Could someone be so kind as to spell it out for me? Not sure how to do this, or where to put it.

golden storm
#

Hello there guys, so im having quite an issue here, im making a PvP mission and i want that: players have 4 respawns, but then after thats finished each side have their own pool so WEST has 16 tickets and INDEPENDENT has 8 tickets (assymetrical map balanced trough other conditions), so far i have this in my InitPlayerLocal.sqf

[player, 4] call BIS_fnc_respawnTickets;
[WEST, 16] call BIS_fnc_respawnTickets;
[INDEPENDENT, 8] call BIS_fnc_respawnTickets;

And i have this in my Description.ext

respawnOnStart = -1;
respawnTemplates[] = {"MenuPosition","Tickets","Spectator"};

But after the first 4 tickets are expired (don't matter which side) it says no more respawns are left

meager heart
#
respawnTemplatesWest[] = {"MenuPosition","Tickets","Spectator"};
respawnTemplatesGuer[] = {"MenuPosition","Tickets","Spectator"};
#
[player, 4] call BIS_fnc_respawnTickets; //--- Local tickets
[SIDE, 66] call BIS_fnc_respawnTickets; //--- Global tickets
devout moss
#

Hi, am I able to redefine vehicle parameters with a script in a mission?

rancid ruin
#

like the speed of a helicopter for example? no i don't think so

still forum
#

attach charge IMO

#

or "attach bomb"

little eagle
#

Plant Charge

jaunty zephyr
#

attach

#

or maybe "set up"?

meager heart
#

Sabotage ยฉ

still forum
#

I'd say that's the easiest..

#

getPosASL returns position of feet afaik..
That is about the position of the surface

dim notch
#

Looks like I used "Place Explosive Charge" mainly because BI uses the longer name

little eagle
#

The adjective "explosive" is superfluous. There are only one type of charges.

austere granite
#

Cavalry charge

#

like you use that action and suddenly rohirim come charging down the fields tbh

tame portal
#

I only plant implosive charges.

cedar kindle
#

plant cavalry charge ?

little eagle
#

"Explosive Charge" is the displayed name of the item, right?

#

This all reminds me that the game still says "Ride in back" for the codriver seat.

#

Every with a codriver seat.

#

Hunter.

#

And?

#

Read again what I wrote.

#

"Ride in back"

#

Somehow that's not confusing when he sits down in front?

#

"Get in %1 as passenger"

lone glade
#

oh god I can't wait for enScript, that's gonna be F.U.N to explain compared to sqf

#

ofc

little eagle
#

Why?

lone glade
#

check TKM

#

yes

#

if by more conventional you mean not shit yes it is

#

wat, how do you know that already

peak plover
#

Pvp ? More like illegal salt mines!

lone glade
#

there was that (sorry if I hurt anyone's feelings) pathetic attempt at a pvp gamemode called end game, except for that I don't see it catering to anyone in particular

#

LOW campaign was a really high point for me, it was wonderful

#

because they did put a lot of work into it, but it's kinda sad that it ended up the way it did

#

but then again, it didn't play to arma's strengths, CQC isn't one of them

peak plover
#

If they would fix the animation bug, when it keeps moving forward when you stop pressing the button

#

And the turning around in buildings and falling through/into walls

lone glade
#

that's the animation cycle not being finished, it also happen when you setPos a unit running

peak plover
#

That's like super bad

lone glade
#

it's fixed in enfusion afaik

peak plover
#

koth

lone glade
#

objectives? people play for kills

#

I don't consider KOTH a proper KOTH gamemode, it's badly designed too (the towers at least)

#

which I find mind boggling

#

and also terrible game design because it uses people's brain against them

#

or good game design, depends if you wanna make money or not

#

I can probably throw out a koth gamemode under 30 minutes with better objectives and that works on all maps, sure it won't be balanced but fuck it

tame portal
#

Personally I don't know why KOTH is as popular as it is, I personally have no joy in dying to a spawncamper and then taking 5 minutes again to the playzone

lone glade
#

all you need is 2 spawn points, a zone and a trigger / nice numbers

#

remove all those

tame portal
#

I was about say

lone glade
#

not needed

tame portal
#

That's an ArmA milsim mission, not a casual multiplayer gamemode

#

Budget milsim lol, like a casual milsim mission, but not catered towards casual ArmA players ๐Ÿ˜›

lone glade
#

I still don't get what's the point of the leveling system

#

and you just lock shit behind leveling just for the lolz, everyone's not on the same playing field

tame portal
#

Leveling and grinding is something people consider the reason of playing rather than the joy you have from good game design

lone glade
#

sure it keeps people playing, but all in all it's not fun

#

and I find that sad ๐Ÿ˜ฆ

#

same, but then again people just flock to leveling systems because at the end of the day, some of them like having an advantage against beginners

candid jay
#

All, I'm trying to understand how the Advanced Train Simulator works. To my understanding it is not a common vehicle, but I am unsure on how all the system works. Especially in MP: how does the position of the train is sync'ed in MP?

#

To make things simple: if I has a CUBE object a player could jump in, and this cube just went back and forward like a platform

#

how would the best approach be

#

NO CONTROLS

#

something self-driving

#

I can use the attachTo command ok, but what about having it actually MOVE?

lone glade
#

setPos like a mofo / setVelocity if it's a thingX

candid jay
#

setPos in MP works very badly.

lone glade
#

O.O? wat?

candid jay
#

well

#

if you want to have something move smoothly

#

having a setPos command every 0.01 seconds obviously results in the object jumping around for clients

#

so setVelocity is probably what I'm looking for

lone glade
#

depends, but you're going to do a lot of vector math in any case

little eagle
#

Only people that worked on Advanced Train Simulator know how it works.

candid jay
#

that's fine

#

When I did my export to TB module I had to do vector math anyways

#

cannot be

#

I've tried with simple rails targets

#

you want that to be computed on server

#

so to make it move with setPos you'll have jumps

#

setVelocity on the other hand is a good suggestion

#

@tough abyss exactly

#

setPos, that is

little eagle
#

setVelocity probably doesn't work with buildings like trains.

lone glade
#

it has to be a thingX, plus if the terrain has bumps good luck ๐Ÿ˜„

candid jay
#

I could have a setVelocity (global effects) and upon reaching a checkpoint, a setPos to ensure all clients are sync'ed

#

lol

#

I am not trying to remake ATS, we have ATS already ๐Ÿ˜„

#

I guess I'll have to make a vehicle

#

will give it a try

little eagle
#

Pretty sure that that

#

require some changes to the model.

#

E.g. buildings have no PhysX.

candid jay
#

regarding computations: setVelocityTransformation seems to be doing it for us

lone glade
#

not only that but you can't really take a building model and change it's config to a vehicle

candid jay
#

yes

#

but I'm building the models anyways

little eagle
#

Maybe helper vehicle and attachTo though.

lone glade
#

buildings can have anim sources

candid jay
#

yes

little eagle
#

Buildings can have animations. E.g,. doors or broken windows.

candid jay
#

but again not redoing ATS that works beautifully already ๐Ÿ˜„

lone glade
#

not spinning the spinny thing in playgrounds around altis -> terribru

little eagle
#

I've seen the action and immediately made it spin.

lone glade
#

imho it's pretty realistic for a greek island

#

I just wish there were more signalization signs, it makes no sense that on nearly every map there's so little of them

#

but AI is quite... special on it

#

that's why you got smoke

sour saffron
#

@alhanthe "not only that but you can't really take a building model and change it's config to a vehicle"

lone glade
#

what?

#

ace smoke is super dense, and LOD issues are fixed on dev branch

#

well, pop more smokes then :p

sour saffron
#

just go behind a wall its been the way to defeat Ai since OFP 2001

lone glade
#

as long as you're not moving in a predictable manner AI won't hit you through smoke, they just shoot your last position

#

same for bushes

sour saffron
#

well actually in Arma 1.2 or so they went Meter accurate and that was the end of all inteligent AI

#

infact nothing on the map would move until a shot was dired and then it all initialised in early 1.01 or so lol

#

ithink the best was the OFP enahncement mod AI that search builidngs etc good stuff and after that well i think Bis became scared to add Ad-Hoc scripts for them

#

maybe now the game isnt so much VBS driven in its goals it wil lachieve some smaller teraains and better scriptsed AI

lone glade
#

AI works fine right now

#

it's just the pathing algo being totally fucked

sour saffron
#

lol can we getsome facts injected back into this pelase

lone glade
#

gimme 5s

sour saffron
#

well ill give you a bridge and some water and trees will that be ok ?

#

ill give you geometry too and roads and a car

#

you give me AI to navigate and ill be happy

lone glade
sour saffron
#

yeah i admit the AI has its moments , ive seen them roll under a gap in a fence without scripts

lone glade
sour saffron
#

problerm is its to rare and some ad-hoc assistance is required in the mai n

lone glade
#

biggest issue right now is building height differences, there's some of them AI simply refuses to access

#

and no, doesn't work quick, they just ignore the Z pos on some buildings, doesn't matter what the height

#

they just can't path to the entry

#

they get stuck in a "planning / busy" loop

sour saffron
#

well most folk play PvP now anyway so Ai aint gonna get any love soon

#

maybe there will be AI DLC ๐Ÿ˜ƒ

lone glade
#

oh btw, that garrison stuff is in ACE3 now, i'm pretty sure people are using the instant TP one tho

tame portal
#

@lone glade Maybe the Ai has no path there available

lone glade
#

no, it does, i'm forcing full path planning too

#

it's just that they somehow can't path for some unknown reason

#

they just get stuck trying to path / staying there until my fail safe kicks in and force them to return in formation

little eagle
#

We need #ai to get this poop out of here.

tame portal
#

This isn't poop commy

#

๐Ÿ

proven crystal
#

I think many people would play more coop and pve if AI was more I @sour saffron

sour saffron
#

AI is for SP and best left there , CO -OP died with gamespy servers like shell.co.uk ๐Ÿ˜ƒ

little eagle
#

I like pineapple.

tame portal
#

What was that comment about the last Ai developer leaving BI?

proven crystal
#

We do 30ppl coop. Pve

sour saffron
#

Kellys Island and Lakeside dont need AI ๐Ÿ˜ƒ

lone glade
#

PVE is fine guys, just don't try 60+ players against 60+ AI, at that point AI is brain dead

proven crystal
#

We need 1 or 2 zeusses to keep it interesting

sour saffron
#

zonal AI is best practice

#

them missions wrked best in MP

little eagle
#

Scheduled fsms are too slow to handle so many ai.

lone glade
#

the best part is that even tho they have their own part of the scheduler they somehow get slowed down by sqf scheduled scripts

#

same for triggers, they somehow break after some point

sour saffron
#

becuase the grahics card need CPu to help with 3 million poly addon

lone glade
#

wat

sour saffron
#

custom addons are inifficent and slow down the AI

lone glade
#

k

little eagle
#

Textures are worse than polys for fps.

sour saffron
#

sections are worse

proven crystal
#

If only vcom wasnt that cpu hungry

#

And ALiVE a little less buggy (for me)

lone glade
#

vanilla AI is still the best AI imho, unless you completely replace absolutely all AI FSMs by "custom" ones

proven crystal
#

Id be a happy soldier

#

i like what VCom does

#

yea. well VCom can limit the amount of units involved

#

so only a certain maximum will be doing VCom stuff

#

pretty much what you say

#

not sure though if it will affect the FIRST units involved in fighting, or the ones CLOSEST to the player

#

hmm sounds interesting

#

actually i could add a script that sets VCOM_AI true or false depending on how close units are to the player...

#

that might be handy....

#

hmhmhmhm good thought

#

maybe based on knowsabout value?

#

if unit knowsabout player, vcom true

#

knowsabout and proximity sounds useful

#

?

little eagle
#

Good. Now change the topic.

proven crystal
#

thanks man. that stuff might be helpful

tame stream
little eagle
#

I did this once in ACE, but it apparently broke. Too lazy to look into it.

tame stream
#

did/does ace have that option?

little eagle
#

ACE has a custom altimeter item that replaces the watch. To make it useful, it removes the magic altimeter from the ui.

#

But now there's this issue report I haven't looked into, so it may be broken.

native siren
#

Hello I have some issues with undestanding certain problem I'm having. I have if(isNull _gID) exitWith {}; on my server to check if parameters have been passed correctly. I'm 100% certain that they are (in my case it's number 13). But for some reasont this IF is exiting my function. If I just remove it it works perfectly fine. I also tried isNil same resaults. Can someone tell me what am I doing wrong?

lone glade
#

isNull is for objects

#

isNil is for vars, they have to be quoted

native siren
#

@lone glade So like this in my example? if(isNil "_gID") exitWith {};

lone glade
#

yes

native siren
#

@lone glade You are a champion. Those missing quotes were driving me insane. Thank you! ๐Ÿ˜„

cold quartz
#

Oh, thanks! @hasty violet

#

I saw that 'whale' of a message you left ๐Ÿ˜‰

#

The displaying all 'revealed units' thing I'm specifically avoiding. I've had people accuse Athena of being cheaty enough ... and that was before it displayed hostiles.

cold quartz
#

Oooooooh!

tame portal
#

@cold quartz What's your Steam page?

cold quartz
#

Um, 1 sec

#

finishing up a reply to whale's discussion post and i'll grab it for you

#

Whale: I replied

subtle ore
#

okay quick question here reagarding serverCommand

#

there doesn't seem to be anything wrong with it I guess, server log tells me it was successfully executed by the server

#

tried both the name and guid, but nothing appears in the bans.txt or the ban.txt

#

Password is correct

#

no ban

robust hollow
#

this works for me "pass" serverCommand "#exec ban 'steam64id'";

subtle ore
#

@robust hollow steam64id ? Is that some sort of special variable?

#

or are you implying I should use getPlayerUID ?

robust hollow
#

no its the steam64id of the unit. getplayeruid yea

subtle ore
#

so this

"@Coffee234" serverCommand format["#exec ban %1",getPlayerUID _unit];

doesn't work.

robust hollow
#

string the uid

#

it needs to be in quotes in the string

subtle ore
#

Alrighty, letme try this out.

noble pond
#

you always use getPlayerUID for the baked in server commands

#

they existed and function the same way they have since arma 2

#

before steam was even a thing

subtle ore
#

Just now started using them man

#

ยฏ_(ใƒ„)_/ยฏ

noble pond
#

xd

#

ok

subtle ore
#

๐Ÿค”

noble pond
#

its quite possible they are broken.

subtle ore
#

Are you some sort of cool kid now Austin?

#

xD

noble pond
#

i think i heard somebody complaining about server commands not working as well a long while ago

robust hollow
#

i haven't had an issues with it recently

noble pond
#

alright then it must've been fixed

#

ยฏ_(ใƒ„)_/ยฏ

subtle ore
#

tightly crosses fingers

#

YES

#

Never have I ever been so excited to see the "You have been banned" message

noble pond
#

so did you try looking at the biki page for it?

subtle ore
#

Yes I did

noble pond
#

i want to know if its fukd

#

ยฏ_(ใƒ„)_/ยฏ

subtle ore
#

it works with stringing the player uid, yeah

#

but the biki says nothing about that because up until a3 they were all ingame and bercon commands it seems

#

nothing automated like this

noble pond
#

well you could always do serverCommand even in a2

subtle ore
#

right

noble pond
#

getplayerUID also existed

subtle ore
#

had to be through a ui event handler it seems though preceeding arma 3

#

that's what I'm trying to say

noble pond
#

lol really? thats really shitty

subtle ore
#

Yep

#

this worries me a bit, the bans are stored somewhere outside of my battleye working directory

#

can't find them at all, but they exist.

noble pond
#

bans.txt

subtle ore
#

Nope, nothing there

noble pond
#

not inside battleye folder

subtle ore
#

bans are still enforced, nothing in bans.txt

noble pond
#

look inside documents

subtle ore
#

Err...documents?

noble pond
#

if it isn't there then you will need to go trawling for it

#

yeah

cosmic kettle
#

check rpt for startup directory

#

?

noble pond
#

thats another place to look

subtle ore
#

Well, it seems to be taking my battleye rcon config

#

and using it for that matter

noble pond
#

so you can confirm this ui event handler stuff is BS?

subtle ore
#

Yep!

noble pond
#

i'll test it myself to double check lol

subtle ore
#

Post a3 yes

#

scuse me, post a2

noble pond
#

god this page is a mess

subtle ore
#

do you have wiki perms?

noble pond
#

yes

subtle ore
#

as of Arma 3 v1.39 serverCommand can be used on dedicated server and headless clients. This requires a password, both set in server.cfg and passed to the command itself (See Alt Syntax).

#

ยฏ_(ใƒ„)_/ยฏ

noble pond
#

whats wrong with that?

subtle ore
#

Nothing, I was just showing you that it doesn't need a UI event handler anymore.

noble pond
#

oh ok

#

i'll state that under it as well

subtle ore
#

Sweet.

noble pond
#

unfuckified

subtle ore
#

Awesome thanks ๐Ÿ‘

subtle ore
#

btw, looks like #exec clearbans doesn't work either lol

subtle ore
#

yep

#

just found it

#

why would it be there?

#

@tough abyss

#

battleye working directory is defined

#

I think one is for ip bans, and one is for guid bans

#

good to know though that they arent battleye bans

#

I need to differenciate between bad players and good players at this point

#

the ones I can ban ingame, versus the ones I ban via script

still forum
#

@subtle ore @noble pond
serverCommand needs to be executed from a UI Eventhandler ON THE CLIENT.
If you didn't need it on the client then I would consider that a Bug that should be fixed.

#

At most the Alt syntax might not need to run from an UI Eventhandler.
But then writing that serverCommand generally doesn't need to is bullshit.

cloud thunder
#

I have a simple working dialog with buttons but the first button listed in class Controls continuously blinks. I've tried adding blinkingPeriod = 0; in the control thats flashing and in base defines and still cannot get it to stop blinking. Does anyone know about this? I can pastebin the hpps if it will help.

lone glade
#

don't directly paste them, if you want examples for buttons and dialogs / displays I have one i'm working on right now

cloud thunder
#

have you run into the blinking issue?

lone glade
#

nope

cloud thunder
#

its like a cursor blink

lone glade
still forum
#

#arma3_config
I guess if there is a blinkingPeriod there is also a ? isBlinking flag

lone glade
#

yes, but it shouldn't happen if he uses the proper base classes

still forum
#

@tough abyss Have you tried it? The serverCommand main syntax not the alt one?

#

and sure you can run it from the Server. But you can only run the alt syntax on the server. and there is no UI on the Server. so UIContext there doesn't make sense anyway

#

The syntax requiring the password is the alternative syntax

#

not the main one

#

Does the alternate syntax work on clientside? If so the wiki is kinda wrong as it shows that Server-only Icon next to it.

lone glade
#

wat

still forum
#

Only being able to run from UI Eventhandler is a VERY reasonable security restriction. If it really works outside of it it is definetly a bug.

#

Yep that's what I was talking about.
@noble pond wrote that both serverCommand syntaxes work without UI Eventhandler. Which is either incorrect or a Bug

cloud thunder
#

This worked for me back when I was developing mission to support headless client.CCServerAdminPasswordCC serverCommand ("#kick " + "HC_1") where HC_1 was name of HC module and if (!isServer) exitWith {}; CCServerAdminPasswordCC = "blahblahblah"; publicVariableServer "CCServerAdminPasswordCC"; was external server arma directory script ran by the server. it worked a long time ago should still be working if nothing has changed.

still forum
#

Server's and HC's don't have a UI which I already said..
so UIContext doesn't make any sense there which I already said...

#

Ahh

#

Do you have an example of that ID string?

#

Ah.. It probably keeps an internal array then

#

Just look at BIS_fnc_setTask in the functions viewer it should contain the name of that variable.
I don't have access to Arma right now

#

@noble pond also
It is also worth noting it is not longer required to execute the serverCommand from a UI event handler, it can used directly inside an SQF script.
A UI Eventhandler is "directly inside an SQF script" and serverCommand is a SQF command so obviously it can be used in SQF Scripts. Where else would it be used? Besides that you again forgot about SQS.

cloud thunder
#

why not use BIS_fnc_setTask it has the same return as bis_fnc_taskCreate

peak plover
#

there should be a getter or sth

#
                private _taskID = [
                    _taskTarget,    //target
                    _group,            //name
                    _description,    //description
                    _destination,    //destination
                    _state,            //state
                    0,                //priority
                    true,            //show notification
                    _type,            //image type
                    true            //share
                ] call BIS_fnc_taskCreate;
#

            private _taskIDUpdate = [_taskVar, "SUCCEEDED",true] spawn BIS_fnc_taskSetState;
lone glade
#

from BIS func:
_taskVar = _id call bis_fnc_taskVar;

peak plover
#

yeah, most seem to return task

#

wait..

#

that's spawned

lone glade
#

what I pasted above is what bis_fnc_setTask uses to retrieve the var

cloud thunder
#

you don't want the task id? what var do you want?

peak plover
#

ooh

#

I think it's the ID that you get when you create the task?

lone glade
#

you can't use setVar on a string dude

#

taskVar is a string

peak plover
#

hmmm

#

compile?

lone glade
#

๐Ÿคฆ

#

taskVar is a string, it's not what you want

peak plover
#

Do they really notreturn the actual task ? The new task function ID is completly seperate?

lone glade
#

they return the task ID or taskVAR

peak plover
#

That's only used in the a3 functions, right?

lone glade
#

which, guess what, are both strings

#

yes

#

the commands are outdated

#

they were replaced by this set of funcs

peak plover
#

Just

#

workaround

lone glade
#

you want the destination maybe?

#

because the tasks are strings by themselves

#

nope

indigo snow
#

not with the new system

lone glade
#

that's the 3D markers

#

and they're not guaranteed to be there

peak plover
#

just have an array with the taskID and arguments

indigo snow
#

the old task system had task-type variables, but the new one is all strings and then some

peak plover
#

I'm pretty sure I ran into the same issue and ended up doing an array

lone glade
#

....

indigo snow
#

you cant setvariable a string

lone glade
#

task variable is a string

indigo snow
#

oooh

#

as in missionnamespace setvariable?

#

missionsetvariable [taskstring, value];

lone glade
#

a string, and no it's not available in any namespace

peak plover
#

depricated?

lone glade
#

strings can't be used as varspaces

indigo snow
#

task is tehh old task system

#

the new task system is all strings

#

as has been said

lone glade
#

and funcs

cloud thunder
#

yeah i believe all task properties are strings. probabably need to use some object or missionspace to hald the vars

peak plover
#

yup

lone glade
#

use a dummy object as varspace @tough abyss

#

or even better use CBA namespaces which do that for you ๐Ÿ˜„

peak plover
#

Use array.

lone glade
#

you . can't . setVar . a . STRING

peak plover
#

I had the same issue, because I wanted tasks to have conditions that auto-complete. Wanted the same thing, ended up with a task system which uses the a3 task system ๐Ÿ˜ฆ

#

So...stupid

lone glade
#

oh, I actually have something like that

peak plover
#

f3 etc. all probably have sth like tht

cloud thunder
#

f3 doesn't use tasks

#

at least when i play with em

peak plover
#

That's the journal task, but all the tasks are done with functions

#

I mean the f3 framework

lone glade
#

@peak plover you can precise the ID in bis_fnc_taskCreate, create your ID and use that for adding / deleting

cloud thunder
#

but f3 group don't use task sytem

lone glade
#

that's what I used for self completing tasks

cloud thunder
#

it might have code for it maybe but its not applied in sessions

peak plover
#

Are tasks jip compatable?

lone glade
#

yes

peak plover
#

If I create a task only for a single unit ex. blu_0_1

#

He disconnects

#

Will he/anyone else still ahve that task if rejoin?

lone glade
#

no

peak plover
#

ripoo broken task system

little eagle
#

allVariables is broken for TASK?

lone glade
#

@tough abyss just checked the func that is called to actually create the task

little eagle
#

i would hazard to say <task> setvariable is the non-functional bit
So getVariable is broken too?

#

getVariable therefore reports nil / default, right?

#

rip

lone glade
#

@tough abyss the "new" task system still uses simple tasks

#

_task = _unit createSimpleTask [_id,_taskParent];

#

sooo teeechnically you may be able to retrieve the actual task

#

_unit setVariable [_taskVar,_task];

#

๐Ÿ˜„

#

welp, you got your answer :p

peak plover
#

โœ ๐Ÿ‡ท ๐Ÿ‡ฎ ๐Ÿ‡ต โœ

lone glade
#

nah, you can retrieve the task directly

#

well, using remoteExec, but still.

peak plover
#

Intersepted namespace?

lone glade
#

no?

#

use the unit varspace

peak plover
#

profile/missionnamespace

#

on the server

lone glade
#

and absolutely DO NOT use profileNamespace for this

#

file is saved / written everytime the varspace change

peak plover
#

What if you need to restart the server but want to continue playing later?

barren magnet
#

Use profile Namespaces for it

#

XD

peak plover
#

What if server crashes

#

Better yet get a database connection on the server

lone glade
#

that's not a namespace

peak plover
#

that's a task_array

lone glade
#

in this case you're just using missionNamespace

#

objects, controls, displays can be used on top of the other normal varspaces, you're just using an array ref called "task_namespace"

peak plover
#
private _nameSpace = createLocation [ "Mount" , [0,0,0], 0, 0;
missionNamespace setVariable ["taskNamespace",_nameSpace,true]
little eagle
#

You can't use random strings for createLocation.

peak plover
#

hmmmm, that explains a lot๐Ÿค”