#arma3_scripting

1 messages ยท Page 566 of 1

tough abyss
#

yeah, the whole thing kinda be wack

#

the first event handler I add from mission start, starts at ID 1 but when I removeAllEventHandlers then add it back the ID starts at 0

astral dawn
#

maybe smth has also added one

#

which mods do you run? maybe one of them did ๐Ÿคท

tough abyss
#

brand new mission just initPlayerLocal.sqf

#

no mods

astral dawn
#

anyway, does it worry you much? you get your ID, you delete an EH by passing your ID, that's all we users need to know I guess ๐Ÿค”

#

I mean... use it as API

#

don't worry about decrements as the guy said

tough abyss
#

yeah, just concerning ... i don't need another onEachFrame event handler running in the background evertime it gets called so its hard to tell with these wack IDs

#

that could very quickly lead to game crashes

astral dawn
#

๐Ÿค” you don't need it - you don't add it, I don't get it ๐Ÿค”

#

i don't need another onEachFrame event handler running in the background evertime it gets called
Sorry man, every time what exactly gets called? When you call addMissionEventHandler, surely it will add one for you

tough abyss
#

yeah "i don't need another" as in it would be very bad to have multiple handlers executing the same code EachFrame but as long as its actually being removed and the IDs are just being incremented then its fine

#

and yeah every time I call whatever function that adds the event handler because its needs to be removed so that the code is not running when I don't need it to run

astral dawn
#

maybe you could add it once and could just have a toggle/flag to run it or not

#

if you are going to add/remove them very often, at some point you will reach the float maximum integer

queen cargo
#

Would not worry too much about that
Unless the Mission is supposed to run for weeks

tough abyss
#

yeah lol, mine only runs when the player dies so if he dies like 5000000 times in one mission window .. then i hope his computer blows up

astral dawn
#

all right then ๐Ÿ˜„ I'd personally prefer it to be added permanently at start and just exitWith at start if conditions are not met, to avoid messing with remembering the ID, then removing the handler, etc

tough abyss
#

yeah, i agree with that ... but i dunno the performance impact EachFrame has on large missions even when its being exited on the first line of code

queen cargo
#

Few ms
Again.. Nothing to worry about

tough abyss
#

and i am removing it from within itself so i dont really have to deal with the handlers removeMissionEventHandler ["EachFrame", _thisEventHandler];

astral dawn
#

performance impact is none... just make sure that the actual added code to onEachFrame is small, because it might be recompiled on each frame

#

Few ms
๐Ÿ˜ฎ few us I think

queen cargo
#

๐Ÿ˜… ๐Ÿ˜… I am overdue to sleeping right now

astral dawn
#

better tjam me at least

slim oyster
#

Anyone know a way to temporarily stop an AI from firing? I want AI to keep target info, target to keep enemy status, etc. I just want an AI to lose the ability to fire his weapon for 1-2 seconds. It would be right after a reload, so preferably something to do with loading an empty magazine and giving them a full one after the wait.

high marsh
#
unit disableAI "TARGET";

Maybe?

slim oyster
#

The AI loses targeting info and it takes a while to reacquire the target

#

I just want a very short amount of time the enemy cannot fire in

#

will a _unit setAmmo [currentWeapon _unit, 0] prompt a reload?

velvet merlin
#

how often does attachTo sync the position data on MP? was it per frame?

#

@slim oyster try combatMode "blue"

jade abyss
#

Per Frame

#

At least it looks like it, when attached to a player. Instant moving etc.

#

(as long as the "attachTo parent", it is attached to, has PhysX set up)

still forum
#

No i just want to avoid problems with extdb
You want to prevent people with malicious names from getting to your database, by kicking them?
Thats not the correct way to do security, the correct way is to make sure that your DB can handle weird input correctly @echo yew

winter rose
#

"Bobby Tables"

velvet merlin
#

is possible to interact with the AI commend menu via sqf in some way (besides the opening)?

surreal peak
tough abyss
#
//config.cpp/bin
class Extended_Killed_EventHandlers
{
    class CAManBase
    {
        class Salmon_heac_killed_eh
        {
            killed="[(_this select 0), 'dead'] call salmon_heac_fnc_reactHelm; [(_this select 0), 'dead'] call salmon_heac_fnc_reactRifle";
        };
    };
};

Function reactHelm and reactRifle both just contain(for testing purposes)

systemChat "Helm"/"Rifle"

It works perfectly fine until a unit dies from another. Lets say I shoot AI it'll fire twice.
If AI setDamage 1 then it'll just print systemChat once.
If I respawn then it'll print systemChat once
If I shoot AI then it'll print systemChat twice.
Does anyone know a way around this?

still forum
#

systemChat "Helm"/"Rifle" thats syntax error?

#

second script won't execute if first script errors.

wispy cave
#

What's the best way to get a unit by its roleDescription? I'm expanding my TK script to also detect when a UAV teamkills someone. Normally I'd get the player object from the eventhandler but if the thing that teamkills is a UAV I don't get the UAV operator, just the UAV.

still forum
#

then just get the current uav operator from the uav?

tough abyss
#

@still forum

//config.cpp
class CfgPatches
{
    class test
    {
        name="test";
        version=1;
        requiredVersion=1.96;
        requiredAddons[]=
        {
            "ace_main",
            "cba_main"
        };
        author="";
        authorUrl="";
        units[]={};
        weapons[]={};
    };
};
class Extended_Killed_EventHandlers
{
    class CAManBase
    {
        class test_killed_eh
        {
            killed="systemChat 'dead'";
        };
    };
};

In game:
Any unit dies from setDamage 1 prints "dead" once
Any unit kills another prints "dead" twice

wispy cave
#

oh yea, that works too

still forum
#

Any unit kills another prints "dead" twice
I think ACE team also had that bug, or maybe it was handledamage running twice

tough abyss
#

Did you guys find a solution? Could you point me in a direction of that discussion if there is one?

still forum
#

ACE Slack, don't think they did. They told me to take a look at it

tough abyss
#

Hmm.. ok. Going to try with vanilla EH but last time I tried using them they didn't even fire.. :/ Thanks

hollow thistle
#

the solution was to do something like:

params ["_unit"];

if (_unit getVariable [QGVAR(alreadyKilled), false]) exitWith {};
_unit setVariable [QGVAR(alreadyKilled), true];
// ... rest of EH code
tough abyss
#

I'll try, thanks! ๐Ÿ™‚

winter rose
#

isn't the "issue" because of locality?

astral dawn
#

@tough abyss yesterday I had issue with vanilla EH firing "killed" twice

#

solved it with putting a flag on unit after handling killed first time

#

(yeah I am using ace)

#
private _handledPreviously = _oldUnit getVariable ["vin_killed_handled", false];
        OOP_INFO_1("  handled previously: %1", _handledPreviously);
        if (_handledPreviously) exitWith {
            OOP_INFO_0("  handled previously, ignoring this call");
        };
        _oldUnit setVariable ["vin_killed_handled", true];
tough abyss
#

I'm using a similar solution. I didn't have the ability to test at the time and was thinking someone else must've had the same problem. Thanks for all the help :)
@winter rose I was thinking it had to do with locality too ie killed runs on both attached unit and killer but I wasn't sure. I'm happy with the variable alreadyKilled solution.

#

From my testing it just looks like it runs twice ^^

winter rose
#

well if it is locality, you can fix it with if (local unit)

tough abyss
#

It happens in sp and editor

winter rose
#

then not locality related I'm afraid

tough abyss
#

yep

#

I could only test now. Weird problem to have though.

astral dawn
#

at least it doesn't lock your game so that you must Alt+F4

hollow thistle
#

It's not locality, flag on unit is a solution.

#

It's done same way by ace too.

astral dawn
#

oh weird, I thought ace was causing this since it happened when unit was unconscious for some time then passed out (through ace scripts, that is)

#

anyway... any idea what's causing it?

hollow thistle
#

no

forest ore
#

What in the lord's name this time. How to inflict damage on player with the below when player is in vehicle? Because that just damages the vehicle player happens to be in sqf dmgTrg = createTrigger ["EmptyDetector", position [1,1,0], TRUE]; dmgTrg setTriggerArea [10, 10, 0, TRUE]; dmgTrg setTriggerActivation ["ANYPLAYER", "PRESENT", TRUE]; dmgTrg setTriggerStatements [ "this", "{if (isPlayer _x && alive _x) then {_dmg = 0.1; _x setDamage (damage _x) + _dmg;}} forEach thisList;", ""];

winter rose
#

maybe thislist lists the player's vehicle, and you should do something about crew, if _x is a vehicle @forest ore

#

(italic is not sarcasm from me, I don't know triggers' behaviour on this)

worn forge
#

Not sure you can uiSleep or sleep in a trigger statement

forest ore
#

true Ryko, probably can't. At one point I had [] spawn there. Forgot to remove the uiSleep from that example of mine.

winter rose
#

-showScriptErrors saves lives

forest ore
#

Lou, thanks for the suggestion. Reading about crew at the moment and like you suggested I'd probably need to tap into the vehicle's crew array somehow. Well nothing's brewing under the hood so-to-say but maybe something will after a while ๐Ÿคท๐Ÿผโ€โ™‚๏ธ

slate sapphire
#

Hello, I have a problem with UAV, I would like to get some help, it's possible to assign the created crew of uav to player team somehow?

surreal peak
#

@slate sapphire as in something like [_uavCrewMember] join player?

slate sapphire
#

I can try

#

it say that the crew created will be in vehicle group

#

my problem is, the killing reward scripts/town activation scritps will not work cos they expect member of player group

slate sapphire
#

I don't know how to get the uav crew to make them join player group

#

and if it's possible

worn forge
#

You can join them as any other unit, but expect funkiness... they will try to enter player group's formation which will destroy any kind of loiter WP

#

(units uavGroup) joinSilent group player

slate sapphire
#

it's there another way to relate the uavGroup to players ?

worn forge
#

I think you need to be more specific for what you want to do

young current
#

do you want to give orders to UAV crew with the group command system?

slate sapphire
#

no it's not that the goal, I am fine using the terminal, the problem is, when UAV do kills the score system doesn't give bounty to player, cos the system works if it's player killer or one ai of player group killer.

#

another problem is the drone doesn't activate town

young current
#

is this in some modded/custom scenario?

slate sapphire
#

yes it's my warfare edition

#

I wanted to add, also drone kills to score system

young current
#

now that you have explained the basics someone might figure out how to help you.

#

but I would wager its the bounty system that needs altering

#

what you are trying to do does sound like it would break how the UAV behaves

slate sapphire
#

I did ask if was possible to relate the uav to player, if that is not possible without break the uav functionalities of course we need find another route or just give up with the score.

#

there is something weird still

exotic flax
#

probably need something to catch the kill (event handler), check if it's a UAV (unitIsUAV) and who the gunner is (UAVControl), and then assign the kill to the gunner.

slate sapphire
#

cos if I use the greyhawk on turret I get the kills it's like recognizing me as gunner and works

#

instead the land one rcws doesn't

#

yes Grezvany13, still I don't understand the actual system,

#

arma engine give me the rating for kill with both uav, but on the greyhawk I get the bounty as gunner , on rcws land one I don't

exotic flax
#

that seems to be an issue with the custom scripting, not with Arma

slate sapphire
#

the turret of the two drones are working differently

#

or maybe

#

I had multiple drone connected, I need try it just with the RCWS

exotic flax
#

but you can only operate one gun at a time, so that shouldn't be an issue

#

and since it works correctly in the killcount of Arma itself, it must be somewhere in the scripts of the mission/scenario/mod which handles the kills

slate sapphire
#

I can't do more tests right now cos we are about to start daily 9pm game but from previous test made the greyhawk the flying one I killed vehicles with missiles and got the reward without problem so all working, with the land rcws I did same killed some ai but I only get the rating (arma engine) and not the kills, btw the command you listed will help me in my goal so I want to tank you a lot

#

unitIsUAV and UAVControl ๐Ÿ™‚

astral tendon
#

what is targetAge?

worn forge
#

Probably the length of time since unit A detected unit B, it's considered in a number of different contexts

astral dawn
#

How are script handles generated?
How many of them are there?
Are they recycled? I have a plan to spawn lots of scripts, but after previous have been terminated.

solar forge
#

Hi guys, could someone help me work out whats wrong with this script I have on a mission?

#

I'm getting this error:

#

'21:11:06 Error in expression <h) then
{
_x setVehicleLock "LOCKED";
};
} foreach _lockveh;
};

while {true} d>
21:11:06 Error position: <;
} foreach _lockveh;
};

while {true} d>
21:11:06 Error Missing )
21:11:06 File mpmissions__cur_mp.Tanoa\vehicleLock.sqf..., line 19
21:11:06 Error in expression <h) then
{
_x setVehicleLock "LOCKED";
};
} foreach _lockveh;
};

while {true} d>
21:11:06 Error position: <;
} foreach _lockveh;
};

while {true} d>
21:11:06 Error Missing )
21:11:06 File mpmissions__cur_mp.Tanoa\vehicleLock.sqf..., line 19'

#

and the pastebin is the script itself ^

ebon ridge
#

you missed a parenthesis

#

exactly like it said in fact!

#

line 16 on pastebin

solar forge
#

Sorry, I'm just dumb and I couldn't interpret the error layout it was giving me

#

thank you!

ebon ridge
#

yeah it is pretty awful

oblique arrow
#

I recommend using code blocks so your code is readable

solar forge
#

I tried, I think I made a mistake with that

oblique arrow
#

in discord that is

ebon ridge
#

```sqf
your code here
```

solar forge
#

thanks, will remember that in future

#

were all the other errors related to that missing parenthesis

ebon ridge
#

find out

solar forge
#

will do a test

#

to be fair, I actually am not sure where the parenthesis should go on that line
It looked like everything is closed to me

#

Feeling pretty stupid, I have dabbled with this stuff before not sure why i can't see it

oblique arrow
#

either behind typeOf _vehicle or they arent needed

solar forge
#

will try one there

oblique arrow
#

Thats a guess tho

#

havent used those commands myself yet

ebon ridge
#

can't paste image here :/

#
if ((typeOf _vehicle in _lockveh) then
   ^^                           ^
#

should be

 if ((typeOf _vehicle) in _lockveh) then
#

now each open paren has closing paren to match

#

the inner ones aren't actually necessary though

#
 if (typeOf _vehicle in _lockveh) then

this should work as well

solar forge
#

will try that ^

upper rose
#

so i understand that there's a system in place that fails or succeeds a mission if too many of a particular side are killed

but what im trying to do is create a system that leads to mission failure in the event the player's side kills too many civilians, and likewise play an audio notice across the entire world every time a civilian is killed

I currently have a system in place that counts the number of dead civilians and plays an audio notice on the local client that indicates a civilian is dead, but that doesnt differentiate between a civilian that dies by falling off a mountain versus the player's OPFOR faction that actively kills a civilian intentionally.

this is what i currently have in every CIVFOR's init field to count the number of civilians killed by OPFOR and play an audio notice

this addEventHandler["Killed",{deadCivCount = deadCivCount+1; playSound "CivilianKilled"}];

this is what was suggested to me by a colleague, but it's not working...

this addEventHandler ["MPKilled",{if (side (this select 1) == OPFOR) then [deadCivCount = deadCivCount+1; playSound "CivilianKilled"]}];

anyone able to steer me in the right direction?

upper rose
exotic flax
#

use that script, but remove the line with hintSilent format["...

upper rose
#

alrighty

still forum
#

@astral dawn

How are script handles generated?
They are just the memory address of where the script instance is.
How many of them are there?
on 64bit arma on windows 10 home with 128GB of memory there are... 2.21428571*10^9 possible script handles.
Or if we assume there is some padding. 1,937,500,000 possible handles.
Are they recycled?
uh.. somewhat, but more by accident than deliberately.

astral dawn
#

Thanks Dedmen!

#

@ebon ridge I think we are good to try this then?

winter rose
#

I am slightly concerned about this idea of yours now @astral dawn ๐Ÿ˜…

bronze lotus
#

Just curious.. With regards to the addWeaponTurret thing where an imaginary gun is added to a particular seat such as the driver or pilot ones, how can I reposition the "turret" to be in front of a real gun attached to the vehicle?

#

I know its not that necessary, but I'd love to have a few grenade launchers on the wings of a small prop aircraft instead of one being fired from the center lol

winter rose
#

@bronze lotus it is I believe linked to a memory point in the 3D model itself, so you cannot do much script-wise

#

you could teleport the fired bullet with an EH though

bronze lotus
#

Ah I see @winter rose, but how do I use the EH?

#

I never heard of an EH, that could work haha

astral dawn
#

It will be fine @winter rose , worst case is that it will crash the game after several days of running

bronze lotus
#

Ah I see, event handler. Is there a way to detect the 30mm grenade with an event handler if that's what you mean @winter rose?

ebon citrus
bronze lotus
#

Yeah I saw taht @ebon citrus, but I want to know how to select the round also.

#

*that.

ebon citrus
#

_this select 6 should be your ticket

#

or if you use params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];

then it's the _projectile

bronze lotus
#

Ah fair enough, and is there a script which teleports objects?

ebon citrus
#

setpos

bronze lotus
#

So I can teleport that, thanks for helping me also.

#

Ah cool, thanks and will it reset the projectile's ballistics or leave them?

ebon citrus
#

setvelocity

bronze lotus
#

Sorry, I'm quite new to scripting lol

#

But will do if it somehow resets the ballistics.

ebon citrus
#

no worries

bronze lotus
#

Ah cool.

ebon citrus
#

im not tipsy today

bronze lotus
#

Fair enough lol

ebon citrus
#

it can

#

but you can just getvelocity and setvelocity

bronze lotus
#

Yeah true.

#

However, do I use the event script on the vehicle with the turret commands or the player?

ebon citrus
#

the vehicle with the turret

#

in this case the vehicle (plane, whatever)

bronze lotus
#

Yeah no problem.

ebon citrus
#

you can get the vehicle with vehicle player

bronze lotus
#

But yeah, I'm basically making a Caesar prop aircraft have a few AGS grenade launchers lol

ebon citrus
#

yep

bronze lotus
#

And its okay, I already got a unique variable for it.

#

Well variable name that is.

ebon citrus
#

FiredMan can be attached to the player directly

#

and will return the projectile fired

#

i am noit entirely sure about the locality of these event handlers

bronze lotus
#

Yeah true, I saw that and what you mean by locality?

ebon citrus
#

whether it fires on remote or has to be local where the object is local

#

it's about multiplayer stuff

#

if youre not planning on using this in multiplayer, it doesnt matter

bronze lotus
#

Although I likely will, I'll see how it goes haha

#

But yeah, the amount of stuff I can do in Arma's amazing xD

ebon citrus
#

yeah

#

well about a after a month's work, you should have a grasp on the general limitations

#

although rather open, it is nearly not perfecty and all powerful

bronze lotus
#

Oh of course, I know scripting is still limited but its pretty interesting still lol

ebon citrus
#

certainly

#

and with being open, it ofcourse brings its own bunch of security issues

bronze lotus
#

Fair enough and all good, I'll take a look. Although I'll likely use this just for a Zeus Insurgency server but its okay.

ebon citrus
#

if it's a private milsim group or something like that, you can jsut turn off battleye and be done with it all

bronze lotus
#

Its public but all good.

#

With regards to the "setpos" script, do I select the projectile by just using "_projectile" in the object section of the script @ebon citrus?

ebon citrus
#

yes

#

as detailed in the Biki article: projectile: Object - Object of the projectile that was shot out

bronze lotus
#

Ah all good, sorry about that. I weren't sure if it'd select all projectiles on the map or something lol

ebon citrus
#

no worries

ebon ridge
#
#define TRY_(args) \
[] call {
    private _retArray = []; \
    private _scriptHandle = [_retArray, args] spawn { \
        params ["_retArray", _args]; \
        _args params args;
        private _retVal = [] call
#define CATCH_ ; \
        _retArray set [0, _retVal]; \
    }; \
    waitUntil {count _retArray > 0 || scriptDone _scriptHandle}; \
    if (count _retArray == 0) then
        // It crashed mid-way somewhere
#define ENDTRY_ \
    else { \ 
        _retArray[0] \
    } \ 
}

_val = TRY_(_a ARG _b ARG _c) {
    _a + _b - _c
} CATCH_ {
    3 // fallback value
} ENDTRY_;

I didn't test this yet, looking for someway to really catch exceptions (crash) in script in a recoverable manner. Is this it, or is there a better way?

astral dawn
#

Me and billw, we want to replace call in our framework with spawn and wait untill script done or has crashed

still forum
#

If the script depends on _this, then it won't work in there

#

why go to such effort and add such a overhead to all your stuff, if you could just do proper error checking in your scripts and have them just not crash

ebon ridge
#

lol

astral dawn
#

Yes with SQF... without debugger or anything... (except for call stack dumps, but still crashes happen on users without ADE)

ebon ridge
#

perhaps you didn't see how much script we have, "just don't make mistake" isn't real advice, if it was all software wouldn't have bugs

#

regardless i don't suggest using this on all stuff, but on high level places were we can make bugs in the script recoverable rather than catastrophic

astral dawn
#

So far main thread crashes most, so... it will be in main thread, and it does most amount of mission logic

ebon citrus
#

are you trying to say you dont know how your script works?

#

arma 3 has a very crude debugger built into it, but have i ever had the need for anything better? no, not really

#

so i'm going to have to be with Dedmen here

#

your best bet is to just write sqf that doesnt crash in the first place.

still forum
#

arma 3 has a very crude debugger built into it
It doesn't. Debug console is not a debugger

#

perhaps you didn't see how much script we have
ACE also has lots of script, and they can manage

astral dawn
#

I don't think you are being constructive this time (with all respect to you programming skills)

#

your best bet is to just write sqf that doesnt crash in the first place.
without error handling or anything useful provided by arma itself, I might agree

ebon citrus
#

@still forum in terms of "debugger" i meant the script error messages that pop up in runtime

#

It's close enough to a debugger in the way that it gives you a slight hint if what's going wrong... usually somewhat around the block. So i'd say it's a debugger. Not a very sophisticated one, but debugger regardless

#

And never did i mention the debug console. Way to construct a strawman right there ๐Ÿ˜‚

astral dawn
#

Dedmen's callstack dump thing is closer to debugger than the default arma error msg

still forum
#

a error message is not a debugger

astral dawn
#

Like, 100x closer

still forum
#

a error message tells you after the fact: "Something went wrong"
a debugger tells you right there "Something is wrong right here right now, please look at this now"

astral dawn
#

Regarding ACE, they are doing different things, and they therefore can run that synchronously to the game (aka unscheduled)... asynchrony in our code gives some problems too

hollow thistle
#

with some creative thinking you can do everything unscheduled.

#

Albeit for your oop game logic related stuff it would end in writing custom "scheduler" most likely ๐Ÿ™ƒ

#

But you have already written oop on top of functional language, so why not go deeper bloblurkinglenny

astral dawn
#

Albeit for your oop game logic related stuff it would end in writing custom "scheduler" most likely upside_down

Yes, adding more script, and more error possibility, removing asynchrony, reducing error possibility... IDK if gain will be positive or negative :(

hollow thistle
#

Have you tested your mission on longer running sessions? In my experience after some time scheduler goes bonkers and everything executes so slow.

ebon citrus
#

@still forum that's a syntax check. A debugger is usually operated when the code is running. Not before

#

The error message in arma is just a simple trap

#

A debugging feature

#

The execution of the script reached a point from which it cannot continue.

still forum
#

exactly

#

but there is no debugger operated while the code is running in arma

#

it just has a crashhandler, thats not a debugger

ebon citrus
#

It is a debugging feature

#

The handling of crashes and displaying/logging them and their location is debugging

#

Important information, what, where, why

still forum
#

a crashlog is a feature that helps debugging yes, but its not a debugger, and not part of one either

ebon citrus
#

It is not a debugger, but a debugger feature, indicating that there is a debugger behind the frames

still forum
#

indicating that there is a debugger behind the frames
but there is none

#

There is a debugger interface, but its disabled in release builds.
in release builds there is no debugger anywhere

ebon citrus
#

ArmA doesnt offer built in features like memory browsing or breakpoints out of the box, but having the debugger indicate the important information of "what, where, why" is already an indication for a debugger

#

There is a debugger for scripts

still forum
#

There isn't.

#

Besides my externally added one, and the BI internal one

#

Btw the games name is Arma

ebon citrus
#

Which one?

#

I've seen all 3 ways used

#

ARMA, Arma and ArmA

#

And we might want to stick to topic discussion

still forum
#

ArmA is Armed Assault, a game from 2006.
Arma 3 is Arma, which is not a abbreviation for Armed Assault anymore. Its Arma, a latin word.

#

Which one?
which debugger you mean?

ebon citrus
#

Arma 3 offers tools suitable for debugging, right?

still forum
#

Any example? Don't know of any. Not sure what you mean
Like you can write logs with diag_log, but thats not a debugger.

#

Arma 3 had a debugger interface once, but the backend for that was still disabled, and that interface was removed when people missused it for cheating

bronze lotus
#

My goal is to teleport 30mm grenade projectiles to the muzzle of an AGS-30 attached to a vehicle. Can anyone point out any issues with this script applied to the vehicle init?

ebon citrus
#

Codeblocks, please

bronze lotus
#

Oh sorry, how do I do that?

ebon citrus
#

Code

#

Dont mind the indent on the first row

bronze lotus
#
this enablePersonTurret [[-1], true];
this addWeaponTurret ["RHS_weap_Ags30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addEventHandler ["Fired", {params ["_projectile" setpos ("_projectile" modelToWorld [1.5,0.27,0.75])]}];
#

So, anything wrong with this script for what my goal is?

ebon citrus
#

Yes

#

You forgot the closing brackets of your event handler

bronze lotus
#

Oh rip lol

ebon citrus
#

So close the params command first

#

Then close the code

#

And then close the addEventHandler

#

Remember ; where necessary

#

Wait

#

This looks real weird

#

Let me get a syntax editor

bronze lotus
#

All good.

ebon citrus
#

your problem is msot likely

this enablePersonTurret [[-1], true];
this addWeaponTurret ["RHS_weap_Ags30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addEventHandler ["Fired", {params ["_projectile" **HERE** 
setpos ("_projectile" modelToWorld [1.5,0.27,0.75])]}];```
bronze lotus
#

Yep, all good.

ebon citrus
#
this enablePersonTurret [[-1], true];
this addWeaponTurret ["RHS_weap_Ags30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addMagazineTurret ["RHS_mag_VOG30_30", [-1]];
this addEventHandler ["Fired", {
    params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];
    setpos ("_projectile" modelToWorld [1.5,0.27,0.75])
}];```
#

herre

bronze lotus
#

Oh thanks haha, I was about to ask if a new line would work lol

still forum
#

"_projectile" can't modelToWorld from a string

#

you want _projectile the variable, not "_projectile" the string containing the name of the variable

ebon citrus
#

also

still forum
#

also setPos is missing your left argument

ebon citrus
#

your setPos command is incorrect

#

check the syntaxc on that

#

you haven't actually declared what youre moving

#

only the position

bronze lotus
#

One of y'all able to just type out the line I need?

#

Oh okay.

#

Well, I'm trying to move the _projectile.

still forum
#

I assume
_projectile setpos (_projectile modelToWorld [1.5,0.27,0.75])
?

bronze lotus
#

I'll try it.

#

OH, wait.. Are the brackets at the beginning supposed to be closed first?

#

Instead of the closest ones to the end?

#

I think its the other way around but I'm just making sure lol

still forum
#

not sure which you mean

ebon citrus
#

params?

bronze lotus
#

Actually.. How's this?

this addEventHandler ["Fired", {params ["_projectile"] setpos (_projectile setpos (_projectile modelToWorld [1.5,0.27,0.75]))}];
ebon citrus
#

doesnt work

#

_projectile will in this case return the unit

still forum
#

wtf

#

why, what, why

#

I told you what to do :U

bronze lotus
#

I tried to follow it, sorry.

ebon citrus
#

he's learning

#

Dedmen

bronze lotus
#

Yeah, I'm not very good at this.

ebon citrus
#

you want to define all of the parameters for params

#

the names you give them are just... names

#

but the order at which you define them is important

#

so you want to do them all

bronze lotus
#

Oh, do I need all the other options aside from _projectile also?

still forum
ebon citrus
#

yes, you do

#

because they come in order

#

like so

still forum
#

you want to define all of the parameters for params
no need if you don't need the others, and the order is correct (The order isn't correct tho)

bronze lotus
#

I been checking out the setPos thing but I'll look at the other one.

#

Oh okay.

ebon citrus
#

params ["0", "1", "2", "3", "4", "5", "6", "7"];

bronze lotus
#

And how would I select 6 which is for projectiles?

austere granite
#

you can just use "" if you don't need them

bronze lotus
#

Well I mean, I only need 6.

#

I still need one of them.

ebon citrus
#

if you want just one, you can use _projectile = (_this select 6)

bronze lotus
#

OH okay, thanks.

#

I want to start that line again if that's okay?

#

Just so I can eliminate potential mistakes and I'll be back in a minute since I need some water.

still forum
#
params ["" /*0*/,"" /*1*/,"" /*2*/,"" /*3*/,"" /*4*/,"" /*5*/,"_projectile" /*6*/];

or

private _projectile = _this select 6;
bronze lotus
#

Okay, now I'm back and no worries.

ebon citrus
#

๐Ÿ‘

#

we were all there one day

#

despite our backgrounds, everyone started from something and asked the same questions and made the same mistakes

bronze lotus
#

Fair enough, I know what you mean.

#

Thanks for being understanding also.

#

But yeah @still forum, do I use the private line after the params box or in it?

#

And I think I put "" in the [] box before that right?

still forum
#

By code blocks where two seperate examples

ebon citrus
#

it's "or"

still forum
#

two lines of code, completely seperate

ebon citrus
#

so you use one or the other that dedmen provided

bronze lotus
#

Yeah I know they are, I meant how to implement them in my code.

#

Since params is required.

still forum
#

Your eventhandler code starts at { and ends at }

#

you put your code inbetween

bronze lotus
#

Ah all good.

ebon citrus
#

you use

params ["" /0/,"" /1/,"" /2/,"" /3/,"" /4/,"" /5/,"_projectile" /6/];
or
private _projectile = _this select 6;

still forum
#

the first line would be retrieving the parameters. You can do that by having the first line be params (as above) or _this select (as above)

bronze lotus
#

I'll show what I mean guys.

still forum
#

after that, you do the next step in the next line

ebon citrus
#

all good

still forum
#

You don't need to use params (the wiki page just shows that as example as its the most sensible thing to do)

ebon citrus
#

sometimes, it's better to show, not tell

bronze lotus
#

Oh never mind, so I can delete Params?

ebon citrus
#

yep

bronze lotus
#

Ah cool, that's what I was asking about actually haha

#

Thanks.

ebon citrus
#

you can use _this select 6 instead

bronze lotus
#

Yeah true.

#

So I done that now.

ebon citrus
#

holds the same information

bronze lotus
#

Yeah all good.

ebon citrus
#

if you need more than one parameter, or you control how many are passed, "params" is the best option

bronze lotus
#

Ah okay.

#

But yeah; with regards to SetPos, do I only need a space seperating that and the select command?

ebon citrus
#

;

still forum
#

setPos goes onto a new line

bronze lotus
#

Ah all good.

still forum
#

a line ends with semicolon

bronze lotus
#

Oh okay, will do.

ebon citrus
#

and line feed for readability

bronze lotus
#

Ah true, I admittedly don't do that enough xD

austere granite
#

setPos goes onto a new line LIESSSSSSSSSSSSSSSS

bronze lotus
#

Lol

austere granite
#

Unreadable code is best code!

#

It's like you're going to force him to use proper spacing as well, I bet you're some python nerd

ebon citrus
#

who needs obfuscation when even you cant read the code

austere granite
#

/s

bronze lotus
#

Lel

#

holds breath

#

jvklacdjglkdajlgkdasjglaks

ebon citrus
#

Python is good practise for readable code

bronze lotus
#

But fair enough on a serious note lol

ebon citrus
#

i recommend everyone to write atleast a few programs in python

#

yes, i digress

austere granite
ebon citrus
#

wait, really XD

bronze lotus
#

What's this? Lol

austere granite
#

nothing

#

ignore

bronze lotus
#

Lol

ebon citrus
#

๐Ÿคฃ

bronze lotus
#

I see its an extension but its all I know lmao

ebon citrus
#

sqf scrubs wont be able to read my chad python

bronze lotus
#

Shiiet

#

brings Javascript

ebon citrus
#

wait what! POOP! IT HAS SUPPORT FOR CYTHON!

bronze lotus
#

Cyka blyat

ebon citrus
#

IMA REWRITE ARMA 3 NETCODE

bronze lotus
#

Yeet

ebon citrus
#

pip some socket in here

bronze lotus
#

I'm confused lol

ebon citrus
#

just pass it

bronze lotus
#

However, do I use 6 or _projectile for the variable in the SetPos command? Lol

ebon citrus
#

ok, you need ot understand what parameters are passed to the eventHandler

#

when it gets called

#

it receives 8 parameters

#

in order

#

as an "array"

bronze lotus
#

Oh my bad, I forgot to read its article.

ebon citrus
#

so you want to get the 7th value in that array

#

this is done in 2 ways, both of which dedmen already referenced well enough

#

but what you want to do, if youre using a parameter that is passed with the call multiple times

#

is to create another mroe readable variable for it

#

this is why private _projectile = _this select 6;

#

_projectile is easier to remember and read than _this select 6

#

both of them hold the same information

bronze lotus
#

Oh, so I can just use "_this select 6" yeah?

#

I don't mind if that's the case.

ebon citrus
#

here we are defining the variable we want to use: private _projectile

bronze lotus
#

Yeah I know, I just didn't feel it was necessary for me in this case.

ebon citrus
#

and here we insert whatever is on the right side of the equation onto the left side:
= _this select 6;

#

you can...

#

but you shouldn't

#

youre going to get a bunch of angry cats and litter on you if you do

bronze lotus
#

Now I'm back and fine, I'll make a variable for it xD

#

Surprisingly also.. I actually killed a cockroach with a shoe despite being really afraid of them lmao

#

I somehow even picked it up to throw out lol

#

*throw it out

#

It was off-subject, but that's why I was AFK for some time so yeah.. They're scary to me lol

still forum
#

@ebon citrus if you prefer C you might aswell use Intercept directly

ebon citrus
#

i prefer C, but i also like the rapid development nature of python

still forum
#

@bronze lotus F-word violates the rules, please edit that out :u

bronze lotus
#

Oh sorry lol, my bad.

#

I'm not very politically correct so it can be easy.

ebon citrus
#

it's not about PC

#

it's jsut a family friendly server

bronze lotus
#

Ah fair enough.

ebon citrus
#

keeps the conversation on topic and mature

bronze lotus
#

Although I tend to swear regardless of the situation, I understand how it could help.

#

@ebon citrus you know where I'm missing a semicolon?

this addEventHandler ["Fired", {_this select 6;
private _projectile = _this select 6;
_this private _projectile setpos (private _projectile modelToWorld [1.5,0.27,0.75])}];
#

I'm not sure because its included in the ends of these statements from what I can see.

ebon citrus
#

here*
_this private _projectile setpos (private _projectile modelToWorld [1.5,0.27,0.75])

#

and nto a semicolon

#

remove _this private

#

_this is the current namespace

#

private means youre attempting to DEFINE a private variable within the current namespace

bronze lotus
#

Oh okay, my bad.

ebon citrus
#

but youve already befined the variable

#

so just scrap everything else and go for the variable already prepared

#

_projectile setpos (_projectile modelToWorld [1.5,0.27,0.75])

bronze lotus
#
private _projectile = _this select 6;
_projectile setpos (_projectile modelToWorld [1.5,0.27,0.75])

That want you want yep?

#

I obviously kept the addEventHandler thing.

still forum
#

_this is the current namespace
its just a variable

ebon citrus
#

that correct

#

_this within a called function is the variable passed when calling the function

#

my mistake

bronze lotus
#

Goddamnit @still forum xD

#

But its okay, and thanks also y'all ๐Ÿ™‚ The teleportation works now ๐Ÿ˜„

#

Although its positioned a meter high, I can fix that easily and I appreciate the help.

#

Though, is it possible to duplicate the script I made into the same init as long as I change setPos coordinates and the variable?

ebon citrus
#

?

#

yeah...

#

but remember that the eventhandler fires no matter which thing fires

astral tendon
#

how to change the selected waypoint for unit? also how to create a waypoint to be first so I don't have to remove the older ones?

bronze lotus
#

That's okay, I don't mind in that regard but sorry I confused you lol

ebon citrus
#

so in what youre asking, no

bronze lotus
#

However, I'm not sure how to script that sorry @astral tendon.

ebon citrus
#

you might aswell just duplicate the projectile to both sides

#

less hassle

#

or have it fire sequentially

#

left-right-left-right

bronze lotus
#

I wouldn't mind doing it sequentially haha, although I was going to duplicate it but it'd use the same amount of ammunition it has.

ebon citrus
#

alright

#

then jsut make a check

#

how i would do it

#
  1. pull how many rounds the weapon has left
#
  1. if the number of ammo devided by 2 floored is comparable to the number of ammo devided by 2, shoot left
#

if not, shoot right

bronze lotus
#

Ah okay.

ebon citrus
#

so

#
  _ammoCount = (_unit ammo _muzzle);
  if ((floor(_ammocount/2)) == (_ammocount/2)) then {

//shoot left
}else{
//shoot right
};```
#

something like that

#

didn't actually check the syntax, so use at your own risk

#

but in this case, if the ammo was 13, the results would be false, because 6 != 6.5

#

if it was 12, then it would be true, because 6==6

bronze lotus
#

Ah all good, and I'll think about it.

#

But actually, I'll just put the grenade launcher on top of the plane since it looks better haha

ebon citrus
#

or below

#

grenades fall fast

#

or rather

#

they have low muzzle velocity

#

there's a reason why missiles, weapons and such a like are hung UNDER the plane

#

also, remember to sync it with your propeller XD

#

or give it enough clearance

bronze lotus
#

It weren't an issue for me actually haha, the AGS-30 seems to be zeroed at 25m and the muzzle is probably about half a foot higher than the top of the propellors lol

#

It was working earlier at least when I tested it with an AI gunner xd

ebon citrus
#

just attachTo an automated 40mm onto the bottom fo it and call it a day

#

you can even remote control it from the passanger seat

bronze lotus
#

I would've, but I love the idea of the pilot firing it too xD

ebon citrus
#

fair enough

bronze lotus
#

Yeah lol

#

Want to see a screenshot of the aircraft? Lol

#

I should also mention that its great for dive "bombing" haha

ebon citrus
#

sure

ebon citrus
#

mount it on the nose of the plane so you can use the gunner sight XD

bronze lotus
#

I actually did that earlier LOL

#

Maybe I should xD

#

Although I couldn't aim through the optic anyway, it looked cool lol

ebon citrus
#

i remember doing it once with the m2

bronze lotus
#

Nice lol

#

But yeah, I love the attachTo thing lmao

ebon citrus
#

you seen this guys.,.. Banned Inc. videos?

bronze lotus
#

Look within my screenshots and you'll see a huge truck with so many guns on it hahahaha

#

And yeah I have, I kind of got inspiration from it lel

#

I even made my own battlebus APC xd

#

With concrete armour and two Dshkms inside :DDD

ebon citrus
#

good ol' wasteland arma 2 days

bronze lotus
#

I hadn't played much of that a while back, but I did for a bit.. It was quite interesting lol

#

But yeah, I love the military and political memes Banned.Inc uses.. Especially the UN memes xD

#

And the Slav ones actually lol

astral dawn
#

If game has debugger bu has interface disabled, why not have a separate build with interface enabled

#

They have profiling and performance builds already

#

And one more debug build I think?

queen junco
#

Hey, I got a quick question about faction editing. How do I customize the subfaction-category Like "Men", "Tanks", "Planes", etc. in a custom faction. And assign the different vehicles/Loadouts to those? The Alive orbat Editor uses only the Basic class names.

still forum
#

And one more debug build I think?
You'd still need a UI for the debugging. And we are at the same state if not further with my debugger backend already

astral dawn
#

Yeah agree

#

||except for it not being broken after arma updates ๐Ÿค“ ||

forest ore
#

Started to doubt myself: does this if (!isServer) exitWith {}; on top of a script file make any other than the server (or player host) exit the file immediately?

worn forge
#

That would be the point, yes

#

Obviously if it's inside a control structure it would just exit that structure

winter rose
#

@forest ore ^

What is the issue there?

forest ore
#

I was reading KK's info list (here https://community.bistudio.com/wiki/isServer) on different isXXXX and probably started to overthink the whole thing. For example we have if (!isServer) then { // run on all player clients incl. headless clients but not player host }; but yeah.. should probably have thought twice since that example is for if-then case

ebon citrus
#

@forest ore it does

#

Oh, sorry, just noticed you got an answer already

#

๐Ÿ˜…

jagged trout
#

anyone who's good at scripting and eden mind talking with me for a few seconds. Trying to get something simple to work and banging my head against a wall.

ebon citrus
#

How good?

#

Ive got a good while, if im good enough?

tough abyss
#

If you have a question just ask. Asking for someone to help you personally with an unknown issue is not going to work.

grave lotus
#

Is there a way to add some position randomization or offsets within BIS_Fnc_spawnGroup if its calling from an array of differing squad sizes? It doesnt seem to have the placement radius randomizer built into createUnit.

worn forge
#

I think it spawns the units according to their formation in the config, so if you want them to spawn in any other kind of formation you'll have to re-place them after they've spawned

grave lotus
#

that just answered my real problem. I'm feeding new units into the config that dont have formation data... THAT is why they are all coming in at 0,0,0 and 'fusing' until split apart via zeus. ๐Ÿ™‚

worn forge
#

Well the command returns the group, so you could run some simple code to reposition them after they've come in

grave lotus
#

in the end, a tiny offset to each should do it

worn forge
#

_group = [_position, east, 5] call BIS_fnc_spawnGroup; { _x setPos (_x getPos [random 10, random 360]); } forEach (units _group);

grave lotus
#

thanks! that'll drop right in ๐Ÿ™‚ much appreciated

#

my units defending the supply crate were spawning inside the crate ๐Ÿ™‚

winter rose
#

@jagged trout so, what's your issue? If I may ask you to ask ๐Ÿ™ƒ

jagged trout
#

I'm trying to run two unitplay recordings with a set delay in between

winter rose
#

and?

jagged trout
#

I figured it out. sorry, I was testing.

vital silo
#

@echo yew

Diag_Log Format ["FPS: %1 | entities : %2 | vehicles : %3 || players : %4", Diag_Fps, (Count (entities [[], [], true, true])), (Count Vehicles), (Count AllPlayers)];```
#

If you need a loop with this:

[] Spawn {
    While {True} Do {
        Diag_Log Format ["FPS: %1 | entities : %2 | vehicles : %3 || players : %4", Diag_Fps, (Count (entities [[], [], true, true])), (Count Vehicles), (Count AllPlayers)];
        UiSleep 120;
    };
};
tame lion
#

From a scripting perspective, how do I detect respawn points that are vehicles? This would include vehicles that have been made so by zeus mid mission. I imagine it'd be something like:

vehicle getVariable ["respawnPoint", false]```
but I don't know what that variable would be if so
exotic flax
#

As far as I know does a vehicle not "know" it's a respawn location.

#

You should be able to find all locations with
BIS_fnc_getRespawnPositions
And check if there are vehicles in there

celest fossil
#

hi wat is script for debug to set time?

#

like for editor

jade abyss
celest fossil
#

thank you

tame lion
#

thanks @exotic flax I was unaware of that function. I've just been using entities and the classname for respawn modules

exotic flax
#

it's actually used by the Respawn Modules, so that's how I found it ๐Ÿ˜‰

ebon citrus
#

@celest fossil if youre using the editor, you can set time and date in the top bar in "attributes" -> "environment"

unreal scroll
#

When running MP (local or dedicated) I noticed that some waypoint statement codes (like _wp setWaypointStatements ["true","this remoteExecCall ['OT_fnc_addtogarrison',2]"];) hit twice. Is this a known problem, and how to deal with it? I made some brutal workaround by defining new variable for passed objects in script, to avoid launching it twice, but idk if is it a good way.

winter rose
#

remoteExecCall 2?

unreal scroll
#

What's wrong with it? I thouth it should run on the server only.

winter rose
#

@unreal scroll

#

it should be sqf if (isServer) then { ... };

jaunty ravine
#

Quick question: How do I make it to where a helicopter spawns on the ground using BIS_fnc_spawnVehicle?

unreal scroll
#

@winter rose Thank you.

worn forge
#

@jaunty ravine I have a feeling that both BIS_fnc_spawnVehicle and BIS_fnc_spawnGroup have built in "features" which spawn the helicopter as "FLY", if you want to spawn it on the ground you'll have to do it yourself, ie:

_crewGroup = createVehicleCrew _vehicle;
jaunty ravine
#

Alright, thank you, I'm gonna try that now.

#

Works beautifully, thank you, @worn forge.

worn forge
#

๐Ÿ‘

worn forge
#

Hey folks, anyone know off-hand if there's a command that lets you know the maximum # of players that can connect to the mission?

winter rose
#

@worn forge maybe count playableUnits

worn forge
#

Nope, just gives current # of players

winter rose
#

oh wait, there is disableAI then. Well, @ruby breach to the rescue!

ruby breach
#

I'm good for something at least ๐Ÿ˜

winter rose
#

I was about to say to read the CfgHeaders' maxPlayers entry ๐Ÿ˜…

worn forge
#

That's perfect, thanks.

warm blaze
#

hi guys! Fast question: is it possible to make high command module and headless client work together on a dedi server? So ai groups will be under control of headless client but players can control them via high command module still

high marsh
#

Yes, iirc there are event handlers for high command units creation

warm blaze
#

could you please guide me where can I read about those EHs?

winter rose
#

Search top right: Arma 3 event handlers

austere granite
#

is it at all possible to manipulate UAV camera through script commands?

ebon citrus
#

What do you mean "manipulate"?

#

Turn the camera? Yes

#

Postprocessing? Not that im aware of

#

You can always apply PP to the unit when they are in the camera view and then remove it when they exit

#

I once did a grainy filter thingy for when the UAV is too far away

#

Sort of to simulate direct radio static

wary lichen
#

who knows how to realize the effect of color blindness of the playerโ€™s camera?

#

it is widely used in training missions

#

A2 OA

#

rummaged through all source codes, found nothing worthwhile

crude needle
winter rose
#

@wary lichen ^

wary lichen
#

Thanks, I try it

velvet merlin
#

can you make something execute in main menu via cfgFunctions?

#

or just preInit for missions

#

preStart = 1; //1 to call the function upon game start, before title screen, but after all addons are loaded (config.cpp only)

#

does this also work with
-skipintro
-world=empty
-noLand
?

still forum
#

preStart always runs

#

That is pre-main menu tho, if you want main menu directly... I guess you'd have to replace one of the Vanilla CfgFunctions which you know is called in main menu.

velvet merlin
#

so also for directly loading to editor mission or autotest?

still forum
#

yes, preStart always fires

velvet merlin
#

ty

#

directly executing code from cfgFunctions seems not possible though, is it?

still forum
#

no, its just parsed/processed in initFunctions, which doesn't execute code it just parses the file paths and compiles them, and takes care of preStart/preInit/postInit

#

although, you can execute code in a number config entry in CfgFunctions.. but... why would you

jade abyss
#

@velvet merlin onLoad in the config of the menu/display*

rough heart
#

Not sure if i need to ask this here cuz itz config (remoteexec) related but im having a slight problem with a few functions that need to be executed from the client to my server.

Multiple entries on the cfgremoteexec seem to work untill i add a few new ones. Those don't get executed on the server and ive got a error in the rpt saying its not allowed to execute that. Even tho its added to the CfgRemoteExec Functions config, target = 2.

Now that im reading up on the wiki for the first time on it, it mentions that some functions may need to be white listed ? If so, how would one go and whitelist it? ๐Ÿ˜‚

worn forge
#
{    class Commands
    {    mode = 1;
        
        class hintC {allowedTargets = 0;};
        class deleteGroup {allowedTargets = 2;};
    };
    
    class Functions
    {    mode = 1;
    
        class BIS_fnc_execVM {};
    };
};```
#

I think mode = 1 means it's whitelisted

rough heart
#

Well, ```
Operation modes
Operation mode is numeric value describing how functions or commands should be treated on server on client.

0: remote execution is blocked
1: only whitelisted functions/commands are allowed for remote execution
2: remote execution fully opened
#

i got it like

#
class CfgRemoteExec
{
    class Functions
    {
        mode = 1;
        jip = 0;
        class fnc_AdminReq                                            { allowedTargets=2; };    // infiSTAR AntiHack
        class fn_xm8apps_server                                        { allowedTargets=2; };    // infiSTAR xm8apps
        class ExileServer_system_network_dispatchIncomingMessage    { allowedTargets=2; };    // ExileMod
        class plant_message                                            { allowedTargets=1; };
        class plant_remove                                            { allowedTargets=1; };
        class plants_fnc_plants_create                                { allowedTargets=2; };
        class plants_fnc_plants_remove                                { allowedTargets=2; };
    };
    class Commands
    {
        mode=1;
        jip=0;
        class addAction                                                { allowedTargets = 1; };
    };
};
#

But im still getting:

๐Ÿ˜‚

worn forge
#

hmmm

rough heart
#

This is so weird, i made other stuff with it on a different server but these 2 last functions dont seem to wanna be fired

worn forge
#

So your situation is a player runs a command with plants_fnc_plants_create and nothing happens, that error shows up in rpt

rough heart
#

jip

#

Like yes

#

Bsically im the player in this case

worn forge
#

Maybe remove jip = 0

rough heart
#

๐Ÿค”

#

Welp, didnt try that yet, im gonna,. lolz

worn forge
#

That's the only thing that's different from my use

rough heart
#

Yeeh but how come the other functions that need to be executed on the server with target 2 do work?

#

That's what's puzzling me

worn forge
#

How are those functions created? With a hpp file? Because that might rename them

#

run copyToClipboard str (allVariables missionNameSpace) and see if you find plants_fnc_plants_create

ebon palm
#

For someone entirely new to arma, how hard would making a script to detect explosives in a backpack (both grenades and other) and to explode when shot/damaged?

winter rose
#

@true hull anything else to add?

worn forge
#

wtf

#

Show us how amazing you are then and answer dude's question

winter rose
#

don't react, peeps. Let Darwinism (and mods) do their job.

ebon palm
#

I'll take this constructive criticism as a warning against attempting such a project as an introduction and start a smaller project as an introduction into scripting.

young current
#

it would be quite difficult, for a beginner.

winter rose
#

@ebon palm you can do it with a couple of commands yes; has iirc, and the type of explosives you want to check

young current
#

it would need to be tied to an eventhandler too

#

for the hit

still forum
#

!purgeban 622116952420122655 30d spammer

lyric schoonerBOT
#

*fires them railguns at @true hull* ร’_ร“

worn forge
#

๐Ÿ‘

young current
#

and also if you want to detect hit on the backpack that gets more tricky

ebon palm
#

But what about checking damage while both on the player and dropped

young current
#

dropped?

winter rose
#

getting slow with age @still forum ๐Ÿ˜„

ebon palm
#

Yeah

still forum
#

don't ping me while I'm busy :U

ebon palm
#

Filling the bag with grenades and using it as a redneck satchel charge

winter rose
#

oh you didn't mean a soldier-held backpack, but one on the floor - my bad

#

well scripted yes, but in specific conditions then - and not an all-situations script

ebon palm
#

Both

young current
#

probably easier but also not sure if groundholders take damage at all

worn forge
#

You could still put a "Hit" eventHandler on it

young current
#

does it register hits

winter rose
#

Nope, one would need a fake target

#

I think a groundHolder would be 0ร—0ร—0 in size

young current
#

so basically an custom user action that is active if bag is full of grenades and places them down along with fake target that has the hit logic added to it

#

cant remember if theres inventory events for dropping stuff

#

that would be more universal place to tie it to but also more complex

ebon citrus
#

OpenInventory eventhander @young current

#

More useful in your case

young current
#

both probably would need to be used to compare if a backpack has been dropped and if it had grenades in it

ebon citrus
#

Nope

#

Only inventory closed

#

Tricky thing would be to make sure the bag inventory isnt opened twice

#

So you could just make the wepaonHolder non-interactable

winter rose
#

@ebon palm so yeah, no, not easy ๐Ÿ˜

ebon citrus
#

Tbh, i would personally use addAction to create an explosive bag on the ground

young current
#

I dont see how that works for players inventory and if you drop a bag

ebon citrus
#

Ofcourse you dont

#

The _container in the example returns the container you just closed

young current
#

perhaps you oh superior mind will elaborate then

ebon citrus
#

So if you drop a bag, the container will be the groundweaponholder

#

Check that container for the items and their conditions you want

#

If true, turn it into an explosive bag

winter rose
#

Ofcourse you dont
Uncalled for? ๐Ÿ‘€ @ebon citrus

ebon citrus
#

And create all the necessary groundwork for it, like detecting hits, and so on

#

TBH, it's more hassle than it's worth doing it this way, and instead you could make it so that a player just turns their bag into a satchel charge through addAction or ace interactive menu

#

And that stachel is immediately placed on the ground

#

Using vanilla-assets to create a hit-detection for groundWeaponHolders is tricky and not all that rewarding

#

Instead of shooting it, you could consider a timer, which would make it more simple

#

Or bomb-touchoff style mechanic

rough heart
#

@worn forge That between quotes should be the completely renamed function after creating them within a config.cpp but ill run a check anyways, thanks for the usefull snippit ๐Ÿ‘Œ

young current
#

Shooting it to blow it up is probably the main goal though. Like in the movies.

worn forge
#

Hate to be a stickler for reality but I'm not sure shooting explosives would actually set them off

young current
#

probably would have to be quite the lucky shot

#

but it was what he asked for.

ebon citrus
#

Well, it's something you can experiment with

#

A good one for a first project

#

Gets you thinking

tough abyss
#

So, after some testing.
The killed eventhandler fire twice if I binarise my config. If I keep it cpp the "fix" for it firing twice makes it fire 0 times. Thx arma lol

ebon citrus
#

Your other option is to start messing with the GUI, and i wouldn't call that at all beginner friendly

young current
#

@tough abyss probably more a #arma3_config issue but sounds like you might have 2 killed eventhandlers stacking up

ebon citrus
#

And i'd personally say

#

Your first project should'nt really be anything that specificly works

#

But more so experimenting with the environment and the tools at your disposal

tough abyss
#

@young current I only tested this once but I was running 99% vanilla arma 3 with CBA (only other mod) and made a simple mod that adds a cba eh on killed. When I binarise my test mod it fires twice. When I keep it cpp it fires once. Weird..

young current
#

how are you binarizing your addon?

ebon citrus
#

Ehhh

#

Im not config expert

young current
ebon citrus
#

But could it be that it reads both the .bin and .cpp?

#

And binds it twice?

young current
#

no

tough abyss
#

No I deleted the cpp

faint fossil
#

Hey folks I have some questions about unitcapture that I can't seem to find answer to online

#

I'm trying to make a test/practice mission and I'd like programmed transport helis to fly to a city, land, and leave again

#

Is there a way to make the helis respawn with unitplay enabled?

#

Also, is there a way to loop the unitplay if they are still flying after the leave the city?

ebon citrus
#

Does it have to be unitplay? Waypoints are not enough?

#

And yes, unitplay is enabled by default on units, if i recall correctly. Just spawn the unitplay function

#

You can loop the unitplay by teleporting the unit to the start position and restarting the unitplay function with the same parameters

faint fossil
#

Well I've noticed that the AI pilots flying waypoints are usually dunces that don't come close to even a mediocre player's skills

#

Would it be possible for you to explain the spawn unitplay thing a bit more? I use the radio commands to activate them at the moment but how do I make it start by default?

#

I put it in the init field of the heli but it didnt do anything

#

Also, what should I do to get the thing to respawn?

tough abyss
#

delete heli, spawn heli where you want it, unitplay again?

faint fossil
#

Apologies for being ultra noob but - I tried to spawn it with a radio trigger that does [[23181, 18686, 53], 180, "B_Heli_Light_01_armed_F", west] call bis_fnc_spawnvehicle; but it say invalid num in expression or something

#

How should I go about spawning a heli then doing unitplay on it? I looked for it online but again, nothing that helps

#

(I know it's shitty to ask for code but could you just provide a basic example that I can tinker with? I'm pretty damn clueless atm)

worn forge
#

Honestly I think unitPlay isn't a simple place to start, why do you want to use that specifically?

#

If you make your waypoints with the CARELESS behaviour then they won't care if they're being shot at

faint fossil
#

@worn forge I'm making a practice mission for pretty high-level gunning intended for an environment like KOTH, with super speedy landings and such

#

I've tested using waypoints but they just set down slowly, in a straight line to LZ

#

I can manually fly pretty well so I think it's best to work with unitplay despite its difficulty

worn forge
#

Well at the very least you'll need a variable that defines your spawned unit, so
_vehicle = [[23181, 18686, 53], 180, "B_Heli_Light_01_armed_F", west] call bis_fnc_spawnvehicle;

#

Then you can do something with BIS_fnc_UnitCapture

faint fossil
#

I got the recording and playback part down by yt tutorials but, how do I make it respawn after it dies and how do I reset them?

worn forge
#

Like
[_vehicle, duration, FPS, firing, startTime] spawn BIS_fnc_UnitCapture, according to the wiki, but I've never used it so you're on your own

faint fossil
#

I can make the path files no problem at this point - its just about actually using the paths

worn forge
#

Respawning after it dies would be pretty easy, just put a Killed eventhandler

faint fossil
#

so like this addeventhandler killed... then what?

worn forge
#

_vehicle addEventHandler ["Killed", { your code }];

#

your code = BIS_fnc_spawnVehicle

faint fossil
#

oh!

#

I'll try that

#

thank you very much.

worn forge
#

When it dies, it'll spawn again

faint fossil
#

so I don't need _vehicle if it put it in the init field? because it says local in global space

winter rose
#

no local var in global space indeed

#

ideally nothing in the init field either, unless for testing / you know what you are doing

faint fossil
#

oh hey it respawned!

#

But I can't do unitplay on it again apparently

#

I cant attach images but theres a little box that says

'rec = [] |#|spawn wp1;'
Error spawn: Type array, expected code
winter rose
#

wp1 is a waypoint I presume

#

can't spawn an array indeed; you can spawn Code

faint fossil
#

yeah its a sqf file of the path and [heli1, wp1] spawn BIS_fnc_Unitplay;

#

uh what does spawning code mean?

winter rose
faint fossil
#

I'm gonna try putting it in curly brackets then lol

#

oh now it doesn't play in the first place rip

#

oh wait nvm i'm dumb

winter rose
#

wait, you don't know what you are doing

faint fossil
#

I do not know what I am doing

#

as I said above I'm pure idiot when it comes to this stuff

winter rose
#

just uneducated, not stupid

#

amma bash knowledge into your skull! ๐Ÿ’€

faint fossil
#

Please do I can't find much about this online that would help a lot lol

winter rose
#

so: what is it exactly that you want to do:
force a helicopter to drive the path you drove, and if it explodes/dies/whatever, respawn and do it again?

faint fossil
#

Yeah the idea thing is - radio trigger to spawn heli that flys my path which will respawn and do it again if it dies, and if it goes through the whole path it'll delete itself

#

if that makes sense

winter rose
#

yep, got it

faint fossil
#

And right now I only got manual playback to work

#

But thatโ€™s it

#

How should I approach this?

winter rose
#

on Event "Killed", delete the helicopter, create a new one and turn its engine on, make this chopper call unitPlay
on "unitPlay" completion, just delete the helicopter

faint fossil
#

So I would make two event handlers? Where should I do that if init field is not a good place

winter rose
#

sqf script file?

#

init.sqf is a file that will always be called on mission start. in MP, it will be called on every - single - machine though.

faint fossil
#

Ohh so donโ€™t want that if I will be hosting this for mp

#

Good to know good to know

winter rose
#

you can want that, but with some safeties

faint fossil
#

What do you mean

winter rose
#

like ```sqf
if (isServer) then {
/* something */
};

this โ˜๏ธ is assured to run only once, on server on mission start
faint fossil
#

Oh excellent, that makes sense

winter rose
#

so the file will still be executed for every machine, but only the server will access this portion of code.

if you want to dedicate an init file only for the server, initServer.sqf is the one - no client will ever execute it.

faint fossil
#

Also uh I plan to make like 3 to 5 helis, is there a way to do this without copying code a bunch

#

Thanks! Iโ€™ll read through them right now

#

Holy smokes thereโ€™s a ton of init sqf things

winter rose
#

yes, but you hopefully don't have to use them all ๐Ÿ˜

faint fossil
#

Wow the different event scripts are really cool I just got some ideas I should look into in the future

#

Right lol

winter rose
#

just pick the one that fits your usage and build from it

faint fossil
#

And uh about the multiple helis

#

Do you know if thereโ€™s a way to make it simpler than copying the code a bunch of times?

winter rose
#

it is doable, but you have to have multiple unitPlay data nonetheless

#

(unless this is the exact same route you want?)

faint fossil
#

Oh no Iโ€™ll be doing different paths, so I guess I could just copy and paste with different variable names

#

Thank you so so much btw Iโ€™ll try to do this in about 40 minutes when I get home

winter rose
#

have fun, keep us posted

faint fossil
#

Will do, thanks again.

worn forge
#

bohemia forums down for just me?

winter rose
#

nope, happened right now

#

dang this thing is fragile these days. is it the temperature or what ๐Ÿ˜„

wary lichen
#

please help

winter rose
#

gibs help

wary lichen
#

bad gateway

winter rose
#

@wary lichen NO CROSSPOSTING #rules ๐Ÿ‘€

wary lichen
#

where to write then?

#

I search bis_fnc_sandstorm and bis_fnc_destroyCity

winter rose
#

thks

wary lichen
#

can you give offline documentation on the above functions?

#

for A2 OA

worn forge
#

just use google's cache

faint fossil
#

rip when I want to get started on the thing wiki is down

#

big oof

#

so @winter rose how do I attach an event handler that's in an sqf file to a heli?

#

if I put this in the init field it seems to work but I know you said it's not good to use init

this addEventHandler ["Killed", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];
    deleteVehicle _unit;
}];
worn forge
#

There's nothing "wrong" with using the init field

faint fossil
#

If you say so

#

also

#

this gives me an error with expected object not array

this addEventHandler ["Killed", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];
    deleteVehicle _unit;
    _helithing = [[1000, 1000, 1000], 180, "B_Heli_Light_01_armed_F", WEST] call bis_fnc_spawnvehicle;
    [_helithing, wp1] spawn BIS_fnc_Unitplay;
}];
#

when i blow it up of course

#

and it does get successfully deleted

worn forge
#

Because BIS_fnc_spawnVehicle returns an array, not an object

#

Returns - Array format [createdVehicle, crew, group]

#

So technically you needed to have as your last line
[(_helithing select 0), wp1] spawn BIS_fnc_Unitplay;

#

I assume you have created a waypoint called wp1

#

Rather, you have some data called wp1 which is related to unitplay

faint fossil
#

oh shoot thank you I see now

#

and yeah wp1 should work, in theory

#

thank you very much

#

omg omg omg it's working

#

but uh, since I put the thing in the init field it doesnt respawn the second time after I kill the heli that got spawned in by the first one

#

is there a way to like, transfer the contents of the init field?

winter rose
faint fossil
#

wait... now I understand what's causing an annoying bug

#

I set up inf. ammo helis that have stuff in their init field

#

and sometimes only I can use the inf ammo feature...

#

that must be why

#

also uh @winter rose how do I give the heli that just got spawned in the same event handler? and how do I add the contents of a separate wp1.sqf file as an array?

winter rose
#

grab the reference of the new helicopter, and add Event Handler to it ๐Ÿ™‚

faint fossil
#

wait yeah but once the new one gets destroyed it doesn't add another event handler anymore

winter rose
#

give me 5s

faint fossil
#

this is what I have so far... it's in the init field sorry

#
this addEventHandler ["Killed", {
    params ["_unit", "_killer", "_instigator", "_useEffects"];
    deleteVehicle _unit;
    _helithing = [[1000, 1000, 1000], 180, "B_Heli_Light_01_armed_F", WEST] call bis_fnc_spawnvehicle;
    private _wpdata = [A BIG BUNCH OF NUMBERS aka THE WHOLE PATH FOR UNITPLAY]
    [(_helithing select 0), _wpdata] spawn BIS_fnc_Unitplay;
}];
winter rose
#

ouch

faint fossil
#

It sucks I know :(

winter rose
#

Don't worry we'll get it fine :)

worn forge
#

It's only wrong if you don't know what you're doing ๐Ÿ˜‰

winter rose
#

It doesn't "suck", you are learning / approaching - and so far you made it progress

#

so it's a proof of concept

faint fossil
#

woo go me \o/

#

except I can't help but notice how little I know regarding this

#

also like - I guess it's fine if it doesn't respawn itself

#

so maybe a radio command just spawns a wave of helis

#

...do you think that would be easier to implement

fallow hawk
#

Can you give me a hand?
My campaign broke

faint fossil
#

define broke

fallow hawk
#

Blackfoot, planting explosives

#

I do the first

#

EZ

#

Do the second?

faint fossil
#

uh I don't really understand what you mean

#

this is a custom mission that you're making?

#

okay what am I doing I should let someone else take care of this lol

fallow hawk
#

This is a normal mission

#

From the campaign

#

This is base game

#

oh

faint fossil
#

oh I mean... why are you planting explosives

#

sounds like that's like an intentional thing

#

where you cant harm friendlies or civies or something

ebon citrus
#

@fallow hawk wrong channel, i assume

fallow hawk
#

yep

ebon citrus
#

This is for creating scripts, not troubleshooting the campaign

fallow hawk
#

yea

#

I got that

faint fossil
#

@winter rose
so maybe a radio command just spawns a wave of helis
...do you think that would be easier to implement
and how would one go about doing that?

tawdry hatch
#

How do I add a virtual garage to my mission?

winter rose
#

@faint fossil ping me tomorrow if you can, I will take a look at that. I have to go for now ๐Ÿ˜‰

rough dagger
#

Hi .. I am trying to get some AI to board my heli in multiplayer ... of course the SP version (below) does not work. Could anyone suggest how I can make this work in MP

#
        _myHeli = (vehicle player);
        _HELI1ATL1 = (getPosATL _myHeli) select 2; // this checks heli altitude 
        _meters = _myHeli distance [15141, 17176]; // this checks how far away the player's heli is from the main pickup point 

        // if player's heli is on the ground and near the pickup zone, units will auto-board 
        if ((_HELI1ATL1) < 1) then {
            if ((_meters) <50) then {
                { _x assignAsCargo _myHeli; [_x] orderGetIn true; } forEach units deployedGroup;
                
                // state transition
                readyToBoardState = false;
                readyToDisembarkState = true;
            };
        };
winter rose
#

run this from the server, and instead of vehicle player use a named vehicle variable @rough dagger

rough dagger
#

hey man .. thank you

#

I was using a named vehicle before, but I wanted to give the players more choice of heli

#

the named asset works great ... should I only use named assets in this situation?

#

if you got to go, no worries ๐Ÿ™‚

winter rose
#

ideally yes, because referring to player can be very random, depending if the script runs on the player-server, dedicated server, client etc

rough dagger
#

thank you Lou

#

would there be a way to determine the vehicle name of a heli when a player enters?

#

that way i could ID the particular heli in play, and script accordingly from there

winter rose
#

you could do vehicle thisSpecificPlayer , but then you have to know which player has a vehicle. I suppose you have other criteria

rough dagger
#

๐Ÿ™‚ that is a good steer Lou, thank you ... I will see where this lead takes me ... nice one

velvet merlin
#

is there a way to execute (via cfgFunctions) a script in the root of the addon folder without specifying the prefix?

#

file = "myFile.sqf";

#

looks for game root/scripts folder

#

is the only way to have a define+include to set it in a separate file?

jade abyss
#

?

jade abyss
#

Like executing a file outside of the addons/Arma folder, wich is not in any .pbo?

velvet merlin
#

nope

#

you have to specify where the sqf to be executed is located, otherwise the game looks at game root or scripts folder as said

#

however if you dont want to hardcode the path, its usually done by definition in separate file via define/macro+include

#

for missions there is a way for dynamic path determination

#

i am asking if there is also such thing for a addon

#

CBA

            class preStart {
                preStart = 1;
                file = PATHTOF(fnc_preStart.sqf);
            };```
jade abyss
#

Erm, yeah for example

#

Is this what you were asking for?

velvet merlin
#

nope

#

as said this is the define/macro+include way

#

i am looking for a native sqf/preproc way

jade abyss
#

What are you trying to achieve? ๐Ÿค”

#

Sry, but i don't get what you rly want.

velvet merlin
#

as linked

#

file = "\PATH\file.sqf";

#

PATH = not hardcoded, but determined dynamically/on runtime

#

most likely its not possible

#

but same was thought with mission root and people found ways

jade abyss
#

But why? The addon is packed anyway, when it calls to compile cfgFunction for example

velvet merlin
#

same reason as CBA/ACE does it - to not hardcode the PATH, but define it separately/not define it

#

in a mission you also just want to execute [] execvM "dummy.sqf" and not specify the path/name of the mission

rough dagger
#

If a path is just string, then surely you could concatenate the different parts of the dynamic path together right? Itโ€™s not quite what you are after but I am wondering if a dynamic path could be built up in this way...

#

Sorry to chime in, but I saw something on JavaScript recently that did something similar...

velvet merlin
#

FILE doesnt work for this. so it would be via some sqf command but seems not doable

winter rose
#

@tough abyss can't read the error on mobile
It seems there is an error either in your usage or the scriptโ€ฆ

#

what does the error say?

#

contact the author then

if you did as he said and it breaks, it's his

#

so it seems

meager ember
#

might as well tell him first

#

@tough abyss giving you a little out-of-band warninig, please remove and refrain from the f-word and similar swearing words here

cosmic lichen
#

I see

#

I tested it with multiple units and it works

#

I used the example provided with the script

#

just created a second unit and executed it

#

no error

#

they both run and do stuff

#

I keep that

#

[unitvar] spawn "play.sqf";

#

Where are you executing that? From within Eden Editor?

#

hmm

#

I only get the error you describe when I execute the script from within Eden

#

In preview it works fine for 3 units

#

You sure the unit variable names are correct? No typo?

#

Weird

cosmic lichen
#

Glad it works now @tough abyss

wet shadow
#

Hello people, does anyone have any insight if it would be possible to use the Eden editor eventhandler 'OnToggleMapTextures' as a normal eventhandler during a mission?

still forum
#

@velvet merlin

without specifying the prefix?
no.
CBA/ACE:
as linked
file = "\PATH\file.sqf";
PATH = not hardcoded, but determined dynamically/on runtime
No, actually its hardcoded, the macro is resolved when the config is binarized.

fleet hazel
#

guys. How do I determine how many items I can put in my backpack?

ebon citrus
#

I hope that makes sense

#

So you need to be a bit more specific on what exactly you want to do

jade abyss
#

There are still some outdated Config Entrys floating around (something like maxMagazinesCargo (or so) for Items and Weapons too), wich are not in use in A3! So the only way is to get the size of your backpack, get the weight (mass) of the magazine (getNumber from Cfg Entry for example) and do some simple math

ebon citrus
#

BackpackSpaceFor maybe?

fleet hazel
#

@ebon citrus loadVest player shows me = 40
getContainerMaxLoad vest player = 140

ebon citrus
#

Vest is a vest

#

Backpack is a backpack

#

Those 2 commands return different valies

#

Read their description

#

Always read the description and notes for scripts you use, dont be like me ๐Ÿ˜‚

fleet hazel
#

Ok ๐Ÿ™‚