#arma3_scripting

1 messages Β· Page 493 of 1

tough abyss
#

@queen cargo just the way they're defined with _

queen cargo
#

enforced styling via functionality

#

the alternative would be some weirdo crap like in JS or python where global variables are "global" or not depending on a keyword that was placed somewhere fairly random

tough abyss
#
int number = 42; //global variable
void MyFunction()
{
    int myNumber = 12; //local variables
}

no need to bother with _

queen cargo
#

as JS will only put a variable in local space if you use the var keyword

tough abyss
#

state enforced styling

queen cargo
#

SQF is not typed in that way as you know

tough abyss
#

this is what sam hyde warned us about

queen cargo
#

as i said: you know SQF is not typed at compiletime so the above is not possible at all

compact maple
#

"int" this is so old

queen cargo
#

the alternative is what you see in JS or python

#

which is mindbogling horrible crap

compact maple
#

Its 2018 we shouldnt have to say int and crappy things

queen cargo
#

indeed @compact maple
even c++ nowadays got the auto keyword

#

SQF has the private keyword that works somewhat simmilar

#

and the reason for the differentiation of private and global variables was probably due to cost and the namespace problem

#

as global variables are not actually global variables

#

and rather sqf foo = "bar" is a handy shortcut for sqf missionNamespace setVariable ["foo", "bar"]

compact maple
#

didnt know that lol

earnest ore
#

If you know the type of variable you want to assign and result in, why would you type it dynamically over strongly typed?

queen cargo
#

it is not getting transfered to that in the SQF-Assembly @compact maple
but that is essentially what happens

#

@earnest ore ask pyhon, JS, Go, PHP, those weirdos using dynamic in C#, ... ppl

#

there is reason for and against compile-time known typing

tough abyss
#

Type declarations are pretty awesome when doing object oriented things

queen cargo
#

not needed there either
even SQF can be done object-oriented
though ... the implementations differ in speed and usability

tough abyss
#

Might not be needed, but when I'm doing a big project, even in PHP, it's good to actually declare in function parameters what types are expected

#

I'm not trying to comment here on sqf, just on the thing of why are people still declaring types in 2018

compact maple
#

^

tough abyss
#

And while I'm guessing it was just a tongue in cheek comment, this is the internet and I am bored πŸ˜„

real tartan
#

anyone have problem with Corpse Manager?

tested with
corpseManagerMode = 1;
corpseLimit = 1;
corpseRemovalMinTime = 5;
corpseRemovalMaxTime = 5;

added unit to NOT remove it
//removeFromRemainsCollector [unit1];

still got removed

meager heart
#

addToRemainsCollector/removeFromRemainsCollector < had no luck with those

#

(just mission eh works πŸ˜‰)

real tartan
#

Well I got corpse manager to remove dead bodies to improve performance, but I have set of "dead bodies" in destroyed convoy for immersion, but those corpses are getting removed so when players found destroyed convoy, no corpses around

#

I marked those corpses with removeFromRemainsCollector but they got removed anyway

meager heart
#

it's kinda works yes... but sometimes just fails silently, not reliable... 🀷

real tartan
#

yeah, like add loop to each killed unit to delete body after x minutes, and exclude those copses, but WHY, if we have nice BIS solution that should work

meager heart
#

that should work != works 🀷

real tartan
#

BIS taught me to find workaround for even simplest task, damn you BIS !

meager heart
earnest ore
#

Timing. Remove them from GC prior to making them corpses.

real tartan
#

@earnest ore so remove them from Corpse Manager before they become corpses ?

earnest ore
#

Mhm. Something like:

#
{ 
  _x setDammage 1;
} foreach (units this);
#

That's in the units init.

real tartan
#

@earnest ore Removing unit from GC before it becomes corpse - worked

earnest ore
#

Which begs the question, how do you pose the corpses?

real tartan
#

I place units in editor and run unscheduled script (execVM) on them where I setDamage 1 to unit. Before that I remove unit from GC

meager heart
#

execVM is scheduled dude πŸ˜ƒ

real tartan
#

@earnest ore makeCorpse.sqf where I setDamage 1 to unit, remove weapons, spawn blood around, add flies, add flies sound loop, etc ...

#

@meager heart yup, my mistake πŸ˜ƒ

meager heart
#

well... good luck! πŸ˜„

#

(i tried)

shadow sapphire
#

How might an addaction look that grabs a list of items from an inventory and adds them to a character, so that they don't have to grab items one at a time?

digital jacinth
#

It will be considerably more easy to just make the addaction add the items to the players witohut removing it form the box. unless you want limited ressources

shadow sapphire
#

Something like:

This addAction ["Equip Rifleman Kit",
_unit add ammo;
this remove ammo;
etc.,
];```
#

Roger. Limited resources is a necessity.

#

It's a persistent sandbox with a logistics system, so we have to order every *magazine to the field.

digital jacinth
#

very rough idea and not tested because i am at work

this addAction [{
    params ["_target", "_caller", "_actionId", "_arguments"];
    private _cargo = getItemCargo _target;
    _cargo params ["_items","_amount"];
    private _index = _items findIf {_x = "your ammo class here!"};
    if (_index >= 0 && {_amount#_index > 0}) then {
        _caller addItem "your ammo class here!";
        _target removeMagazineGlobal "your ammo class here!";
        _amount set [_index,_amount#_index -1];
    };
}];
digital hollow
#

Yeah... addItemCargo and clearItemCargo exist, but there is no removeItemCargo. I suppose you'd have to look at all the things in the ammobox and either give to player or save it somewhere. Then clear and the re-add.

digital jacinth
#

ther eis however removeMagazineGlobal

shadow sapphire
#

Interesting insight, @digital hollow, is there just a direct take item command?

#

Thanks, @digital jacinth, will look it over!

digital jacinth
#

i updated the code snippet a bit, so that might be going in the direction you want

shadow sapphire
#

Sweet! Thanks a ton. Will report results.

digital hollow
#

Does removeMagazineGlobal work on ammobox/weaponholder? It says for unit.

still forum
#

you probably want the cargoGLobal commands

digital hollow
still forum
#

OHH wait

#

You can't remove items from containers

#

you can just remove all and readd the ones you wanna keep

tough abyss
#

I think you can if you know item Id, which you don’t have means to obtain

#

Pretty sure you need to use let in JS if you want to limit var to a scope @queen cargo

queen cargo
#

was not 100% sure

#

possible

tough abyss
#

I got confused myself before too

#

I think var scopes to function while let scopes to code block or something like that

queen cargo
#

and people say sqf would be complicated .. πŸ˜„

tough abyss
#

πŸ˜„

#

it's the curse of continually updating languages to keep up with the times, you're gonna have a lot of old stuff sticking around

hollow thistle
#

Yeah, let is block scope while var is function/global scope. But it is sqf channel isn't it πŸ€”

tough abyss
#

SQF was only complicated for me because it was the first language i learned

#

now that i get it it's really pretty simple

hollow thistle
#

IMO learning sqf is harder if you were already working with other languages.

tough abyss
#

@hollow thistle nah not really

#

If you know c# or c++ it’s super simple

#

Or even lua for that matter

#

The learning aspect is part of the problem but honestly the main issue is always tooling. There are very distinct advantages to not making up another language unless you have to, many many languages could have been embedded and used for Arma's scripting purposes and then with the right integration we get decent debuggers and profilers and testing tools and all that jazz.

#

i mean i was able to get a basic rundown of C++ from a friend of mine and i pretty much got it

#

and the only language i'm proficient in is SQF

#

I can see why we might want a language that does things vastly different, it isn't like c++ is the best thing for everything, I'll choose just about anything other than c++ given the choice. But SQF isn't special as a language, it is pretty primitive and quirky. I don't rate it as far as languages go and from what I have seen from enfusion I don't think that is going to bring anything new or interesting either. Things could have just been easier, this feels like the more difficult path for BI and for the modders.

earnest ore
#

I will never understand this. Ever.

hollow thistle
#

binary operator that consumes code and an array 🀷

still forum
#

how about array and code :U

earnest ore
#

Cool, let me just pass this to another scripter.
Instead of immediately knowing that's a foreach from the beginning, he must go through multiple lines of code to find out it's a foreach loop.

queen cargo
#

@earnest ore

SQF;0;25;{ code } foreach array;
    BEXP4;0;0;
        CODE;0;10;
            VARIABLE;4;4;code
        BINARYOP;11;7;foreach
        VARIABLE;19;5;array
``` no problem bro
earnest ore
#

Completely backwards.

queen cargo
#

you could ask BI nicely if they would provide you with a copy-cat that just swaps the operators

#

<ARRAY> forEach <CODE>

#

if it makes you happy 🀷

earnest ore
#

Sure, I could. Would they?

queen cargo
#

as i said
ask nicely and it may happen

tough abyss
#

You just all spoiled because of apply and select, before those {} forEach [] was completely normal construct

mortal wigeon
#

Does cameraView work to determine whether a vehicle gunner is using his optics (control-rmb) or not?

tough abyss
#

Should return GUNNER no?

mortal wigeon
#

https://community.bistudio.com/wiki/cameraView

Says Returns mode of active camera view. Mode is one of: "INTERNAL" (1st person) "EXTERNAL" (3rd person) "GUNNER" (optics / sights) "GROUP" (commander view)

Which to me implies it might work but I'm not sure and I don't have a whole thing built yet to test it

#

Because weapon optics use a different keybind than vehicle optics and so I wonder if they're the "same thing" as far as Arma is concerned

earnest ore
#

As infantry, GUNNER is returned when looking down iron / scope. Same deal with vehicles by the looks.

dusky pier
#

is possible to run script in main menu?

still forum
#

yes

unborn ether
#

@dusky pier Main menu is also a display, RscDisplayMain it also can run events like onLoad if you replace them.

tough abyss
unborn ether
#

I don't believe its reversed but can trust that is not guaranteed by order.

#

That should be checked.

#

Especially if you use spawn in a remoteExec, since logically scheduled is not guaranteed by order 100%

errant jasper
#

It shouldn't really be referred to as the JIP queue anymore then.

runic surge
#

When calling a function that has optional values with default settings, how can you set a variable that comes after a 'blank' one when calling the function? So if I wanted to do [thing, otherthing] call function where the first element's default value is 'thing', but I want a different value than 'otherthing' in the second position

#

is this something that needs to be done within the function?

tough abyss
#

[nil, otherthing] ?

dusky pier
#

@unborn ether thank you!

tough abyss
#

Ok I’ll bite. The JIP order is precise, consistent and is exactly the order in which remoteExec commands with persistent flag were executed. Whoever tells you that there is no guaranteed order, the order is reversed and other nonsense - ignore it

dusky pier
#

i'm trying disable fn_feedbackMain.fsm use ```sqf
fn_feedbackMain setFSMVariable ["stopfsm",true];
terminate fn_feedbackMain;

tawdry harness
#

@meager heart it needs to be done through script before the mission fully loads up. For example a guy says "help page2" i need it to get the first and second bit of the message so i can run a script off of it.

keen pewter
#

someone known how to script throw of dice, i think i need use "random" but i don't have any idea how to build that type of script.

still forum
#

round random 6

#

returns 0,1,2,3,4,5,6 at random

queen cargo
#

ceil random 6

#

1, 2, 3, 4, 5, 6

still forum
#

ah yeah. round would have lower chance for 0 and 6

queen cargo
#

actually the problem is that you either do not want the 6 or the 0 πŸ€”

#

though .. that part is true too 🀷 πŸ˜„

still forum
#

selectRandom [1,2,3,4,5,6] Β―_(ツ)_/Β―

unborn ether
#

round random [1,3,5]

meager heart
#

random 6 < will not return 6 afaik πŸ€”

#

Random real (floating point) value from 0 (inclusive) to x (not inclusive).

#

from the wiki ^

still forum
#

Yes it won't

#

highest value is 5.99999999999999999999999999

#

but rounding 5.5 should return 6.

meager heart
#

πŸ˜ƒ 🀷

earnest ore
#

floor(random 6) + 1

meager heart
#

why + 1

#

just ceil or round πŸ‘Œ

earnest ore
meager heart
#

and ? πŸ˜ƒ

earnest ore
#

round is weighted against the min and max.
If the stars align, ceil returns 0. Die creates a wormhole.

#

The above is uniform, +1 just shifts 0 - 5 to 1 - 6.

#

Enjoy your working die.

#

Now you can D&D in your ARMA.

meager heart
#

ceil random 6 < what's wrong here ? πŸ˜ƒ

earnest ore
#

... I just said what's wrong.

meager heart
#

πŸ™ˆ

earnest ore
#

Enjoy your illuminati die.

#

With 7 sides.

meager heart
#

my post above was about > just random x will actually not include x, nothing there about dice... πŸ˜ƒ

earnest ore
#

@keen pewter asked about how to implement a dice.

crystal meadow
#

?

compact maple
#

lmao

crystal meadow
#

😬

real tartan
#

_group = [position player, civilian, 5] call BIS_fnc_spawnGroup; civilian is not a side ?

#

try it, it will not spawn 5 civilians :/

#

if I do _group = [position player, civilian, ["C_man_1", "C_man_1", "C_man_1", "C_man_1", "C_man_1"]] call BIS_fnc_spawnGroup; that is working. BIS get your shit together πŸ˜„

unborn ether
#

BIConsistency β„’

meager heart
#

i guess there are no cfgGroups for civs πŸ€”

unborn ether
#

Anarchy!

meager heart
#

oh... nvm... that function not uses cfgGroups... πŸ˜”

#

#BIConsistency then

#

setUnitAbility does something (afaik was disabled) ?

unborn ether
#

_this param [10,10e10,[123]]; πŸ‘€

compact maple
#

^wut

queen cargo
#

default value of 10e10 🀷

#

aka 1e+11

tame lion
#

So i have a system that is meant to persist FOBs that people are building in my mission, and im having an issue with the objects not being returned to their correct positions on load (I figure because of collisions). Here is what I've tried so far:

            _x params ["_class", "_pos", "_dir", "_vector"];
            _obj = createVehicle [_class, _pos, [], 0, "CAN_COLLIDE"];
            _obj enableSimulationGlobal false;
            _obj setPos _pos;
            _obj setDir _dir;
            _obj setVectorUp _vector;
            _obj enableSimulationGlobal true;

What does it take to make sure an object gets put at an exact poisition w/o the issue of it getting misplaced due to collision?

compact maple
#

I dont really think you can avoid that, because when creating it it always face the same direction and then it turn, from my experience...

tame lion
#

what if i turned it and then set pos?

#

that seemed to yield much better results

#

im guessing setvectorup and setDir take collision into account, and setpos doesn't

digital jacinth
#

@tame lion I have a similar systme to create whole towns from scratch. I ran into the same problem of the object being slightly misplaced. You can use getposWorld and setposworld, as these do just set the object withotu checking collision.

Another thing is use setVectorDirandUp for dir and up vector

tame lion
#

ill have to change that then, although it seems simply placing the object last did the trick for me though

digital jacinth
#

setposworld is also a bit faster then setPos, not that it matters for many things, the useful part is really that it does no collision checks.

young current
#

@tame lion use the other setpos commands

tame lion
#

would you recommend ATL?

young current
#

imo ASL is more accurate

#

or setpositionWorld

#

the order does matter

proven crystal
#

can units with simulationdisabled not complete waypoints for some reason

#

?

young current
#

depending on what is used as the object center

proven crystal
#

i mean i move them by setpos to location of their waypoints

young current
#

sounds logical

#

if their simulation is disabled they should interact with the world less

proven crystal
#

hmmm that would explain some issues

#

can i make the waypoint completed somehow?

#

id like it to execute its statement

tawdry harness
#

@meager heart it cant be done through debug console

proven crystal
#

I could probably put in a different condition for the waypoint?

#

Like proximity or so?

#

So it would work for units with and without simulation enabled?

#

I suppose the β€œtrue” there could be replaced with something

earnest ore
#

My googlefu is weak, is there any information on how to manipulate keyframe animation modules from EDEN via sqf?

keen pewter
#

i think of something like show adaction on any item (throw dice) and show resulted for all people on server in hint but i don't known how to property usage "random" command

tough abyss
#

what's the command to import a .p3d model into arma 3 mid-mission?

#

i know it exists, i just can't remember

keen pewter
#

you guys show mi some light for my question

tough abyss
proven crystal
#

you have a shooter and your idea of entertainment is a dice game?

earnest ore
#

Roll 1.
Critical failure.
Russia launches tactical nuke - it's super effective.

proven crystal
#

russian roulette simulator would be similarly interesting

silent bough
#

Hey guys, a little question, it seems I can't use "sleep" in a function wich is called by a event handler, is that true ? And if I'm right about this point, how can I do the same thing ?

still forum
#

eventhandlers are unscheduled

#

yes you cannot sleep

#

you can only sleep in scheduled scripts. Which you can "create" by using the spawn command

silent bough
#

Ok thank you, I try this now.

#

Ok, I have what I want, thank you.

simple solstice
#

Is it possible to check the platform of the client?

#

Whether it's 32 or 64 bit

real tartan
#

_array = _array - [_x];

#

is there different way to delete element from array ?

tough abyss
#

productVersion @simple solstice

simple solstice
#

@tough abyss thanks, I asked google the wrong questions then!

tough abyss
#

deleteAt deleteRange

tropic orbit
#

is there a script for random mission makers for invade and annex

iron osprey
#

Does Arma's modding capabilities allow for sidechain compression of sound? Example: While a loud explosion noise or gunshot is heard near the player, all other audio is temporarily lowered in volume

still forum
#

ACE hearing kinda does that.
Loud shots make you deaf. Makes everthing else go more silent

iron osprey
#

Does that mean there is an API to independently adjust the volume of every sound being heard by the player?

still forum
#

independently no. All sounds at once, yes

iron osprey
#

got it, thank you!

#

If I am not mistaken, there are two ways to mod Arma: through CPP and through SQF. CPP offers more customizability, is this correct?

still forum
#

no...

#

CPP and SQF are used for completely different things

runic surge
#

cpp is just configuration

iron osprey
#

got it, thank you Rylan

#

I was going off of a memory from seeing a CPP mod be able to remove zoom on all weapons

still forum
#

Yep. That would require CPP and not be possible with SQF

#

and there are many things that are the other way around

#

Also you can write SQF inside CPP files. So that question overall is a little unclear

iron osprey
#

lol oh man

#

dang, I wish I had access to the list of all sounds a player was currently hearing

runic surge
#

If you are making a mod,you would need it and you can use config entries in scripts but it's not like you can create new commands or anything drastic

still forum
#

Without Intercept that is πŸ˜‰

runic surge
iron osprey
#

oh snap, Intercept allows me to write all of my SQF scripts in CPP? That sounds like a great vehicle to get me exposed to CPP

#

my day job is Javascript, and I am always eager top get more low level πŸ˜‚

still forum
#

What CPP are you talking about?

iron osprey
#

CPP = C++

still forum
#

Arma configs are cpp files but they are not c++.
Intercept is a C++ SDK.

runic surge
#

it is just the same syntax if I understand correctly

iron osprey
#

@runic surge awesome! taking a look

tough abyss
#

It is long long way from JavaScript to C++

still forum
#

Yes. Intercept could do that for you. Keep in mind that it doesn't work with battleye yet and that every player needs it loaded as a mod.
Both these downsides don't apply to SQF

iron osprey
#

oh, thanks for the heads up @still forum

#

Omg, a sound filter can have its own cutoff range? AKA a low pass filter can be partially engaged at range? That is so tight!

runic surge
#

yeah the new sound system is pretty cool

#

it's not that new

iron osprey
#

#DJArma

#

I've moved over from Propellerhead Reason to Arma for my new Witch House songs

queen cargo
#

@iron osprey there also is sqf-vm to use sqf outside of arma 🀷

iron osprey
#

: O

#

/proceeds to write angular applications in sqf-vm

drowsy axle
#

Is the use of (str _x) in this, acceptable? ```sqf
_addons = activatedAddons;
_addonsSTR = [];
{
diag_log format["[CAP Addons Check] %1 - %2",(getPlayerUID player),_x];
_addonsSTR pushBack (str _x);
} forEach _addons;

_timestamp1 = time;
sleep 60;
_timestamp2 = time;
while {_timestamp2 > _timestamp1} do {
CAP_timeout = true;
};

waitUntil {"BW_WalkableMovingObjects" in _addonsSTR or CAP_timeout};

if ("BW_WalkableMovingObjects" in _addonsSTR) then {
[
["SYSTEM","You have an activate Addon that is not Allowed. Please unload: Walkable Moving Objects | @WMO - Walkable Moving Objects.",0],
["SYSTEM","You have an activate Addon that is not Allowed. Please unload: Walkable Moving Objects | @WMO - Walkable Moving Objects.",5],
["SYSTEM","You have an activate Addon that is not Allowed. Please unload: Walkable Moving Objects | @WMO - Walkable Moving Objects.",10],
["SYSTEM","You have an activate Addon that is not Allowed. Please unload: Walkable Moving Objects | @WMO - Walkable Moving Objects. YOU WILL NOW BE DISCONNECTED FROM THE SERVER!",15]
] spawn BIS_fnc_EXP_camp_playSubtitles;
sleep 15;
["end1",false,5,true,false] spawn BIS_fnc_endMission;
};```

ruby breach
#

activatedAddons is already an array of strings

tough abyss
#

Why do you want string of a string?

ruby breach
#

Delete everything above the if check, and then use ```sqf
if ("BW_WalkableMovingObjects" in activatedAddons) exitWith {};

queen cargo
#

wut? in is case sensitive

ruby breach
#

Correct. so if "BW_WalkableMovingObjects" isn't cased correctly, it's not going to work properly

tough abyss
#

Or use findIf

queen cargo
#

or the mod gets renamed
or or or

drowsy axle
#

activatedAddons gets the .pbo name correct?

still forum
#

shouldn't

#

should get the CfgPatches name I'd say

tough abyss
#

I think activatedAddons return lowercase names but not 100% sure

#

Like with allVariables

ruby breach
#

All the arma 3 default addons are returned as lowercase, but not 100% sure if that's because of the command, or the addons

drowsy axle
#

Sorted it. Thanks @ruby breach

#

taken from config.binsqf raP    CfgPatches I CfgFunctions Γ› CfgVehicles Γ§   BW_adaptive_roadway h Γ› units

runic surge
#

is it possible to get a model's bounding box dimensions without useing an object?

#

I need to get that info without spawning any objects

young current
#

like live in game?

#

I dont think thats possible

#

whats the goal?

runic surge
#

I am using info like slope angle, steepness, position, etc, and those same parameters of positions within the bounding box area of a given object to determine if the location is a good place for said object to spawn

#

so if there is a drastic change in 'steepness' on one side of the position within the bounding box, the position isn't good

young current
#

you probably could form some sort of a database to read from

#

but other than that can see a way to do it without spawing the object first

runic surge
#

I already use object presets so I guess I'll just add some more elements to the array of each object

#

minor inconvenience really

#

using big objects on bumpy terrain results with a lot of overhanging objects that don't fit into the terrain well with just a single position

#

same issue with the average of several positions as well

#

so I'm getting more specific

tough abyss
#

You could try sizeOf for a rough estimate

runic surge
#

NOTE: The object has to be present in current mission to be able to read its size (otherwise zero will be returned).
Same issue with the other commands

tough abyss
#

Yeah a bit retarded, why make argument a type name if you need the object to exist, could have been object argument.

unborn ether
#

Does netID of an object ever change by any conditions?

tough abyss
#

So I just started learning to script and I've been following this DevTeam Paxton guy, I've gotten to his cfgFunctions tutorial where he has you create a scenario where an on load a player will have weapons removed, and on JIP they do (ie he puts nothing there). can anyone help me out?
To be clear I've got simple commands to work on and off JIP (like hint"") I'm just having issues creating and calling functions (in this case removeAllWeapons _player)

drowsy axle
#

@runic surge You could spawn an object for a ms. Check the object then delete it.

#

@tough abyss

#

What do you need help with?

runic surge
#

That's not at all efficient or performance friendly. I have been avoiding those types of solutions

unborn ether
#

@runic surge Well if it requires an object - you have to. I would use boundingBox with createSimpleObject

#

The last one is not actually a full operation vehicle, so it will not take much.

runic surge
#

I am just using preset values for preselected objects

meager heart
#

maybe you can try findEmptyPosition < it has param vehicleType

#
 If a [vehicleType] parameter is specified, then the search will look for an empty positions that is big enough to hold that vehicle type
#

@runic surge πŸ™„

runic surge
#

Won't work for what I'm doing

#

Positions are found first, and then organized with their slope angle and steepness. Every generated position needs to be checked for every given object type and it's preset offset/rotation values

tough abyss
#

Does netID of an object ever change by any conditions? It should not

still forum
#

One part of the netID is the ownerID. So if you change the objects owner to a HC for example.. It might

#

I don't know if it's the currentOwnerID or originalOwnerID

tidal stump
#

Hello ! I need help with the addAction command. I would like to be able to open and close a shed door (tanoa building). But I can not understand how it works. Would someone have a link for a tutorial or explanation?

proven crystal
#

I can tell you how addaction works but i have no clue on how (or why) to open a door with it

#

Doors have an open close action already, dont they?

tough abyss
#

I don't know if it's the currentOwnerID or originalOwnerID original @still forum

unborn ether
#

@still forum Checked it, so its original owner. If you create vehicle from server side, it will always stay 2:# no matter if vehicle ownership was changed. Just info.

still forum
#

Should maybe be added to the netID wiki page if it's not on there yet

trail grove
#

Hi, i'm trying to create mission restart button in inMission ui as walkaround to description.ext's skripLobby setting's ,mission selection screen scriping by hostPlayer issue, how could it be possible?

unborn ether
#

@still forum Done

compact maple
#

hey guys, whats the best way to loop into missionConfigFile, and get the first attribute of every classes ?

unborn ether
#

@compact maple πŸ‘€ what's that for, you don't know your own classes meta?

compact maple
#

@unborn ether actually I've created a config to handle the markers on the map. There are category for each type of markers

unborn ether
#
class Makers {
    class Catergory1 {
        displayName = "My Category Name";
        markerTypes[] = {};
    };
    class Catergory2 {
        displayName = "My Category Name";
        markerTypes[] = {};
    };        
};

Use configClasses and get* commands to utilize your purpose.

compact maple
#

Thank you, I've checked the get commands, I saw getText, getArray, etc, but what if I have :

    class markers_weapons {
        variable = markers_weap;
        sigle = "WEA";
    };

markers_weap will be an global array.

#

is that even possible lol

unborn ether
#

You cant declare and SQF array in a header file that way, unless you are using __EVAL and similar preprocessing commands.

compact maple
#

Im not declaring it, I just wanted to reference it to the actual class

#

But I guess I'll change that

tough abyss
#

is that even possible lol Id say yes, even though I don’t quite understand what you re asking

silent bough
#

Hey guys, does someone know if it's possible to check if a variable is a valid number ?

ruby breach
#

isEqualType

silent bough
#

Oh thanks, I'll try this

#

Ok, that didn't work, the question is : is there a way to check if a variable is defined ?

tough abyss
#

!isNil "varname"

silent bough
#

I think it won't work on a number.

still forum
#

isNil doesn't care what type a variable might be

#

it checks whether it exists or not

silent bough
#

I have something funny out there x)

#

It says I can't use "isNil _tookDamage" because... _tookDamage is not defined πŸ˜„

still forum
#

Well.

tough abyss
#

Obviously

still forum
#

read again what @tough abyss wrote

tough abyss
#

You need to use "

silent bough
#

Oooh the " where a part of the line !

#

Sorry ^^

still forum
#

you want to check if the variable exists. Not if the content of the variable is a name of a variable that exists

silent bough
#

Of course.

#

I try hard but I do a lot of stupide mistakes.

waxen tide
#

Is there some multiplayer mission using the new task system properly and with a non-weird implementation?

tough abyss
#

There is no new task system, just old task system wrapped in questionable sqf wrapper

waxen tide
#

questionable as in "don't use it" ?

tough abyss
#

As in is it worth it?

#

You have bare commands available, does the sqf wrapper make it easier and more reliable?

waxen tide
#

idk i would expect the "wrapper" to take care of mp syncronisation and stuff like JIP handling

tough abyss
#

Well, this raises questions, hence β€œquestionable”

waxen tide
#

I'm a fan of not experiencing suffering myself that other people have already suffered thru

#

i would assume tasks are such a basic thing that there is some established way to do it that is considered best practice ?

#

i see.

meager heart
#

also for the Shared Objectives option, you can just use editor options

#
Shared objective can be added to mission from EDEN editor by:

opening Attributes >> Multiplayer >> Tasks >> Shared Objectives panel
selecting either: 'Enable' or 'Enable with Task Propagation'
If 'Enable with Task Propagation' is selected, system automatically re-assigns tasks to every subordinate according to the group leader whenever the leader changes his assigned task.
#

done

#

@waxen tide πŸ™„

waxen tide
#

ok thanks. ┬─┬ γƒŽ( γ‚œ-γ‚œγƒŽ)

compact maple
#

hey guys

{
    _name                 = getText (_x >> "name");
    _variable             = getText (_x >> "variable");
    _sigle                 = getText (_x >> "sigle");
    _icon                 = getText (_x >> "icon");

    _img = _display ctrlCreate ["RscPictureKeepAspect", -1];
    _img ctrlSetText _icon;
    _img ctrlSetPosition [
        _posX,
        0.94 * safezoneH + safezoneY,
        _w,
        _h
    ];
    _img ctrlCommit 0;

    _btn = _display ctrlCreate ["RscInvisibleButton", 74102];
    _btn ctrlSetText "";
    _btn ctrlSetPosition [
        _posX,
        0.94 * safezoneH + safezoneY,
        _w,
        _h
    ];
    _btn ctrlCommit 0;
    _btn buttonSetAction "[1] call fnc_markerDisplay;";
    _btn ctrlSetTooltip _name;

    _posX = _posX + (0.01 * safezoneW + safezoneX); <<< I struggle here. How can I incremente this to make all of my pictures aligne with the same space between them
} forEach _allMarkersCategory;
meager heart
#

are you sure about buttonSetAction ? πŸ˜ƒ

#

we have ctrlAddEventHandler ButtonClick

compact maple
#

well the buttonSetAction work

tough abyss
#

You are setting _posX after you use it?

compact maple
#

Well I am setting it for the next image coming

#

so its not at the same place

tough abyss
#

What next image? It is destroyed at the end of the scope so it is undefined at the beginning of next iteration

shadow sapphire
#

I have a gear script that runs fine when I spawn AI on the server and keep them on the server, but after I installed a headless client script, the AI are now just naked after ownership transfer. Does anyone know of a simple solution to this? I should probably have just done my own headless client script, but I didn't, and I wonder if there is an easy way to fix this.

unborn ether
#

@shadow sapphire Its hard to understand some context without code itself. Using command like setUnitLoadout doesn't care where it was executed, while addWeapon and similar commands are AL so, if your unit is not local to your headless client - it will have no item/weapon/magazine added this way, etc.

#

So if you spawn unit with server and then addWeapon on HC, only HC will see it in its gear.

shadow sapphire
#

Ah! Neato! Good to know! Yeah, I was not using setunitloadout. Is there a drawback to using that command? I'll read up on it.

unborn ether
#

getUnitLoadout gets the current loadout - gear it up, save, and then use setUnitLoadout

shadow sapphire
#

Hmm... there is a bunch of randomization in my gear script, so I think I'd have to define the loadout classes in script somewhere.

#

Oh, no. This will make my description.ext file HUGE... Hmm....

unborn ether
#

use SQF variable then

shadow sapphire
#

SQF Variable?

#

I apologize for my ignorance.

unborn ether
#
private _loadouts = [
    ...
];
shadow sapphire
unborn ether
#

Complete all gear sets, get them, store in array and then make a function of it to gear units.

shadow sapphire
#

All gear sets are complete. I don't know how to store them in arrays.

unborn ether
#

getUnitLoadout?

shadow sapphire
#

Oh! So I can just wrap them in the getUnitLoadout syntax as they are?

#

I think I'm getting it.

#

I'll have to remove the loadouts from my switch script.

unborn ether
#

You have units types, you have units, gear every unit and convert all that add* to a function with all needed gear loadouts stored.

#

Using getUnitLoadout and setUnitLoadout

shadow sapphire
#

Will do. Thanks a ton!

iron osprey
#

Is it possible to have multiple 3d waypoints (such as a task destination) visible to a player at once?

meager heart
#

afaik nope, only current wp with the "wp text/description" will be shown @iron osprey

iron osprey
#

thanks @meager heart. I'm scratching my head at a good way to communicate asynchronous goals to a first time user. So far I can only effectively communicate a linear sequence of goals via tasks, task destinations, and advanced hints to accompany a task

#

might need to hop in to a custom GUI : O

copper needle
#

You probably get this question quite a bit, but what is the best way to start scripting in Arma 3 as a complete beginner?

runic seal
#

can u do an if staement in an Addaction?

cold pebble
#

In what way?

#

Like a condition?

runic seal
#

yh

cold pebble
cold pebble
#
object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint]
#

do whatever you want in the condition part of it

#

and use default values for the other ones, unless you want them changing

runic seal
#

player addAction ["Equip Gear", tag_fnc_EquipGear,, 8, false, true,, player distance B_MRAP_01_F < 2]

#

would that work @cold pebble

cold pebble
#

you've left some things empty

#

shouldn't be any double colmmas

runic seal
#

what shall i put there instead

cold pebble
#

if you look on the link

#

it gives you the default values

runic seal
#

oh yh i got tit

#

it*

#

player addAction ["Equip ESU Gear", life_fnc_EquipGear,nil, 8, false, true,"", player distance B_MRAP_01_F < 2];

#

like that then

cold pebble
#

yup

runic seal
#

kk ty x

tender root
#

I basically already have given up at this point πŸ˜…, but is there any way to remove a backpack from a player without deleting the backpackContainer? The only way I found was letting the unit perform the "DropBag" action, but this is slow and more importantly does neither work when the player is in a vehicle nor when he's swimming.

Any ideas?

Thanks in advance πŸ˜ƒ

unborn ether
#

action does work only in idle unit stances and also interruptible. The only way is to create a weapon holder beneath the player (better simulated) and parse the backpack gear to it.

tender root
#

yeah but I need not the content of the backpack - that's not a problem at all - but the backpackContainer itself 😦

unborn ether
#

backpackContainer is link to a dull cargo object for backpack, so it's somewhat the backpack itself, so if you just want the backpack itself, addBackpackCargoGlobal to a weapon holder and removeBackpack

tender root
#

You misunderstand πŸ˜… I know what backpackContainer does ^^ I don't need a backpack with the same content. I need that specific object.
The goal is to to add the backpackContainer of a unit to a specific weaponHolder. (Not "just" a backpack with the same content)

#

so stuff like addBackpackCargoGlobaland removeBackpack won't work for me

#

because I deletes the object / creates a new object

knotty sun
#

Is there any handle in the BIS Virtual Garage that can be used to extract the vehicle information and spawn it globally? πŸ€”

unborn ether
#

You are talking about creating a new link on existing backpack - well no, i don't know any ways

tender root
#

Yeah...

#

@unborn ether Thanks for trying 😊

nocturne basalt
#

I know I can manually give it velocity, but that wont activate the jets and what not

waxen tide
#

how can i get a list of all child classes of a class?

#

@waxen tide that would be BIS_fnc_getCfgSubClasses

#

thanks!

compact maple
#

@waxen tide thanks ! I needed this

waxen tide
#

weird, me too

unborn ether
#

@waxen tide @compact maple configClasses mates

compact maple
#

@unborn ether yep its good, everything working but my image popping lmao

unborn ether
#

Just in case its better to use "engine solution" instead of BIS_fnc_ if we have one ofc.

compact maple
#

Right, I used this :

_configs = "true" configClasses (missionConfigFile >> "CfgVehicles");
#

with my own Cfg

waxen tide
#

@unborn ether thanks. It seems i get the entire path then tho? Is there an easy way to cut down on that? (checked the wiki, wasn't obvious to me yet)

runic surge
#

is there a way to get the relative Z position from a given rotation and position?

#

I am trying to find a position that is higher than another relative to it's surface rotation
so basically as if that point on the ground was flat instead of global values

#

I have an angle and a position to work with

nocturne basalt
#

how about attaching something to it on a higher Z position and fetch its pos?

runic surge
#

I don't want to do that because I would have to create two objects and delete them, which is one thing I am trying to avoid

nocturne basalt
#

ok

runic surge
#

I need to get this info for thousands of positions at least

nocturne basalt
#

what are exactly are you making?

runic surge
#

I am finding positions that have very specific conditions for object spawning

#

I can spawn something on a slope of a certain amount of degrees, and I can find flat areas, but I can't find 'flat' areas that are tilted at the slope's angle

#

not sure if I explained that very well

nocturne basalt
#

no I didnt understand lol

runic surge
#

I don't know how to explain it but I might be able to achieve what I am attempting by looking at the difference in slope direction (which is downhill)

#

Of what?

#

I'll try to come up with some sort of visual example next chance I get

nocturne basalt
#

make a drawing

runic surge
#

I am going to make a diagram with a blender screenshot

runic surge
#

from your description, what i imagine is your trying to spawn two objects, one uphill from the other, both on flattish terrain
not even close lol I could easily do that with what I have

it's detecting the 'flat' sloped area that is the problem.
making some screens now

#

it's difficult to explain

runic surge
#

I am trying to find 'sloped' positions on an existing slope, as if that slope is flat ground. I thought to test for this by seeing if a nearby position is above the others, but that doesn't work on a slope without being able to get relative Z position
https://i.imgur.com/2cjQgXL.jpg

#

that's kind of a diagram to visualize what I mean

craggy bluff
#

I have a question ...

From the fullπŸ€” Arsenal ..

There is no custom face list.

How do I add it?
mp.

brave jungle
#

["AmmoboxInit",[this,false,{true}]] call (missionNamespace getVariable 'BIS_fnc_arsenal'); Will do the trick for others asking in the future

peak plover
#

(missionNamespace getVariable 'BIS_fnc_arsenal')

#

why

compact maple
#

hey :), it is possible to write a forEach into a forEach ?

peak plover
#

y

#
{
    _vehicle = _x;
    {
        _crew = _x;
    } forEach crew _vehicle;
} forEach vehicles;
#

But you don't need to do the variables

compact maple
#

So _x do not conflict ?

tough abyss
#

@peak plover why not? Don’t have to worry from which namespace this is called

peak plover
#

If you want to use the vehicle inside the 2nd foreach you need to do above

#

Otherwise they don't conflict

#

@tough abyss I guess...

compact maple
#

good thank you

#

yep its working

#
{
    private _name                 = getText (_x >> "name");
    private _sigle                 = getText (_x >> "sigle");

    _currentCategory            = [[_name],[],true];

    {
        _oneMarker = (_x splitString "_") select 0;

        if (_oneMarker == _sigle) then {
            (_currentCategory select 1) pushBack _x;
        };
    } forEach allMapMarkers;
TP_MarkersOnOff_allMarkers pushBack _currentCategory;
} forEach _allMarkersCategory;
peak plover
#

Hmm

#

You are looping through all map markers every time

compact maple
#

this script is executed only once

#

I could avoid that ?

peak plover
#

maybe

#

What does it do?

compact maple
#

The point is to be able to disable some markers by clicking on a UI I created.

Every marker created on the map begin with 3 letters, which are in config :

    class markers_weapons {
        name = "Weapons";
        variable = "markers_wep";
        sigle = "WEP";
        icon = "";
    };

When the player connect, I loop into all theses markers, and pushback them in their array according to their sigle

#

I dont know if its clear but its clear in my head lmao

peak plover
#

how many sigles are there?

#

I would think it would be better to just loop the allmapMarkers once and do a few if checks or a findIf

compact maple
#

10 actually

#

I want it to be in config so I can add or remove category easily

dark quartz
#

does anyone know how to effectively put an AI in an AA gunner seat in various 3rd party mods? i can do it, but they dont detect as an enemy.. just curious..

peak plover
#

I'd use findIf. But since you are doing this only once and out of gameplay it doesn't matter

#

It's just that if you ahve 1000 markers (drawings should be markers too) you are doing 10000 iterations

compact maple
#

Oh I didnt think of that

earnest ore
#

Wait, what? A numeric string converts into number when passed through functions as parameters?

still forum
#

no

#

nothing in SQF happens automagically

earnest ore
#

Hrm... then:

#
[getPlayerUID player, true] remoteExecCall ["ZE_fnc_moneyBalance", 2];
params["_callerSteam", ["_silent", false]];
if(zDebug) then { systemChat format ["zDebug (moneyBalance): Client:%1 | SteamID:%2 requested their balance", remoteExecutedOwner, _callerSteam] };

_bank = profileNamespace getVariable "zBank";
_account = _bank findIf { _x#0 == _callerSteam };

_callerSteam becomes a number.

still forum
#

where do you see that it becomes a number?

earnest ore
#

In the moneyBalance function, i added a hint format ["%1, %2, %3", _account, _bank, _callerSteam];

#

In bank, the uid was surrounded in quotes, but callersteam wasn't.

still forum
#

format doesn't keep quotes if you insert a string

#

format["%1", "string"] -> string not "string"

earnest ore
#

Right, of course it doesn't. /headdesk

tough abyss
#

When in doubt -> hint typeName whatever

compact maple
#
private _iteration = 0;
_btn buttonSetAction "_iteration call life_fnc_markerDisplay;";
#

Im struggling with this

cold pebble
#

_iteration will be undefined

#

different scopes

tough abyss
#

_btn buttonSetAction format ["%1 call life_fnc_markerDisplay", _iteration]

compact maple
#

^thank you !

runic surge
#

Is there a simple way to find whether or not a direction is within a certain margin of another on a 0 - 360 scale?

#

I can't seem to make a functioning expression

#

if the margin is 10, and the angle is 50, than anything less than 40 and greater than 60 is outside of the margin

#

but if the angle is 355, or 5, how could I check that?

#
_dirM = _dirT
if ((_dirT + _marginDir) >= 360) then {_dirM = (_dirT + _marginDir) - 360;};
if ((_dirM > _marginDirMax) OR (_dirM < _marginDirMin)) then {}

_marginDirMax and _marginDirMin are the selected angle to be compared to with added and subtracted margins

#

I have tried doing this to both the base direction, and the direction being compared

#

I must be missing something obvious

tough abyss
vernal mural
#

I was wondering if by any means there is a way to lock ship's doors, for example on the Liberty class destroyer. For buildings there is a variable to assign, but as the ship is built with multiple parts, I have no idea on how I can do this ?

(moved, wrong channel, sorry)

runic surge
#

@tough abyss of course that exists

#

I'll see if that is what I need

#

sounds like it is

#

thanks

#

this only seems to check positions

#

I should be able to make a modified version though

runic surge
#

thanks again @tough abyss

dusky pier
#

i use sqf _disp = findDisplay 46 createDisplay "RscDisplayEmpty"; when i need to close this display - use sqf _disp closeDisplay 1; when i close display is deleted? Or just closed

runic seal
#

is there a script to referh a listbox. For example, on KOTH the refresh button gets all the new players on the server

copper raven
#

Eh, just lbClear the listbox, and run the same code you filled it with the first time?

waxen tide
#

I only want the elements from all 3 arrays where the _count is the highest number. Anyone got an idea how to do that?

_array_1 = [0,1,2,3,4,5,6,7,8,9];
_array_2 =       [3,4,5,6,7,8];
_array_3 =         [4,5,6,7];
_count   = [1,1,1,2,3,3,3,3,2,1];
runic surge
#

does findEmptyPosition not account for terrain objects? I would have figure that would be it's main purpose

#

doesn't seem to though

copper raven
#

selectMax is what you're looking for if i understand correctly @waxen tide

waxen tide
#

nope

#

idk how to explain it better

#

there is multiple arrays, each with elements in it. some elements are present in multiple arrays. i want to find the highest possible number of duplicates an element can have, and then i want to select all the elements that have this highest possible number of duplicates

tough abyss
#

Deleted @dusky pier

#

Add them together then run BIS_fnc_consolidateArray @waxen tide

waxen tide
#

I'm still careful but that looks like exactly what i need. Thanks! You might be my hero.

#

@tough abyss One step ahead, much obliged

waxen tide
#

So my goal is to filter out what i encircled in black and marked with "FILTER OUT" and i want to "detect" the spots i marked orange with "ROADBLOCK" https://i.imgur.com/CrHvhIk.jpg

#

Not really having a brilliant idea right now for that.

waxen tide
#

looking pretty decent now

unborn ether
#

Why not marker and some maths to get some edge of it?

waxen tide
#

please elaborate?

waxen tide
#

i don't follow

#

my goal is to fortify a random city with roadblocks, so i need to find good (tatically reasonable) positions

#

the marker shit is just for debugging.

unborn ether
#

oh, was just wondering whats that 100 markers drawing.

waxen tide
#

i'm feeding it locations from cfgWorld and compositions.sqe files.

minor lance
#

Anyone has a function to check is a date is pastΒΏ?

unborn ether
#

id a date is past?@minor lance

mortal wigeon
#

What is the best way to make a R2T display with the correct aspect ratio?

tough abyss
#

If the date is in the same year you could use dateToNumber on both dates and compare the numbers. If different year, compare the years @minor lance

minor lance
#

I used that "dateToNumber " thanks!!

unborn ether
#

I love how snakes and rabbits creeping me out everytime when they open a house door somewhere around me.. on empty server.

minor lance
#

Is there any way to render a DrawwIcon3D inside a cameraΒΏ?

tough abyss
#

wat

dusky pier
#

@tough abyss ty

covert inlet
#

how would you use setVariable on a every unit in a faction? eg setVariable x on all nato units

copper raven
#
{
    _x setVariable ["blah","bleh"];
}forEach (allUnits select {side _x == west});
brave jungle
#

Are there problems with onMapSingleClick and it's EH Equiv? I can't seem to get either working anymore

peak plover
#

@copper raven 2 loops

#

yikes

#

it's cheaper to do a if check in the foreach

surreal peak
#

Is there a way to create variables so that everytime the code runs it has a unique ID sort of thing?

#

I'm not really sure how to explain it well

#
//                 Delay for meteor to disapear
["Meteor Strike", "Spawn Basic Meteor",
{
    params["_pos","_unit"];
    
    object = "B_RangeMaster_F" createVehicle _pos;
    
    object allowDamage false;

    [object, true] remoteExec ["hideObjectGlobal",2];

    object setPos (getPos object vectorAdd [0,0,1000]);
    
    
    fireEffect = "test_EmptyObjectForFireBig" createVehicle position object;
    

    fireEffect attachTo[object,[0,0,0]];
    
    hint format["%1",object]; //Used to debug
    
    [{isTouchingGround object},{

        _explo = "DemoCharge_Remote_Ammo_Scripted" createVehicle getPos object;

        _explo setDamage 1;

        object allowDamage true;

        object setDamage 1;
            
        deleteVehicle fireEffect;
        deleteVehicle object;
    }, object] call CBA_fnc_waitUntilAndExecute;

}] call Ares_fnc_RegisterCustomModule;```
#

thats the code, the problem is that I cant make multiple meteors at the same time

#

I tried making object private but then the CBA_fnc_waitUntilAndExecute; wont run

surreal peak
#

To elaborate on the problem, if there is already a meteor (thats what this code makes) in the sky, when I place another one it overides the old one, so the new one will explode BUT the old one will not (and the fireEffect does not get deleted)

tough abyss
peak plover
#

@surreal peak Where did you get this code from?

waxen tide
#

looks like it's a module from the ares mod

#

@surreal peak you can just do something like a for loop and then use format and put the _i variable in the name of whatever you're createVehicle'ing

peak plover
#

@waxen tide ewww no

waxen tide
#

Β―_(ツ)_/Β―

peak plover
#

Just use local variables and pass the local variable to the waitUntil and use what @tough abyss said

waxen tide
#

but he wants multiple meteors at the same time

#

not one after the other?

peak plover
#

His issue is

#

he is using a global variables

#

he overwrites the variable

#

All instances of waitUntil will be using the same meteor because the object can only point to 1 thing

#

And because it's overwritten it's always the last created meteor

waxen tide
#

yeah i figured that out

#

hence why i would create different variables for each meteor

peak plover
#

Don't create global variable per meteor

#

Solution 1 : use local variables
Solution 2 : have an array of meteors and iterate through that array

still forum
#

290 units. all west

{    _x setVariable ["blah","bleh"]; } forEach (allUnits select {side _x == west});

2.0366ms

{    _x setVariable ["blah","bleh"]; } forEach (allUnits select {side _x isEqualTo west});

1.96275ms

{    if (side _x == west) then {_x setVariable ["blah","bleh"];}; } forEach allUnits;

1.9602ms

So yes. if inside the loop is faster if it the select would essentially just return the whole list.
288 units west and 288 units east.

{    _x setVariable ["blah","bleh"]; } forEach (allUnits select {side _x == west});

3.07692ms

{    _x setVariable ["blah","bleh"]; } forEach (allUnits select {side _x isEqualTo west});

2.92128ms

{    if (side _x == west) then {_x setVariable ["blah","bleh"];}; } forEach allUnits;

3.31788ms

2 loops is not always worse. If you run the "expensive" code for all units. That's slower than running cheap code for all units, and then running cheap code for a subset of these units again.
@peak plover

#

I would still go for the select variant. Because the if variant is only very slightly faster if all units happened to be of side west (which is unlikely) and the if variant is also a F-ton slower when the units are equal west-east

meager heart
#
(allUnits select {side _x == west}) apply {_x setVariable ["blah","bleh"]};
```πŸ€”
surreal peak
#

@peak plover i've tried to make everything into a local variable, but when I make object local the waitUntilAndExecute doesn't seem to work

#

im assuming that to make it a local variable I add an underscore before it

#

so it becomes _object

#

if im wrong please correct me, im kinda new to this

#

also if needed, the mods I have to make this code with are CBA and Achilles

peak plover
#

You have to pass it as a parameter to the function

#

@still forum Interesting

#

Yeh, if it's heavy code then the heavy code should be looped as little as possible

#

An alternative in that case might actually be a xeh init

waxen tide
#

Does anyone know his way around CfgFactionClasses?

#

"Default" has 4 spawnable vehicles, a blackhawk wreck, 2 buoys .. ?

#

there is lots of empty stuff which seems to be just some logic stuff

#

πŸ€”

#

probably manually filter out "default" and then throw away everything with 0

surreal peak
#

so I only need to pass _object in the parameters?

#

oh shit, I also need to pass fireEffect aswell dont I

waxen tide
#

is there something like pastebin with proper SQF syntax highlight?

surreal peak
#

nvm didnt work

#

in which line do I pass the parameter?

still forum
#

is there something like pastebin with proper SQF syntax highlight? uhm.. Pastebin.
Just select SQF under syntax highlighting..

surreal peak
#

with waitUntilAndExecute, am I right in thinking the parameters are passed in the 3rd part

#

e.g. ``` [{isTouchingGround _object},{
hint "Touched ground";
_explo = "DemoCharge_Remote_Ammo_Scripted" createVehicle getPos _object;

    _explo setDamage 1;

    _object allowDamage true;

    _object setDamage 1;
    deleteVehicle _fireEffect;
    deleteVehicle _object;
}, _object] call CBA_fnc_waitUntilAndExecute;``` `_object` is being passed in the parameter
#

because for some reason when it is a local variable it does not work

#

but when its public it does

still forum
#

you are not taking the local variables back out

#

they are passed in _this

#

you have to use params to take them back out

waxen tide
#

I usually avoid pastebin and use an alternative because pastebin often throws me captchas or other annoying things. but thx.

still forum
#

Just stop setting files to "expires never" and things will be better

surreal peak
#

When you say use params to take out them out is that at the beginning where I have params["_pos","_unit"]; which would then become params["_pos","_unit","_object"];

#

I also changed the waitUntil to:

#
        hint "Touched ground";
        _explo = "DemoCharge_Remote_Ammo_Scripted" createVehicle getPos _object;

        _explo setDamage 1;

        _this select 0 allowDamage true;

        _this select 0 setDamage 1;
        deleteVehicle _fireEffect;
        deleteVehicle _this select 0;

    }, _object] call CBA_fnc_waitUntilAndExecute;```
torn juniper
#

Is a fsm distance check less costly then a distance check via script?

still forum
#

I don't know what you are trying to tell me..
You need to have params inside the waituntil code

#

to take it out of _this

#

or just use _this directly

#

but _object will be undefined

#

@torn juniper FSM's are scripts.

#

yes

#

deleteVehicle _this select 0; no

#

use _object now that you have it

#

also _this is not an array

torn juniper
#

Maybe I worded it bad, would it be better to have a check via FSM for distance versus another loop constantly watching for distance?

tough abyss
#

Depends on what you're doing in either scenario.

#

What environment you want it ran in.

still forum
#

Isn't your FSM check also just a loop constantly watching for distance?

torn juniper
#

Since a fsm is constantly looping, checking state anyways.. seems like it would be smarter to do everything in the fsm versus another watcher

#

Exactly

waxen tide
#

i ususally set the expire date very short. 1 day or 1 week ususally.

surreal peak
#

Im starting to feel like an idiot now that I still cant figure this out. This is the code ATM, https://pastebin.com/Bw50C8US and the waitUntil still isnt working

#

I think I did what u said

#

@still forum Please tell me if im an idiot

#

which line did I fuck up?

still forum
#

{isTouchingGround _object}

#

_object is undefined

#

inside that code you get _this with your arguments

#

if you want _object. You have to first pull it out of _this. Or just use _this directly

tough abyss
#

Drop everything and read about _thisand params, you won’t guess this shit, you have to know @surreal peak

surreal peak
#

guess I got some book learning to do D:

#

thanks for help anyway dedmen

minor lance
#

Hello! I asked yesterday about draw3D command inside a camera... anyone has a solutionΒΏ? When I create a camera, my draw3D command is not showing. When i delete the camera and the player is in his own player camera, he is able to see the draw3D text

tough abyss
#

cameraEffectEnableHUD true; @minor lance

frigid raven
#

With battleeye active - is a MP player allowed to change values in the <username>.var.Arma3Profile ? Reason for this is that I have some variable values stored in the namespace of the user for some time before syncing it with the server profileNamespace

#

I want to be sure nobody can manipulate these values before they get synced

#

or at all..

torn juniper
#

User own profile values? Yes

#

They also wipe if you create a new user

frigid raven
#

hm that's sad

#

The problem is the following. In my Mod when a player kills an enemy NPC they receive 1 Reputation Point ok? At the moment I directly sync this gained point to a hash on the servers profileNamespace

#

so far so good

#

But when a player does some machine gun fire into a group of let's say about 10 enemies things go wrong

#

the syncing to the server actually goes nuts since it first fetches the actual amount of reputation points, adds the new gained one to that amount and THEN saves it to the server hash again - all without checking the players namespace once.

#

When a player kills 10 NPCs within 2seconds the events have some race conditions to the values on the server side therefore kill 1-3 fetches the 0 reputation points from the server... so 3 kills result in 1 reputation points in the end

torn juniper
#

Thats where you have a database on the server and an mp eventhandler onKilled for the npc

#

Then the database just increases their rep

tough abyss
#

Maybe I worded it bad, would it be better to have a check via FSM for distance versus another loop constantly watching for distance?
@torn juniper they do the same thing lol

#

Way to kill the server by storing user data in server profile space

frigid raven
#

yea I will switch to a DB when I have my own hosted server - it is just a placeholder

tough abyss
#

You can have db on your pc

frigid raven
#

yea but I dont wanna run the game on my machine since friends gonna play the mission

tough abyss
#

MySQL runs as a service no problem

waxen tide
#

How can _x be undefined inside a ForEach?

#

hm ok my array is full of nullobjects

#

nvm

torn juniper
#

@tough abyss yea, I was looking for a distance check from a player to delete a unit if too far away, currently had a loop that just ran over everything checking distance of each unit distance to a player if it was more then x delete that unit

#

Was wondering if switching to have each individual unit check its own distance to the nearest player would be better or worse

#

In the end I don’t think it will matter either way too much since AI will be on HC

compact maple
#

hey every one, I have an UI with 10 icons.
I would like to add a slider so I can add more than 10 icons in that UI, I know how to create a slider, but I dont know how I link my icons to the slider

austere granite
#

what does linking icons to a slider mean?

#

You put controls inside a controlsgroup, tada, you have a slider and they are linked?

compact maple
#

hm yay this is what I want, I've never worked with controlsgroup

#

whats are the good steps to get it working ?

compact maple
#

but as I create my UI like this :

_header = _display ctrlCreate ["RscPictureKeepAspect", -1];
_header ctrlSetText "";
_header ctrlSetPosition [
    0.041 * safezoneW + safezoneX,
    0.89 * safezoneH + safezoneY,
    0.025 * safezoneW,
    0.026 * safezoneH
];
_header ctrlCommit 0;
minor lance
#

Thanks @tough abyss

tough abyss
#

Slider? You mean scroll bar?

compact maple
#

Yea I mean an horizontal scroll bar

coral monolith
#

Looking for a scripter to come into our community and help us out with scripting. it will be a paid job which can be discussed over a conversation.hit me up if your interested.thanks guys

still forum
cosmic bolt
#

Would it be feasible to implement vector-based trigger-shapes?

#

or some form of point-to-point drawing of shapes within the editor?

exotic tinsel
#

Looking for an advanced arma 3 developer for paid work.
Must be located in the United States and over age of 18. desperately need an advanced developer to join our team to improve what we have and continue with us on the project.

minor lance
#

is anything wrong in the variable assignmentΒΏ?
_edit buttonsetAction format ["hint '%1'; medSelection = ['%1', player];", _part];

#

hint is Ok, but the variable is nil allways

minor lance
#

call compile format ["hint '%1'; medSelection = ['%1', player];", _part]; works 😦

high marsh
#

w./

cosmic bolt
#

We did. However, what I'm thinking is a tool that uses that function

#

i.e., something that would allow you to draw shapes directly in editor, without scripting.

#

Say, a custom trigger that draws polygons between a set of points, and which allows you to drag each point individually in order to reshape it

high marsh
#

@cosmic bolt Okay, great. use onMapClicked and push positions returned from that to an array. After finalizing draw the polygon

#

nothing that works well isn't going to be as easy as one two done

radiant needle
#

Is there a way to hide players HUDs via script?

#

Or like enter a cinemtaic mode with the letterboxing?

manic bane
#

How can I make script that detect some vehicle spawn in whole game and change texture everytime when it is spawned?
Putting some line directly on spawn script might be simple but I want to make it separately so I can apply most case.

high marsh
#

@manic bane
the command vehicles
the command apply
the eh respawn

manic bane
#

I will try these at home. Thanks.

still forum
#

@minor lance The button eventhandler might be running in uiNamespace.
Try missionNamespace setVariable ['medSelection', ['%1', player]];

#

@exotic tinsel cut the cross-posting. Also this is the wrong channel for that.

manic bane
#
    {
    sleep 3;
    if (typeof vehicle player == "I_APC_Wheeled_03_cannon_F") then
        {
        vehicle player setObjectTextureGlobal [0, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_co.paa"]; 
        vehicle player setObjectTextureGlobal [1, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext2_co.paa"]; 
        vehicle player setObjectTextureGlobal [2, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\rcws30_co.paa"]; 
        vehicle player setObjectTextureGlobal [3, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_alpha_co.paa"];
        };
    };```
This works anyway but my actual goal was changing texture immediately after vehicle spawn without injecting  any code to spawn script. Do you have any better idea?
still forum
#

do you have CBA?

peak plover
#

GetIn EH would also probably work

manic bane
#

@peak plover thanks for advice. GetIn EH might remove useless excution when players stay in vehicle.

#

@still forum No. Why? Does CBA has function for that?

manic bane
#

NATOGORGON =
    vehicle player setObjectTextureGlobal [0, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_co.paa"]; 
    vehicle player setObjectTextureGlobal [1, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext2_co.paa"]; 
    vehicle player setObjectTextureGlobal [2, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\rcws30_co.paa"]; 
    vehicle player setObjectTextureGlobal [3, "A3\Armor_F_Gamma\APC_Wheeled_03\Data\apc_wheeled_03_ext_alpha_co.paa"];
    
NATOSTRIDER =
    vehicle player setObjectTextureGlobal [0,'\A3\soft_f_beta\mrap_03\data\mrap_03_ext_co.paa']; 
    vehicle player setObjectTextureGlobal [1,'\A3\data_f\vehicles\turret_co.paa'];
    
while {true} do
    {
    sleep 3;
    if (typeof _vehicle == "I_APC_Wheeled_03_cannon_F") then
    {spawn NATOGORGON};
    
    if (typeof _vehicle == "I_MRAP_03_F" \\ "I_MRAP_03_hmg_F" \\ "I_MRAP_03_gmg_F") then
    {spawn NATOSTRIDER};
    };```
I made almost same one with GetIn EH. Did I make it right?
still forum
#

CBA would make it very easy

manic bane
#

But I need to make it without CBA because my community just play no-moded game now.

warm gorge
#
_ctrlButtonAbort ctrlSetEventHandler ["ButtonClick", "[] spawn SR_fnc_abort; (findDisplay 49) closeDisplay 2; true"];

Is there any way to set what the abort button does in the pause menu while still keeping the confirmation popup when you click it? This seems to be aborting straight away, with no popup.

still forum
#

Just add the confirmation UI dialog into your script

warm gorge
#

Do you happen to know off by heart what dialog that is?

#

Wait its a GUImessage isnt it

peak plover
#

@manic bane Did I make it right No

#

What's with the weird spacing?

manic bane
#

😒

peak plover
#

It's quite hard to read

warm gorge
#

@still forum Do you know where I could find the default script executed when the Abort button is clicked? I can't find anything for it in RscDisplayMPInterrupt.sqf

unborn ether
#

@warm gorge Most of interactible display actions are hardcoded into engine, such as lobby display interactions.

#

But usually OK/CANCEL buttons are 1and 2 idcs

warm gorge
#

That is probably the case then. I'm not sure why it is closing this abort confirmation popup though... Very confused

little ore
#

Hi, anybody knows how to check the LifeState of a unit in an ACE Mod Enviroment?

still forum
#

it's probably in config. not SQF file. Like almost all UI actions @warm gorge

#

You mean check whether the unit is unconscious? @little ore

little ore
#

@still forum yes, excactly

still forum
#

_unit getVariable ["ACE_isUnconscious", false]

rose hatch
#

So the biki page on setApertureNew is a bit dry. How do std and stdLum affect the aperture? If I wanted to effectively increase or decrease the overall aperture (within min and max), which would be the one to change?

#

Also, is there a scripting command to get the current aperture value?

little ore
#

@still forum TY. Couldnt find it in the ACE Wiki. Now i know where to look it up πŸ˜ƒ

unborn ether
#

Is it me or Arma now stores last server password?

round scroll
#

question on Zeus: any created unit is created on Zeus' system. Is there any script/mod that transfers the units to the server? There's ZISH but it doesn't seem to be maintained.

high marsh
#

then delete it and recreate it on server

#

or HC if you have one

still forum
#

@unborn ether CBA

#

@round scroll ACEX Headless transfers it to HC. Not sure if to server too. But you can use that as a base and change a few things to make it transfer to server

round scroll
#

ok, thanks a lot!

unborn ether
#

@still forum How long, never mentioned before.

still forum
#

last update

unborn ether
#

Isn't that bad for security reasons? Like, you can get every server password on any server now.

round scroll
#

not at arma computer currently, but may this work for transferring Zeus generated groups to the server, if added to the Curator init box: this addEventHandler ["CuratorGroupPlaced", { params ["_curator", "_group"]; [_group, 2] remoteExec ["setGroupOwner", 2]; }];

still forum
#

@unborn ether uh.. Use your brain please

#

@round scroll should yes.. I think

unborn ether
#

@still forum How's my brain usage will limit from saving password somewhere in profilenamespace or smth?

rose hatch
#

I don't think having some server passwords saved locally is much security risk, given that very few players share the same a3 install (read: same computer) to play arma. And even then, most of the people in that category are siblings and probably wouldn't care if their family knew the password to some arma server they play on.

peak plover
#

??

#

I don't really get what you ment

rose hatch
#

me?

peak plover
#

Well yeah this whole discussion

still forum
#

@unborn ether get every server password on any server now If the user was never on the server. He doesn't have the password

peak plover
#

Yeah exactly

rose hatch
#

^

peak plover
#

You can only get the passwords the players on your server have been on

still forum
#

I think I understood now what you mean. I'll talk to people.

rose hatch
#

Wait, are you saying the passwords saved by one users CBA can be accessed by other users playing on the same serer as them? I don't think that's a thing...?

peak plover
#

You can't get the passwords to all servers from all players however

still forum
#

I'd suggest not talking about that anymore. Don't need to tell people that things might be possible :x

peak plover
#

gotcha

rose hatch
#

I'm honestly so confused rn anyway...

waxen tide
still forum
#

Okey I talked to people: "won't fix. It's a password for a game server. cmon."

rose hatch
#

lol

peak plover
#

Should be an opt-in

still forum
#

Maybe open a issue report on CBA github if you think it's a problem

peak plover
#

I don't think it is right now

still forum
#

I'd say. Don't join servers that you don't trust. They can do a F-ton more serious stuff than grabbing passwords for other server

#

yeah it's opt-out currently

peak plover
#

yea

#

Is it possible saving profile namespaces breaks drives?

still forum
#

I still have a probably possible exploit related to that which I need to test out. Just don't have time

#

not really no

#

Theoretical upper limit for profileNamespace size is your Ram size. So you can't even fill up your disk or something

peak plover
#

what if you save it really hard and fast

still forum
#

no

#

Well. You can degrade the lifetime of SSD's...

rose hatch
#

really hard and fast

#

huh

earnest ore
#

There's no upper limit for log output, is there.

still forum
#

true

peak plover
#

πŸ€”

#

naughty

still forum
#

I had a 280GB RPT once

rose hatch
#

lordy

earnest ore
#

Yeah, I've had to clean a few of those out of our server.

rose hatch
#

Is this why people preach -nologs?

waxen tide
#

don't worry, writing to log a lot slows arma down so much that you'll flee the server if you have any common sense

peak plover
#

nologs is always faster

#

Doing less things is faster

#

-nosound is A LOT faster

still forum
#

My server is fast enough without these things.
Though I have special log handling stuff and my hax sooo. Kinda unfair

peak plover
#

Has anyone tested the 9000 fps exec yet?

#

Like shooting delay etc.

still forum
#

I'm constantly running that

#

Average 70-80 fps on my server.
Dunno about delay and perf and stuff

#

although the AI's a friggin fast man... But I'm also running a HC

peak plover
#

Yeah that seems to be a huge difference

#

In the name of science I wanna know if there's a difference between 50 fps server and 300+ fps server.
When shooting 1 client from 2nd client

#

Would the delay be smaller?

still forum
#

Could be. More network message throughput..

peak plover
#

in theory it should be

unborn ether
#

@still forum I had a 280GB RPT once people say if you close arma once a few month it might help πŸ˜„

still forum
#

Broken script on server over I think 6 hours or so

unborn ether
#

They see me whileng, they hating

peak plover
#
[] spawn {
    while {true} do {
        isNil {
            // my code
        };
    };
};
#

rate

tough abyss
#

When could we add reactions πŸ€”

earnest ore
#

Is it considered a bug that civilians are not seen by AI until they're revealed?

tender fossil
#

Just a general tip: this is not how you name variables πŸ˜„

private ["_u","_wp","_rkt","_am","_i","_vlnrd","_vl","_vlnr","_vcnr",
"_vc","_vcnrd","_vg","_vgnr","_vgnrd","_trg","_fp","_spd","_dis","_trvldis","_sltd",
"_sspd","_acc","_agl","_trgtp","_rtp","_trgp","_trgv","_ttimp","_prd","_t"];
unborn ether
#

get _rkt my team _wp but you get _rtp

#

_i _am _prd of _dis

winter rose
frigid raven
#

how can I check best if a trigger is defined?

#
isNil triggerName // doesnt work
isNil "triggerName" // does work
#

but

#
triggerName setTriggerStatements [...] //does work
"triggerName" setTriggerStatements [...] //does NOT work
#

which results in this not working for me

if (!isNil TRIGGERNAME) then { TRIGGERNAME setTriggerStatements ["this", "call X11_fnc_doStuff", ""]; };
earnest ore
#

!isNil str TRIGGERNAME maybe.

#

Nope, nevermind.

frigid raven
#

already tried thx dude πŸ˜„

earnest ore
#

Oh right,
if (!isNil { TRIGGERNAME }) then { ... }

waxen tide
#

i write the prettehiest code anyways.

high marsh
#

trigger is defined?

#

you mean not null?
isNull

hollow thistle
#

If TRIGGERNAME contains string you can do:

if (!isNil TRIGGERNAME) then { 
    (missionNamespace getVariable TRIGGERNAME) setTriggerStatements ["this", "call X11_fnc_doStuff", ""]; 
};
#

But I don't exactly understand what do you want to achieve.

#

isNil needs a name of variable to check (string), not the variable itself.

high marsh
#

@hollow thistle Technically you could do

_var = "Blah";
if(!isNil "_var") then {
    "BLAAAAH!"
};
hollow thistle
#

Yeah you could but that is out of scope of his question (I think πŸ€” )

still forum
#

@tender fossil and that is also not how you use private

#

I think these names came to be because someone watched that stupid video from that phronk guy

#

"make your variable names as short as possible" yeah.. right..

tender fossil
#

πŸ˜„

earnest ore
#

No indentation, illegible variable names...

#

What a complete madman.

tough abyss
#

r/madlads

still forum
#

And then you wonder where all the bullshit scripts are coming from

hollow thistle
#

instant downvote.

still forum
#

It's because of people like him. Thinking they know everything and that everyone should learn from them

hollow thistle
#

πŸ™ƒ

still forum
#

lul

#

Someone just PM'ed me this "hack" that crashes his server

#
[] spawn {
waitUntil {alive player};
    while {true} do {
        life_fnc_RequestClientId = player;
        publicVariableServer "life_fnc_RequestClientId";
    };
};

If that crashes your server.. Man..

queen cargo
#

just wtf

slender halo
#

it went from life to death...

queen cargo
#

the difference between some_very_long_name_that_100_percent_is_not_doublequote_optimized_doublequote_according_to_him and var_foo is literally so negligible 🀦

#

even in sqf-vm where i do NOT calculate the hashes first this is bollocks

#

best part is his gigantic range of comments and complaining about filesize 🀦 🀦

earnest ore
queen cargo
#

should not have done it at all is the better variant @earnest ore

earnest ore
#

πŸ˜‚

tough abyss
#

thx for exposing me xD I'm a rookie and I don't think exposing my problem (just to make fun of it) will help me a lot

queen cargo
#

But while we are on it, He should have used sqf-vms beautifier cmd line Option to get something that is human readable

still forum
#

You just exposed yourself. I didn't say who that code is from. Now every lifer knows that people got that code because of you

tough abyss
#

I'm not boasting about being a professional developer btw @queen cargo

queen cargo
#

you are the one talking in the youtube video @tough abyss ?

tough abyss
#

and yeah it's crashing my server cus this code is being called likely hundreds of times per second well, hundreds of times might be an exaggeration but it's called a lot, constantly

#

lol

#

why should I use CfgDisabledCommands for this?

slender halo
#

hundreds of times per second is not an exaggeration

still forum
#

@queen cargo you are the one talking in the youtube video no

queen cargo
#

then it was not @tough abyss i was talking about

#

that dude in the video is what i am complaining about

tough abyss
#

[] spawn {
waitUntil {alive player};
while {true} do {
life_fnc_RequestClientId = player;
publicVariableServer "life_fnc_RequestClientId";
};
};
@tough abyss

still forum
#

his name is phronk and he's on discord too

tough abyss
#

M242Today at 11:30 PM
Ever heard of CfgDisabledCommands?

still forum
#

He wanted a biki account too.

tough abyss
#

lol

queen cargo
#

something that kills most servers btw is this:

fnc = { while { true } do { [] spawn fnc }; };
while { true } do { [] spawn fnc; };

only run this on the server and it is pretty much done

#

especially the life servers

earnest ore
#

I'm slightly confused. I mean, if a client gains remote execution anyway, isn't that already a problem?

queen cargo
#

nah @earnest ore
the moment i have any way to execute code, even if local, you are already fucked

waxen tide
#

people should stop caring about what happens on life servers.

still forum
#

TLDR. His server doesn't have even the most minmal of security protections established. And he is complaining about people killing his server

#

Like. Even after that first TLDR sentence you can already say "Ask on a life forum, bye"

tough abyss
#

why are you wasting your time answering people here if it's just to make fun of em

#

keep playing minecraft tho

waxen tide
#

it's just that life people have worked hard to earn a really shitty reputation here.

still forum
#

I told you what you have to do. My "helping people" is done here.
I can use the rest of my free time to do whatever I want

#

You got a life specific question. So go ask on a life forum.
Same as people with CUP specific questions ask in CUP Discord.
TFAR questions -> TFAR Discord
ACE questions -> ACE Discord.
And so on.

#

Somehow it's only the life people who get offended when you treat them like everyone else and redirect them to the proper place

tough abyss
#

Thinking of writing a worm that would save itself in profile namespace and execute that code on every life server user goes to while simultaneously replicating for each player on the server. That would be something πŸ˜‚

still forum
#

Btw is there a life discord that we can redirect people to? If so it should be added to #channel_invites_list

#

That would be a interesting project

#

I didn't hear of such a thing yet. sounds fun

tough abyss
#

Sounds doable

#

Need anti virus counterpart so we can charge life server owners $$$ for protection, how’s that for a startup?

#

And the chorus goes:
Am I evil? Yes I am
Am I evil? I am man, yes I am
😈

still forum
#

Are you saying man are evil? What are you? A Feminist?!

frigid raven
#

re - sorry that I left my question abandoned... but I was doing sports

#

a thing u guys dont know much about

#

@queen cargo he is skipping his exercise on a regular base

#

oops too much intel

queen cargo
#

@frigid raven i personally was jogging today again

frigid raven
#

Woah James ? So u assume his gender ? @tough abyss

queen cargo
#

it gets better everyday πŸ˜‰

frigid raven
#

no u werent - stop destroying my trollings

tough abyss
#

How’s book going then?

queen cargo
#

nobodies working on it, no responses --> pretty much dead @tough abyss

waxen tide
#

I once wrote a replicator script in LUA for computercraft turtles in minecraft. I got one turtle to replicate twice on its own. Sadly i never managed to flood a server with a borg-like presence.

still forum
#

a thing u guys dont know much about pfft.

waxen tide
#

i once ran half-marathon distance

#

had to wave some people off who wanted to call an ambulance on me at the end tho

#

does that still count?

torn juniper
#

Is setIdentity a global command? It says on wiki it doesn’t have to be local to the unit/machine it is ran from but I was wondering if it set the same identity for everyone

tough abyss
#
Effects of this scripting command are not broadcasted over the network and remain local to the client the command is executed on```
torn juniper
#

@tough abyss where do you see that? But thanks yo

tough abyss
#

hover over those small icons above the commands name on the wiki

torn juniper
#

Ah - I am on mobile thats why

#

Thanks

earnest ore
#

onPlayerRespawn.sqf parameters: [<newUnit>, <oldUnit>, <respawn>, <respawnDelay>]

Wiki used <respawn>, it's super descriptive.

#

What even are you.

#

The marker? The respawn type? I don't even

high marsh
#

@earnest ore test it out. Debug

bold cedar
#

So I have two bits of data I want to combine together. How would I combine ((_veh = "B_MBT_01_arty_F" createVehicle position player;))

#

And ((enableEngineArtillery true;enableEngineArtillery true;))

compact maple
#

what

earnest ore
#

^

#

They're instructions, not data.

#

What are you doing.

compact maple
#

y tell us what you're trying to do

earnest ore
#

BIS_fnc_taskSetState according to wiki, returns Boolean.

["ruskieTask", "SUCCEEDED", true] call BIS_fnc_taskSetState;

returns "ruskieTask"

#

This is one of those days.

#

I need coffee.

bold cedar
#

Its for a zeus mission that has the engine disabled by default.

meager heart
#
/*
    Author: Jiri Wainar

    Description:
    Set a task's state.

    Parameters:
        0: STRING - Task name
        1: STRING - Task state; one of the following:
            "CREATED"
            "ASSIGNED"
            "AUTOASSIGNED" ("ASSIGNED" when no task is assigned yet, otherwise "CREATED")
            "SUCCEEDED"
            "FAILED"
            "CANCELED"
        2: BOOL - Show hint (default: true)

    Returns:
    STRING - Task ID

    Example:
    ["Hunter","SUCCEEDED"] call bis_fnc_taskSetState;
*/

private ["_taskID","_state","_hint"];
_taskID = param [0,"",[""]];
_state     = param [1,"",[""]];
_hint     = param [2,true,[true]];

[_taskID,nil,nil,nil,_state,nil,_hint] call bis_fnc_setTask;
```@earnest ore
earnest ore
#

Probably should use the functions viewer more often. πŸ‘€

#

Thanks though.

#

@bold cedar Are you not able to get the artillery computer up for a certain player?

bold cedar
#

Yeah. Thats my problem. Enable Engine Arti computer only does it locally for that player.

#

or in this case

#

me

#

But if my buddy takes the gun, he can't see it.

#

I was thinking about how I could maybe run it for the whole in game group? (Me and my friend are grouped me as the leader).

meager heart
#

you can just add enableEngineArtillery true; < into initPlayerLocal.sqf

bold cedar
#

no way to just do it from debug I take?

meager heart
#

hmm... press "global exec" there

bold cedar
#

Oh. I feel dumb now..

#

-v-

meager heart
#

yeah... that command has local effect

#

check wiki

errant herald
#

I got a script that reads my car speed but the problem is that its over compensating from my actual speed that's shown in the top left corner

#

anyone got a clue why?

digital jacinth
#

How is that script calculating the speed?

#

don't you love working with blackboxes?

errant herald
#
while {alive _car} do {

if ((isEngineOn _car) && (player IN _car) && (cameraView == "INTERNAL")) then {
_myspeed = speed _car;
if (_myspeed > 999) exitwith {hint "slow down";};
_myspeed = round _myspeed;
_myspeed = format ["%1",_myspeed];
_myspeed = toarray _myspeed;

if (45 IN _myspeed) then {
_myspeed = _myspeed - [45]; // Take - out of array
};

if (count _myspeed == 1) then {
_myspeed = [0,0,(_myspeed select 0)];
};

if (count _myspeed == 2) then {
_myspeed = [0,(_myspeed select 0),(_myspeed select 1)];
};
#

where exactly πŸ˜›

#

oh ok

#

can u tell me what line so i can have a look?

compact maple
#

that indentation was satisfying

errant herald
#

was it mp/h?

#

yes

#

put a speed thing on the dash

compact maple
#
Description:
    Object speed (in km/h). Returns relative speed of given object along Y axis. An equivalent to:

    3.6 * (velocityModelSpace _obj select 1) 
errant herald
#

hm still giving me over compensated values

compact maple
#

so what you wrote is a better option

#

you probably have to spawn your script ?

errant herald
#

kk gonna try it now πŸ˜ƒ

compact maple
#

whats the difference between [] spawn {}; and 0 spawn {};

#

lmao okay

#

^what is this ?

            if (45 IN _myspeed) then {
                _myspeed = _myspeed - [45]; // Take - out of array
            };

            if ((count _myspeed) isEqualTo 1) then {
                _myspeed = [0,0,(_myspeed select 0)];
            };

            if ((count _myspeed) isEqualTo 2) then {
                _myspeed = [0,(_myspeed select 0),(_myspeed select 1)];
            };
#

probably

dusky pier
#
[] spawn {
    disableSerialization;
    private _ds = findDisplay 46 createDisplay "RscDisplayEmpty";
    uiNamespace setVariable ["DS_DISP",_ds];
    private _plr_img =     _ds ctrlCreate ["RscObject",1100];
    _plr_img ctrlSetPosition [0.245,0.0868,0.451515,0.794948];  _plr_img ctrlCommit 0;
    _model = (getModelInfo player)#1;
    _plr_img ctrlSetModel format["\a3\%1",_model];
    _plr_img ctrlSetModelScale 2;
};
#

try'ed this, but is not works 😦

#

changed model to "\a3\Ui_f\objects\Compass.p3d", but still not working. Any idea why?