#arma3_scripting

1 messages Β· Page 656 of 1

dreamy cave
#

Most of the videos only cover transportation not extraction

slate cypress
# dreamy cave Most of the videos only cover transportation not extraction

I assume you already know transportation. I don't know of more efficient methods, for example with EH, but you could run a while loop with a reasonable sleep time. In each loop, you can check whether all the units within a certain group are inside your helicopter. If they are, activate a waypoint otherwise keep waiting.

winter rose
#

ooor use synchronised waypoints

spark turret
#

Can you tell me in one sentence what synchronized waypoints offer over normal waypoints?

hallow mortar
#

They wait for each other to complete before activating

winter rose
#

two groups, two "MOVE" waypoints - if one group reaches their first waypoint, they will wait for the second group to reach its first waypoint as well before proceeding

#

@spark turret basically, good things, especially when wanting to synchronise getin/load/getout/unload waypoints

spark turret
#

do they require anything special or is it just adding a "(this && Group1WPComplete)" condition into the waypoint?

winter rose
spark turret
#

to eachother? thats surprisingly simple

#

must be a trick from arma πŸ‘€

winter rose
#

I know, we are not used to such simplicity πŸ˜„

spark turret
#

Does it work as well for script created waypoints or is it some script magic that only allows for editor waypoitns bc it runs on missionstart?

winter rose
#

I think you can synchronise script-created waypoints with a waypoint command yes

spark turret
#

Thats very neat. Definetly will try that out for a synchronized ambush or similar

wind hedge
#

Guys, I am trying to do a motion scanner script that will show dots on the GPS when it detects agents (aliens) near the player, is there any way to detect if the GPS interface is visible for the player, this is the fnc so far:

#
vMotionScanner = {
params [
 ["_unit", objNull, [objNull]],
 ["_motionScannerDistance", 100, [100]],       ["_detectEnemyAgents", true, [true]]
    ];
    if (isDedicated OR !hasInterface) exitWith {};
    vMotionScannerRunning = true;
    private _nearObjects = [];
    private _motionMarkersArray = [];
    private _maxMotionMarkers = 10;
    if (_detectAgentEnemies) then {
        while { vMotionScannerRunning } do {
           if ("ItemGPS" in (assignedItems player + items player)) then {
                private _nearObjects = agents select {agent _x distance player < _motionScannerDistance};
                _nearObjects = _nearObjects select {side _x isNotEqualTo side group player};
                if (_nearObjects isNotEqualTo []) then {
                    [player,"minedetected"] call vPlaySound;
                    for "_i" from 1 to _maxMotionMarkers do {
                        {
                            if( !(player isEqualTo _x) && (vehicle _x isEqualTo _x) ) then {
                                if(abs speed _x >= 3) then {                          playerSide reveal _x;                          private _xName = name _x;                      private _marker = createMarkerLocal [_xName, position _x];                      _marker setMarkerShapeLocal "ICON";
                                    _marker setMarkerTypeLocal "DOT";                        _marker setMarkerColorLocal "ColorGUER";                            _marker setMarkerSizeLocal [0.5, 0.5];                           sleep 0.2;                         _marker setMarkerSizeLocal [1, 1];                           sleep 0.2;                           _marker setMarkerSizeLocal [1.4, 1.4];                         sleep 0.2;                            deleteMarkerLocal _marker;                            };                       };                    } forEach _nearObjects;
                    };
                };
            };    
            sleep 0.5;
        };
    };
};
dreamy kestrel
#

just reviewing the A3 updates; surprised we are only now seeing bits like HashMap or even continue and break commands, for that matter.

slender beacon
#

I think continue and break were already in the dev builds before this

dreamy kestrel
#

in the dev bits, yes, just now being pushed for general consumption.

slender beacon
#

I agree with that, then.

#

It was a bit surprising seeing them not for general consumption before.

dreamy kestrel
#

no more !(... isEqualTo ...)

still forum
dreamy kestrel
#

@still forum huh that's interesting. so, if I understand correctly, let's say we have resources attached to a spill bund, for instance. when the bund rotates, moves, etc, the attached objects move with it?

still forum
#

ye

wind hedge
#

visibleGPS is true when the GPS mini screen is showing right?

cosmic lichen
#

That's what the description says right?

wind hedge
#

@cosmic lichen

Checks if the player has GPS receiver opened and visible

#

So by receiver opened and visible it means the GPS mini gui

cosmic lichen
#

Checks if the player has GPS receiver (minimap) opened and visible.
Better?

wind hedge
#

@cosmic lichen yes sir

fresh wyvern
hallow mortar
#

setVehicleInit is disabled in Arma 3, as described on the wiki page

#

use init.sqf (or initServer.sqf) combined with forEach, units west, and select {(typeOf _x) == "B_Pilot_F"}

#

roughly:

_targetUnits = (units west) select {(typeOf _x) == "B_Pilot_F"};
{
// whatever code you want to apply to the units, with _x referring to the unit in question
// don't forget remoteExec if this code may need to be applied to player/non-server units
} forEach _targetUnits;
cosmic lichen
#

units west ❀️

little raptor
#

Wait is it out now?!

cosmic lichen
#

yes

little raptor
#

πŸ₯³

still forum
#

Now we wait for someone to report it being broken

little raptor
still forum
#

it uses engine side (the allUnits command actually just grabbed all sides, and merged them into a single array) side.
probably issue if you spawn a opfor unit, and put it into a blufor group so it becomes technically blufor or such shenanigans

hallow mortar
#

In that case I would expect it to consider the unit to be blufor, as is the case for side command

still forum
#

I didn't try it.
And if it would not work as you want to, it would be terribly annoying to fix

little raptor
still forum
#

phew

little raptor
still forum
#

after setCaptive is civilian or old side?

#

I'm sure there will be people who want either of these, and will consider the other to be a bug πŸ˜„

hallow mortar
#

As far as I'm concerned, matching the result of a side command check is the most consistent functionality and it should stay that way

little raptor
#

I think it always checks the group's side

still forum
#

what does sideEnemy return? it should just return EAST probably?

little raptor
#

no

#

renegades

#

ENEMY

still forum
#

oh a seperate side

little raptor
#

yeah

#

like TKers

still forum
#

They are probably still in their group side tho?

little raptor
#

yeah

#

but their side is ENEMY (their group's side could be something else like west)

still forum
#

uff.

#

Well I'm fine with that

#

Maybe its easy to fix. But I already closed everything so not gonna check

little raptor
#

It's fine

#

you can always loop thru all units

#

btw sideLogic works tho

#

units sideLogic

real tartan
little raptor
real tartan
#

sad

little raptor
#

also I think you meant notIn

real tartan
#

yes

#

also break, continue, fileExist are my favourites now

potent depot
#

I second this^^

#

no more massive if statement skips

winter rose
#

or an exit boolean

dreamy kestrel
#

right I'm not sure yet the efficacy of an breakWith or continueWith, but I'm sure it has its use cases

little raptor
#

such as apply

#

select

#

waitUntil too maybe?

dreamy kestrel
#

hmm okay so if I had a LINQ style, first, min, etc

#

I could breakWith from a select, then

real tartan
#

I would appriciate selectFirst, some equivalent of findIf for select

little raptor
#

I don't think it merits a new command

winter rose
#

but if devs have free time, why not ^^

still forum
#

it doesn't

#

ACE people wanted notIn and findAny (_array findAny [1,2] returns index to first 1 or 2 in _array)

little raptor
still forum
winter rose
#

here: have one free time :p

dreamy kestrel
#

so maybe a dumb question, some help with the usage would be grand. show the syntax how it is used. is breakWith for instance like exitWith?

little raptor
#

so probably less "overhead"

dreamy kestrel
#

ah ok...

_values = [1, 2, 3, 4];
for [{_i = 0}, {_i < count _values}, {_i = _i + 1}] do {
if ((_values select _i) > 2) then {
  breakWith (_values select _i);
};
};
// 3
still forum
#

no

#

yes

#

well. the for loop will return 3

#

I guess

little raptor
still forum
#

but... that for loop is bad, and why would anyone return a value from a counting for loop :U

#

Intention is apply/select/waitUntil n such

#

and it doesn't exit nearest scope like exitWith, it exits nearest loop

little raptor
dreamy kestrel
#

right, but I'm not looking for findIf examples here

little raptor
#

Well at least don't use that hideous for syntax meowsweats

dreamy kestrel
#

also not sure about continueWith per se... this yields 4:

_values = [1, 2, 3, 4];
for [{_i = 0}, {_i < count _values}, {_i = _i + 1}] do {
if ((_values select _i) > 2) then {
//  ^^^^^^^^^^^^^^^^^^^^^^^
  continueWith (_values select _i);
};
};

whereas I think this yields nil:

_values = [1, 2, 3, 4];
for [{_i = 0}, {_i < count _values}, {_i = _i + 1}] do {
if ((_values select _i) < 2) then {
//  ^^^^^^^^^^^^^^^^^^^^^^^
  continueWith (_values select _i);
};
};

maybe there are clearer use cases

dreamy kestrel
#

typo corrected

little raptor
#

your code doesn't need to return something

#

so continueWith makes no sense

dreamy kestrel
#

@little raptor I don't know what it "needs" to return; again these are academic, seeking illustrations of the commands

#

kicking the tires if you will

little raptor
dreamy kestrel
#

focused here on breakWith, continueWith

little raptor
#
select {
//blabla
true //return
}
exotic flax
#

why wouldn't a for loop not be allowed to return something, or better said, break out of it when the loop shouldn't run anymore?

#

and yes; **With will return something which doesn't make sense in a for loop

dreamy kestrel
#

as the documentation states, for instance, continueWith, breakWith, Skips current loop iteration and continues with the next one and returns given value, Skips all loop iterations and returns given value, respectively. so what. so what's a practical usage.

little raptor
#

But select/count/findIf/apply do

#

(the code they run as they loop needs to return bool)

dreamy kestrel
#

well, sidebar, for starters, apply does not return a BOOL, per se. it can, but it is a transform more than anything else.

little raptor
dreamy kestrel
#

right, and the thing returned by code can be literally anything.

little raptor
#

well yeah

#

that just got lumped into the rest ( I meant select/count/findIf codes should return bool)

dreamy kestrel
#

from a pragmatic perspective, would have to experiment to discover cases that really worked for breakWith continueWith I suppose

#

fair enough, yessir, code as predicate, in those cases

real tartan
#

is there a way to force helicopter hover less than 50m above terrain ?

real tartan
winter rose
#

hover, not fly, right?

real tartan
#

yes

winter rose
#

I am already afraid to ask, but… mods?

little raptor
#

give it a move order

real tartan
#

no mods

#

I was thinking to do loop with adding small velocity to push heli down

little raptor
#

I think the AI don't respect flyInHeight unless there's a move order

#

Like doMove

#

or waypoint

real tartan
#

is there a getPos that return pos with Z set as 0 ?

little raptor
#

no

#

just use set

dreamy kestrel
#

(getpos _x select [0, 2]) + [0] ?

little raptor
#

but anyway I think this does:

real tartan
#
    private _pos = getPos _vehicle;
    _pos set [2, 0];
    _vehicle doMove _pos;
little raptor
#
_unit getPos [0,0]
little raptor
#

@still forum it works

#

and is fast

still forum
#

not if the object is floating

little raptor
still forum
#

getPos [0,0] returns above ground level height

little raptor
#

it's not getPos

still forum
#

if object is floating, its non-zero

little raptor
#

it's an alternative broken syntax

still forum
dreamy kestrel
#

ground level? I don't think so, according to the docs, origin getPos [distance, heading]

little raptor
#

unless sea

still forum
#

not if floating/flying

dreamy kestrel
#

ah ok I see

little raptor
#

Try it if you don't believe me

still forum
#

Either you are wrong, or wiki is wrong

#

or wiki is imprecise

little raptor
#

I'm never wrong

hollow thistle
#
getPos heli; // [10176.9,7043.75,105.743]
heli getPos [0,0]; // [10176.9,7043.75,0]
#

@still forum you lost this time ;3

still forum
#

"land surface in format AGL" either means. G == ground == land surface. So just z in PositionAGL.
Or that Z is always landSurface, in which case its nonsense to write that on wiki if the real answer is "where z is always 0"

little raptor
still forum
#

Then wiki needs correction

winter rose
#

no u :U

hollow thistle
#

so after all it's @winter rose fault.

#

It's always him.

winter rose
#

again

hollow thistle
#

When heli is over water

heli getPos [0,0]; // [9990.4,7317.8,-9.48985]
still forum
#

yeah wiki is wrong then.
in format PositionAGL AGL is above ground level for z.
But this thing returns THE ground level, not position above ground level

real tartan
#

so I tried

    private _vehicle = cursorObject; // B_Heli_Transport_03_F
    private _pos = getPos _vehicle;
    _pos set [2, 0];
    _vehicle flyInHeight 10;
    _vehicle doMove _pos;

heli don't go bellow 50

#

maybe set behaviour to safe ?

still forum
#

heli getPos [0,0] == (ASLToAGL getPosASL heli)
?

little raptor
#

@winter rose Z appears to be terrain height (in AGL format)

still forum
#

Yeah then PositionAGL format is wrong

little raptor
#

that won't return 0 for Z

still forum
#

We have invented a new position format πŸ˜„

#

Or rather some programmer on 1.55 did

#

here's code
res[2] = Landscape->SurfaceY(res[0], res[1]) - Landscape->SurfaceYAboveWater(res[0], res[1]); //AGL

#

Even says AGL as comment, but thats not AGL

#

getRelPos does the same

hollow thistle
#

It's the ground level pos in ASL?

still forum
#

yeah

#

terrain surface, relative to sealevel if underwater. otherwise 0 except rounding errors

hollow thistle
#

but below 10m it's working fine

#

πŸ™ƒ

still forum
#

Its PositionAGL. But not height between ground and object (as any other command) but height between ground and other ground

#

flyInHeight has a limiter of some heights it doesn't let you do afaik. But for some reason when you go too low it lets it through again. There was a ticket about that last year, afaik KK looked at it and said no

hollow thistle
#

yeah, as I said everything below 50m but more than 10m seems to default to 50m

#

but below 10 is fine.

real tartan
still forum
hollow thistle
#

How you wanted to "fix" this? block below 50m or allow any value?

#

flyInHeight 0 is useful in waypointStatement on landed WP to ensure they don't fly away again.

still forum
#

I don't think I looked at it. I think KK did.
If it was me then I forgot

still forum
#

thats what I did :U

little raptor
tough abyss
#

@little raptor Hey. You told me yesterday that it would be much easier to create an own weaponrandomiser script, did you by that mean one that would run in a mission or one .pbo wise (in my faction mod) cheers.

little raptor
#

in your mod

tough abyss
#

So an sqf script that can be called in editor, placed in one units init box can also be called/used via CfgVehicles init eventhandler CBA of an units config?

little raptor
#

depends how the script is written

hollow thistle
tough abyss
little raptor
#

@hollow thistle That's even more wrong meowsweats

hollow thistle
#

how it is wrong? I just tested it.

little raptor
#

It's not getTerrainHeightASL

hollow thistle
#

but over water thomp

little raptor
hollow thistle
#

ffs

#

It's getTerrainHeightASL min 0

little raptor
#

The previous description was correct
Just not well understood

hollow thistle
#

yeah... kinda.

gilded rampart
hollow thistle
tough abyss
#

How is it possible to add a line of string ("Rifles") in the eventhandler of an units init config? ```sqfParameters:
Object - Unit
Category - String

Returns:
Nil

Examples:
(begin example)
[_this, "Rifles"] call cfp_fnc_randomizeWeapon;
(end)

#

How are they thinking? It's an template I'm gonna use..

little raptor
#

what?

tough abyss
#

because they randomizing gear script that is working looks like this; ```sqf
Parameters:
Object - Unit

Returns:
Nil

Examples:
(begin example)
[_this] call cfp_fnc_randomizeUnit;
(end)

#

Well, I can't put this in an units eventhandler init ```sqf
[_this, "Rifles"] call cfp_fnc_randomizeWeapon;

#

Or can I?

fresh wyvern
# hallow mortar roughly: ```sqf _targetUnits = (units west) select {(typeOf _x) == "B_Pilot_F"};...

Thanks for pointing me in the right direction.
Still something is off.

addMissionEventHandler ["PlayerConnected", {
    params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];
        remoteExec [
            _targetUnits = (units west) select {(typeOf _x) == "B_Pilot_F"}; 
            {
                this addAction ["Open Garage",{ 
                    _pos = player getPos [25,getDir player]; 
                    BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];  
                    [ "Open", true ] call BIS_fnc_garage;  
                    } forEach _targetUnits;
                ]
            }
        ]
    }
];

What am I lacking to make every AI helicopter pilot a garage spawning entity? (Which is accessible by an other player unit.)

little raptor
tough abyss
little raptor
#

Also this variant of getPos returns bad Z

#

see our discussion above

#

When you create a vehicle it should be placed on AGL position

fresh wyvern
little raptor
tough abyss
# little raptor with the " "

This small " might solve an issue I have had for days. I'm gonna dig in. Thank you so much. You're knowledge of all this is outstanding!

little raptor
#

@tough abyss also change the function's name

#

if you're making your own function

tough abyss
#

I'm gonna try if it works at first.

#

because it looks weird. Here it is from my perspective; ```sqf
init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;sleep 0.2; _backpack = gettext(configfile >> 'cfgvehicles' >> (typeof _this) >> 'backpack'); waituntil {sleep 0.2; backpack _this == _backpack};if !(_this getVariable ['ALiVE_OverrideLoadout',false]) then {_loadout = getArray(configFile >> 'CfgVehicles' >> (typeOf _this) >> 'ALiVE_orbatCreator_loadout'); _this setunitloadout _loadout;[_this] call CFP_main_fnc_randomizeUnit; "[_this, 'Rifles'] call CFP_main_fnc_randomizeWeapon;" [_this, 'USP_PATCH_IRN_ARMY_GROUND_FORCES'] call BIS_fnc_setUnitInsignia;reload _this};};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
};

little raptor
hallow mortar
little raptor
#

can't you see it looks weird?

#

it stands out from the rest

#

it should've been GREEN like the rest

tough abyss
#

It's the extra " "

little raptor
#

Simply put, remove " "
because it's already in a string

tough abyss
#

Yeah I hade that suspicion hence why I asked before without the ".

#

Cheers.

hallow mortar
#

Just as an FYI, Discord syntax colouring doesn't show up on mobile. So don't always rely on it to get the message across.

little raptor
cosmic lichen
#

@gilded rampart Be aware that it's v2.03 not 2.02

gilded rampart
cosmic lichen
#

πŸ˜„

tough abyss
#

Yes. Cheers. But that makes me on step one again since I already have tested it and it reffered too an error in; ```sqf
if (count _array == 0) exitWith {};

cosmic lichen
#

(_array isEqualTo []) is faster

little raptor
#

not really

#

both are nearly the same

cosmic lichen
#

Yet, it's faster πŸ˜›

hallow mortar
#

The speed isn't the problem here

#

What was the exact error message?

little raptor
tough abyss
#

Are you talking to me? @hallow mortar

hallow mortar
#

Yes

little raptor
#

(afaik it already uses count as a quick check)

tough abyss
#

Hold on. Launching Arma.

still forum
little raptor
cosmic lichen
#

internally is not in sqf

still forum
#

engine internal is very different than SQF

hallow mortar
#

You can retrieve errors from your rpt log without launching the game (though having the game open is useful for troubleshooting)

cosmic lichen
#

Why no one believes me 😦

still forum
#

Which is exactly why functionality makes less difference than number of commands.

#

A select loop is also creating a new array and pushBack'ing elements into it.
Now compare a select with a forEach that pushBacks into a new array and see the difference.
Same functionality but big difference

winter rose
cosmic lichen
#

rasis........ πŸ˜›

sage dawn
#

anyone know how setObjectScale is supposed to work in eden? the wiki says something about it being possible in eden editor but I'm not sure how I'm supposed to do it there

still forum
cosmic lichen
#
((get3denSelected "Object") # 0) setObjectScale 0.1;```
#

Select a tank, and execute that in the debug console

sage dawn
#

oh yeah

#

I was trying it using a object variable name

cosmic lichen
#

variable names are not available in Eden Editor

#

object variable....*

still forum
#

player
0.0014ms

player;player
0.0021ms

just the difference between number of commands and general SQF overhead

tough abyss
cosmic lichen
#

_array is unkown

little raptor
#

@still forum @cosmic lichen

#

@still forum your Arma is broken πŸ˜›

still forum
#

you have faster PC than I do.
But you can still see it. Its not measurement error

cosmic lichen
#

What are you proving here @little raptor I stated it's faster and it is. I didn't say its 5 times faster πŸ˜„

shut kraken
still forum
#

its supported

cosmic lichen
#

Also, personally, I think it's nicer to write and read

tough abyss
#

_array has to be defined within the same .sqf?

slim oyster
#

Much nicer

cosmic lichen
#

yes

little raptor
shut kraken
cosmic lichen
#

So dedmen, why are you programming on a potato?

little raptor
still forum
#

wuht no

#

only 40% KEKW

still forum
cosmic lichen
#

Hmm so it's the same potato I have. Bought 2013 for Arma 3 πŸ˜„

#

Man, 8 years already meowsweats

winter rose
#

…10+ (but GPU)

cosmic lichen
#

Alright, I have to admit. I replace the GPU as well

winter rose
#

GTX 275 started to be a bit slow yeah πŸ˜„

still forum
#

Same. But I still have my GTX 275 laying around here

little raptor
#

I only have a potato 6yo laptop 😬

#

@still forum What is your CPU? There's no way in hell my laptop is faster than your PC
I watched your streams and it runs much better than mine notlikemeow

#

Maybe you have an AV or something running

#

where is this discussion going ? 🀣

still forum
#

FX-8350

hollow thistle
still forum
#

maybe also bad ram

little raptor
hollow thistle
#
_array = []; 
_array isEqualTo []

0.0005

_array = [];
count _array == 0

0.0005

#

you see, it's harder to measure these with fast cpu 😬

fresh wyvern
# hallow mortar Use _x not `this` when inside a forEach, like I said in the original example

I get an error that says _targetUnits is not properly defined. What can I do to fix that?

_targetUnits = (units west) select {(typeOf _x) == "B_Pilot_F"}; 

addMissionEventHandler ["PlayerConnected", {
    params ["_id", "_uid", "_name", "_jip", "_owner", "_idstr"];
        {
            remoteExec [
                _x addAction ["Open Garage",{ 
                    _pos = player getPos [25,getDir player]; 
                    BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];  
                    [ "Open", true ] call BIS_fnc_garage;
                    }
                ]
            ]
        } forEach _targetUnits;
    }
];
hallow mortar
#

you're about two layers too deep

little raptor
#

EH code executes "somewhere else"

hallow mortar
#

don't do that event handler, put it in initPlayerLocal.sqf and don't remoteExec it if you want it to run every time someone joins and add the action for that player

little raptor
#

Even if you made that variable global it would be invalidated by the time the EH code executes

#

so you should probably put it in the EH

hallow mortar
#

That's technically accurate but still don't use the EH at all in this case

#

In all those layers of redundancy you would end up adding the action, for everyone, about a million times

gray hull
#

lil side thing, but does the follow bone rotation bit apply to the new diorama base models?

fresh wyvern
hallow mortar
#

yes, well, it didn't work. Hold on, I'm rewriting this

#

also your remoteExec was wrong but you don't need that either

little raptor
#

it only executes when the player joins the server, and it only executes locally (which is what you should use for addAction)

fresh wyvern
hallow mortar
#

no

#

init.sqf is more complicated and less safe

fresh wyvern
#

ok

hallow mortar
#
{
    _x addAction ["Open Garage",{ 
        _pos = player getPos [25,getDir player]; 
        BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];  
        [ "Open", true ] call BIS_fnc_garage;
    }]
} forEach _targetUnits;

this is all you need, put it in initPlayerLocal.sqf

fresh wyvern
#
_targetUnits = (units west) select {(typeOf _x) == "B_Pilot_F"}; 
hallow mortar
#

oh I missed that

#

just put it in the line before the other part

fresh wyvern
#

nice

#

Thanks a lot πŸ™‚

slim oyster
#

Hey its a good thing a dev is coding on a potato

#

They will notice the performances more

hallow mortar
#

Any variable name that starts with a _ is a local variable, which means it only exists in the current scope (script or "level" of code)

still forum
slim oyster
#

Its an incentive to get it right the first time meowtrash

gray hull
#

Anyone happen to have the mempoint for the new diorama model for it's rotation on hand?

tough abyss
hallow mortar
#

how are you calling the script? (exact code)

tough abyss
#
[_this, 'Rifles'] call CFP_main_fnc_randomizeWeapon;
hallow mortar
#

where?

tough abyss
#

In an units init eventhandler (CfgVehicles.hpp)

little raptor
tough abyss
#
init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;sleep 0.2; _backpack = gettext(configfile >> 'cfgvehicles' >> (typeof _this) >> 'backpack'); waituntil {sleep 0.2; backpack _this == _backpack};if !(_this getVariable ['ALiVE_OverrideLoadout',false]) then {_loadout = getArray(configFile >> 'CfgVehicles' >> (typeOf _this) >> 'ALiVE_orbatCreator_loadout'); _this setunitloadout _loadout;[_this] call CFP_main_fnc_randomizeUnit; [_this, 'Rifles'] call CFP_main_fnc_randomizeWeapon; [_this, 'USP_PATCH_IRN_ARMY_GROUND_FORCES'] call BIS_fnc_setUnitInsignia;reload _this};};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
hallow mortar
#

Does the unit actually have a config entry called RiflesList in its config?

tough abyss
#

No...

hallow mortar
#

well then

tough abyss
#
randomGearProbability = 80;
        
        headgearList[] = {"SP_M1Helmet_Iran",0.25,"SP_M1Helmet_Tan",0.45,"SP_M1Helmet_GrayDim",0.20,"SP_M1Helmet_Green",0.15,"iri_headgear_desert_camo_helmet", 0.30};
        vestList[] = {"V_TacVest_khk",0.3,"CFP_Tactical1_ACRDesert",0.2,"CFP_Tactical1_3ColorDesert",0.15,"SP_Tactical1_Tan",0.15};
        facewearList[] = {"CUP_Beard_Black",0.25,"CUP_FR_NeckScarf2",0.35,"CUP_FR_NeckScarf5",0.35,"CUP_G_White_Scarf_Shades",0.2,"CFP_Scarfbeardshades_tan",0.2,"CFP_Scarfbeardshades_green",0.2,"USP_ADVANCER_GU_SF2",0.15,"TRYK_SBeard_TK6",0.25,"TRYK_SBeard_BW6",0.3,"TRYK_SBeard_BW",0.25,"TRYK_SBeard_BW",0.3,"CFP_Scarfeard_white",0.25,"CFP_Scarfeard_white",0.25,"CFP_Neck_Plain2",0.25,"CFP_Neck_Plain3",0.25,"CFP_Neck_Plain4",0.25,"CFP_Neck_Plain1",0.25,"CUP_G_Scarf_Face_Tan",0.2,"CUP_G_Scarf_Face_Red",0.2,"CUP_G_Scarf_Face_White",0.2,"CUP_G_TK_RoundGlasses_gold",0.15,"CUP_G_TK_RoundGlasses_blk",0.15,"CUP_G_TK_RoundGlasses",0.05,"SP_Kneepads_Tan2",0.25};
        uniformList[] =           {"iri_u_desert_camo_1_uniform",0.6,"iri_u_desert_camo_2_uniform",0.4};
        
        randomWeaponProbability = 80;

        rifleList[] = 
        {"CUP_arifle_M16A1",0.35,"CUP_arifle_G3A3_ris",0.4,"CUP_arifle_FNFAL5060",0.35};
#

the randomgear work.

#

but not the weapons.

little raptor
#

@tough abyss I told you before

#

it's not riflesList

#

it's rifleList

tough abyss
#

It is rifleList...

#
rifleList[] =
little raptor
#

[_this, 'Rifles'] call CFP_main_fnc_randomizeWeapon;

tough abyss
#

so that has to be Rifle, I see.

hallow mortar
#

private _category = format["%1List",_cat];
this line (42) uses the category you specify to generate a config reference. exactly as you specify it.

tough abyss
#

I have tried getting a randomisation of weapon work for days man.

#

Cheers gonna try.

fresh wyvern
hallow mortar
fresh wyvern
little raptor
#

configs are not case-sensitive

still forum
#

we don't know whats in there

little raptor
#

no, cuz I read the function before

hallow mortar
#

it can't hurt to get the case right just in...case :U

hallow mortar
little raptor
fresh wyvern
little raptor
#

maybe you launched the game before the update 🀷

fresh wyvern
tough abyss
#

So now the primary weapon choice spawns but whenever it wants to select a random weapon the units spawn without the weapon.

little raptor
#

I told you this too

tough abyss
#

Only the one defined here spawns; ```sqf
weapons[] = {"CUP_arifle_G3A3_modern_ris_black"};
respawnWeapons[] = {"CUP_arifle_G3A3_modern_ris_black"};

#

I must have misunderstand, sorry.

#

remove the old weapon from the riflelist[] or from the code above?

little raptor
#

neither

#

from the unit

tough abyss
#

I'm not hanging on.

tough abyss
#

This should be applied in CfgVehicles or the script.sqf?

little raptor
#

It's a scripting command

tough abyss
#

isn't it applied here in a faulty way? ```sqf
// Check to see if we randomize Weapon
private _weaponProbability = getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "randomWeaponProbability");

if (random 100 < _weaponProbability) then {
    removeAllWeapons _unit;
    {
        private _cat = format ["%1List",_x];
        if (count  (getArray(configFile >> "CfgVehicles" >> typeOf _unit >> _cat))>0) then {
            [_unit, _x] call FUNC(randomizeWeapon);
        };
    } foreach WEAPON_CATEGORIES;
};

};

#

The removeAllWeapons thing I think we talked about.

fresh wyvern
hallow mortar
#

why don't you ask the person who actually designed the scripts?

tough abyss
#

I don't know how.

#

Honestly I just want to create my own randomizing weapon script and I am trying.

#

Sorry If I sound annoying.

fresh wyvern
# hallow mortar yes. update time!

Updated the game. This still doesn't trigger. On the bright side, I do not get the "units" error anymore.

_targetUnits = (units west) select {(typeOf _x) == "B_Pilot_F"}; 

{
    _x addAction ["Open Garage",{ 
        _pos = player getPos [25,getDir player]; 
        BIS_fnc_garage_center = createVehicle [ "Land_HelipadEmpty_F", _pos, [], 0, "CAN_COLLIDE" ];  
        [ "Open", true ] call BIS_fnc_garage;
    }]
} forEach _targetUnits;
little raptor
#

then reads the config and replaces them

tough abyss
#

So why isn't it doing that?

little raptor
#

Probably because you didn't define all of them in the config

#

I only see rifleList

tough abyss
#

Removing the weapons and replacing them as defined in the config; ```sqf

    randomWeaponProbability = 80;

    rifleList[] = 
    {"CUP_arifle_M16A1",0.35,"CUP_arifle_G3A3_ris",0.4,"CUP_arifle_FNFAL5060",0.35};
hallow mortar
little raptor
#

@tough abyss also it is case sensitive like @hallow mortar and Dedmen said meowsweats

#

my bad

#

it should be rifle

#

not Rifle

tough abyss
#

Thank you all. Hope it works this time.

still forum
tough abyss
#

I am cursed! The units still spawn with either the G3A3 or empty handed. I'm going nuts. I'm gonna try doing some stuff. Also noticed when spawning an AT-men who shares the same init makes him spawn with the RPG and all WHEN the G3A3 spawns but when it spawns emptyhanded the RPG is also removed. So I guess the whole inventory is removed.

little raptor
#

@tough abyss are you doing this now?

[_this, 'rifle'] call CFP_main_fnc_randomizeWeapon;

Also did you change the code?

little raptor
#

Or is it still the same?

#

I am referring to CFP functions

tough abyss
#

Ehm. Could you expand your question? Which functions?

#

Sorry dude.

little raptor
tough abyss
#

It says this; ```sqf
Function: CFP_fnc_randomizeWeapon)

#

Let me explain.

#

The working randomising gear script works and it says this;

#
Function: CFP_fnc_randomizeUnit)
#

but it is called, like this; (and yes I did not change any script functions)

#
[_this] call CFP_main_fnc_randomizeUnit;
wind hedge
#

"unit addBinocularItem item" Adds weapon item, including magazine, directly to the binocular weapon. This is used for infantry weapons.: Does that means we can add regular weapons to the binocular slot?

little raptor
#

all weapons have their own slots

wind hedge
#

So by "weapon item" it means "binoculars"

little raptor
#

yeah

wind hedge
#

Cool

little raptor
#

@wind hedge The wiki is referring to stuff like batteries I think

#

for binocs

hallow mortar
#

I think the phrasing is probably just a careless copy from the addWeaponItem page

wind hedge
little raptor
#

Before people would have to use loops

wind hedge
#

Well yeah... even thou I hate attachTo in Multiplayer... but it works great for SP

little raptor
wind hedge
little raptor
#

Yeah

#

because it's controlled by the engine

#

it's not just hard

#

it's impossible

#

unless you're a dev

wind hedge
#

Yeah well I meant the devs

#

πŸ™‚

still forum
wind hedge
#

Since Arma seeks realism

#

I can carry a rifle and a heavy launcher but not a rifle and a rifle... makes no sence

#

😦

little raptor
#

The devs that implemented the weapons system decided that
so now it is controlled by the weapon slot parameter in the config

wind hedge
little raptor
#

yeah

#

Also could've been an engine limitation

wind hedge
#

But in all honesty, there is no reason not to improve upon some of the previous decisions, unless it is too hard to fix thou

still forum
#

Why improve

#

just take a launcher and put it into the launcher slot

little raptor
still forum
#

you can also make a rifle that goes into the launcher slot (with all its limitations) nothing stopping you from doing that

still forum
#

Why would anyone carry two rifles

wind hedge
still forum
#

Arma still has some realism targets

wind hedge
exotic flax
#

πŸ€” breaching shotgun

still forum
#

SMG as secondary weapon

#

Breaching shotgun as secondary weapon

#

already exists in mods

wind hedge
#

I hate mods...

#

πŸ™‚

still forum
#

But no need for that in vanilla

exotic flax
#

Second rifle also exist as mod πŸ€·β€β™‚οΈ

wind hedge
#

mod get outdated and stop working on new servers

still forum
#

rarely

#

VERY rarely

exotic flax
#

Even TFAR stable still works, and hasn't been updated for years...

still forum
#

We can spend the time making a feature that makes no sense for the base game, and that people who want to have it can already have via mods.
Or we can spend the time implementing new things that is useful for us and others and that mods couldn't do yet.

exotic flax
#

Bad mods/scripts are also bad when they're new

still forum
#

Pretty simple decision on that.

tough abyss
#

Are there any templates for weapon randomisation scripts? All I find on the googly woogly are scripts for missions and way more advanced than I need.

wispy cave
#

What do you need?

tough abyss
#

Just a simple scipt that randomises and choses a weapon from a list. And call this script via unit init eventhandler, not in mission. πŸ™‚

#

I'm a newbie in this guys, be nice 😦

exotic flax
#

Just get an array with items, get a random one from it and replace the current weapon

#

When, where and how you call it doesn't matter. Could even be called when placing an unit in 3den when you want

wind hedge
#

For me sometimes it is better if the devs make the coolest mods official and optimised so anyone can enjoy them...

still forum
#

Well obviously mods don't try to add features that aren't possible for mods to add

tough abyss
still forum
#

yes

tough abyss
#

wow cool. What was your jurisdiction/responsibility?

still forum
#

Was? juristriction?

tough abyss
#

Like what part of the game was more "your" part.

still forum
#

about 85% of the "Engine" changelogs since 1.98 update

tough abyss
#

Cool! Thank you for your work.

#

You wasn't one of those devs that got arrested taking those pics?

still forum
#

no no

little raptor
#

Dedmen was hired recently

still forum
#

"so what else remains?"
object scaling, hashmaps, workshop compositions, 64bit linux server, linux server at all, engine features to allow community to make their own firing drills, better performance, inter-mod magazine compatability, new detailed missile simulation, tank vehicle interiors, advanced damage model for tanks, general new customization abilities via new script commands or config entries to open more things to modding, The 3DEN editor, Zeus, new aircraft HUD system, ...

Mods don't do that stuff, because they LITERALLY can't, and you also won't see mods attempting it because they will always fail and thus you never hear about them as they also never get released.

You really want us to spend the time copying things that are already there, instead of doing all of the above?
Go back to Arma 3 version 1.0 and have fun then. Without mods of course, because many mods won't work and wouldn't exist today without the new features we added.

tough abyss
#

prob one of the features I have seen a lot of people want is the CPU compatibility and 1-core issues.

#

However, y'all work is really appreciated bringing this wonderful game in it's state.

#

including the people in this helpful community.

little raptor
still forum
#

It is done properly

#

Everything that was doable, was done properly

little raptor
#

It's single threaded afaik

still forum
#

What parts of AI are expensive enough to make it worth

little raptor
#

path gen

still forum
#

pathfinding? multithreaded.

#

Finding which enemies they could possibly engage? multithreaded.

#

Deciding if they should start their vehicle engine, before driving off to next waypoint? singlethreaded. Because pushing that to seperate thread would take more time than just doing it now.

little raptor
#

My two major concerns were path gen and visibility checks (which can be very expensive)
If you say they're multi threaded, then I don't think there's much more that can be done

still forum
#

AI deciding things between them? singlethreaded.
Because you can either just go over them all and let each of them talk.
Or you can have them shout over each other not able to understand anything and constantly having to repeat eachother until finally everyone understood what the others tried to say.

#

pathgen is multitheaded and async (runs over multiple frames).
Visibility checks, not sure which there are.

#

Most of the things that make sense or are possible to multithread already are.
There are still a few on my list that I'll try out someday, but they all are rather minor

little raptor
#

@still forum I guess a multithreaded scheduler can't be done right?

still forum
#

scripts no

little raptor
still forum
#

Technically possible. But you need to remove one big script performance improvement to make it possible in general.
And then you add checks so that no two scripts can be modifying the same object/property/state/environment/whatever and these checks will be so expensive that all scripts will be ALOT slower.

#

Making everything slower so that you can say "but its multithreaded now" is a bit nonsense

tough abyss
#

I have also heared there were folks from the Alive mod who were hired after their mod got so much fame.

#

Is this true? or just a reddit hoax.

little raptor
#

Don't know. But I know others that were hired because their work was good (like Kydoimos and I guess Dedmen too?)
But anyway, not #arma3_scripting

still forum
tough abyss
#

Cheers guys. And yes wrong channel, sorry.

#

So I'm just gonna try use the script that already succesfully works randomising gear/facewear/helmet/vest/uniform. This script also offers weapon randomisation but this, cursed part does not work and either units spawn with their official main G3A3 or empty handed with an empty inventory. Here it is; https://sqfbin.com/ucajewanomujidoquvef. @somber skiff I saw you contributing this script in github so you might have an idea? Cheers!

little raptor
# tough abyss So I'm just gonna try use the script that already succesfully works randomising ...

try this:

init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;sleep 0.2; _backpack = gettext(configfile >> 'cfgvehicles' >> (typeof _this) >> 'backpack'); waituntil {sleep 0.2; backpack _this == _backpack};if !(_this getVariable ['ALiVE_OverrideLoadout',false]) then {_loadout = getArray(configFile >> 'CfgVehicles' >> (typeOf _this) >> 'ALiVE_orbatCreator_loadout'); _this setunitloadout _loadout; _this removeWeaponGlobal primaryWeapon _this; [_this, 'rifle'] call CFP_main_fnc_randomizeWeapon; [_this, 'USP_PATCH_IRN_ARMY_GROUND_FORCES'] call BIS_fnc_setUnitInsignia;reload _this};};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
cerulean cloak
#
north_targets = [targ_n_1, targ_n_2, targ_n_3, targ_n_4, targ_n_5, targ_n_6, targ_n_7, targ_n_8, targ_n_9, targ_n_10, targ_n_11];

while {true} do
    {
        (gunner light_north) dowatch (selectrandom north_targets);
        
        sleep (random [5, 10, 15]);
    };

I've got a searchlight light_north I'd like to pan around between some targets targ_n_1 etc.
The code above runs without errors but the light doesn't move.
Interestingly, when I define the array north_targets from the debug console and then run (gunner light_north) dowatch (selectrandom north_targets); from the debug console it works just fine.

quartz pebble
#

if I use compile/compileFinal preprocessFileLineNumbers, should I now rewrite to compileScript ?

little raptor
#

I think a simple "FakeWeapon" will do the trick

#

People have asked about it before

#

You can search in this channel to find it

#

I think NikkoJT asked it iirc

cerulean cloak
#

Never mind, turns out I was just being impatient and it starts working after like 30s or so.

little raptor
#

ok

cerulean cloak
#

It's weird, but it works.

tough abyss
#

Could you rewrite that init please using this function, since it already is being used and works for the gear part (https://sqfbin.com/cexojohemejonodamagi) ```sqf
[_this] call CFP_main_fnc_randomizeUnit;

little raptor
#

I removed that function

#

because it was removing all weapons for you

tough abyss
#

I see.

little raptor
#

If you want that function just make your own function

#

Copy paste the code

#

just remove the weapon part

#

replace it with what I wrote

tough abyss
#

Yes. I just did copy the init but now every unit spawns empty handed.

#

I just replaced the init part of my unit with yours in my CfgVehicles. That's what you meant right?

tough abyss
#

But, I don't get it since that line of code is from the eventhandler init of my unit.

little raptor
#

paste the codes again

#

both of them

#

cfp_fnc_blablas

tough abyss
#

sqf?

little raptor
#

I mean paste them here

#

I want to take a look

#

use sqfbin

tough abyss
#

Okay. Pasting the script. Sorry for taking your time.

little raptor
still forum
#

I wanted to reply you but then didn't

#

I feel like many people think compileScript will magically cause optimizations.
While it will only, if you also use bytecode

#

atleast only that is currently planned. While I can do more in theory

little raptor
#

@quartz pebble ☝️

quartz pebble
still forum
#

Open source ArmaScriptCompiler on github.
You need to compile your sqf files to sqfc files, and pack both together in your mission/mod pbo

little raptor
#

@tough abyss ok I realized what the problem was

tough abyss
little raptor
#

your random weapons must be in [weapon, mag] pairs

#

like so

rifleList[] = {
            {"CUP_arifle_M16A1", "some_mag"}, 0.35          
         };
tough abyss
little raptor
#

I'm talking about the config

tough abyss
#

Yes I know.

#

But, should I use the gear randomising script with the weaponrandomiser or the weaponrandomiser only script.

#

πŸ™‚

little raptor
#
init = "if (local (_this select 0)) then {_onSpawn = {_this = _this select 0;sleep 0.2; _backpack = gettext(configfile >> 'cfgvehicles' >> (typeof _this) >> 'backpack'); waituntil {sleep 0.2; backpack _this == _backpack};if !(_this getVariable ['ALiVE_OverrideLoadout',false]) then {_loadout = getArray(configFile >> 'CfgVehicles' >> (typeOf _this) >> 'ALiVE_orbatCreator_loadout'); _this setunitloadout _loadout; _this removeWeaponGlobal primaryWeapon _this; [_this] call CFP_fnc_randomizeUnit; [_this, 'USP_PATCH_IRN_ARMY_GROUND_FORCES'] call BIS_fnc_setUnitInsignia;reload _this};};_this spawn _onSpawn;(_this select 0) addMPEventHandler ['MPRespawn', _onSpawn];};";
#

also correct your rifleList

#

The function still removes all weapons

#

If you want some of them back, you'll have to add them

#

for grenades, it's in {"grenade", count} pairs

#

for weapons (rifle, handgun, launcher) it's in {"weapon", "mag"} pairs

#

for explosives, it's just the list of explosives to add {"explosive1", "explosive2", etc.}

tough abyss
#

Thank you. ```sqf
randomWeaponProbability = 100;

    rifleList[] = {
        {"arifle_Katiba_GL_ARCO_pointer_F", "30Rnd_65x39_caseless_green"}, 0.35,
        "arifle_Mk20_GL_F", "30Rnd_556x45_Stanag"} 0.40,
        "arifle_MXC_F", "30Rnd_65x39_caseless_mag"} 0,35
                
     };
little raptor
#

no

#

missing {

#

for the other two

cerulean cloak
#

So, about those searchlights. This works just fine

north_targets = [targ_n_1, targ_n_2, targ_n_3, targ_n_4, targ_n_5, targ_n_6, targ_n_7, targ_n_8, targ_n_9, targ_n_10, targ_n_11];

sleep 5;

while {true} do
    {
        (gunner light_north) dowatch (selectrandom north_targets);
        
        sleep (random [5, 10, 15]);
    };

But this doesn't.

south_targets = [targ_s_1, targ_s_2, targ_s_3, targ_s_4, targ_s_5, targ_s_6, targ_s_7, targ_s_8, targ_s_9, targ_s_10];

sleep 5;

while {true} do
    {
        (gunner light_south) dowatch (selectrandom south_targets);
        
        sleep (random [5, 10, 15]);
    };

The only change I made was swapping targ_n_ to targ_s_ and light_north to light_south. I'm really confused as to why one works just fine when the other doesn't work at all.

cerulean cloak
#

Both are run from the debug menu with execVM.

little raptor
#

like this:

...
while {true} do {...};
...
while {true} do {...};

?

cerulean cloak
#

Yes, both while {} do {} loops are correct

little raptor
#

So you can see why

#

the first loop never ends

#

the second one never executes

cerulean cloak
#

No, they're run from separate scripts.

little raptor
#

then why do you say yes meowsweats

cerulean cloak
#

Because I thought you meant is each loop done correctly not are the done correctly and in the same place

little raptor
little raptor
cerulean cloak
#

execVM from the debug menu for both.

tough abyss
#
        rifleList[] = {
 {"arifle_Katiba_GL_ARCO_pointer_F", "30Rnd_65x39_caseless_green"}, 0.35,{"arifle_Mk20_GL_F", "30Rnd_556x45_Stanag"}, 0.40,
{"arifle_MXC_F", "30Rnd_65x39_caseless_mag"}, 0.35
                    
         };
little raptor
#

it should work

little raptor
#

in the names

#

verify what the code is executing using systemChat

#

for example:

south_targets = [targ_s_1, targ_s_2, targ_s_3, targ_s_4, targ_s_5, targ_s_6, targ_s_7, targ_s_8, targ_s_9, targ_s_10];
systemChat str south_targets ;
sleep 5;

while {true} do
    {
      _target = selectrandom south_targets;
        systemChat str [light_south, _target ];
        (gunner light_south) dowatch (_target );
        
        sleep (random [5, 10, 15]);
    };
cerulean cloak
#

I've put a chat in for start and for each run of the loop. Will see what happens

tough abyss
#

@little raptor guess what

cerulean cloak
#

I'm getting the system chat's but still no movement.

#

Huh, the light won't even move with

(gunner light_south) dowatch (targ_s_1);
little raptor
#

and a weapon?

#

@tough abyss oh I read it wrong again

cerulean cloak
#
(gunner light_south) setdamage 1;

Kills the guy in it, so yes.
Not sure about a weapon, how would I check?

little raptor
#

@tough abyss it's

{"weapon", {"mag", count} }
#

count is how many mags

cerulean cloak
#

["SEARCHLIGHT"] is what retruns

tough abyss
#
        randomWeaponProbability = 100;

        rifleList[] = {
        {"arifle_Katiba_GL_ARCO_pointer_F", "30Rnd_65x39_caseless_green", 8}}, 0.35,{"arifle_Mk20_GL_F", "30Rnd_556x45_Stanag", 8}}, 0.40,
        {"arifle_MXC_F", "30Rnd_65x39_caseless_mag", 8}}, 0.35
                    
         };
little raptor
#

wrong again

tough abyss
#

or remove the extra double bracket by 8?

little raptor
#

that's what you should put for each weapon

tough abyss
#

Roger that.

little raptor
#

example

rifleList[] = {
{"arifle_Katiba_GL_ARCO_pointer_F", {"30Rnd_65x39_caseless_green", 2} }, 0.35
};
tough abyss
#

Thank you so much man.

little raptor
#

@tough abyss this is only for weapons tho

#

the rest of what I said (grenades, explosives) was correct

tough abyss
#
        rifleList[] = {
        {"arifle_Katiba_GL_ARCO_pointer_F", {"30Rnd_65x39_caseless_green", 8} }, 0.35,         {"arifle_Mk20_GL_F", {"30Rnd_556x45_Stanag", 8} }, 0.40,
        {"arifle_MXC_F", {"30Rnd_65x39_caseless_mag", 8} }, 0.35
                    
};
little raptor
cerulean cloak
#

It is a rock

#

The same rock object as targ_n_1

little raptor
#

maybe it can't be targeted

#

ok

cerulean cloak
#

Should I swap them for riflemen or something?

little raptor
#

do you have CBA?

cerulean cloak
#

Yes

little raptor
#

use "CBA_B_InvisibleTarget"

cerulean cloak
#

Ok, thanks, where is that found in the editor?

little raptor
#

I think under VR

little raptor
cerulean cloak
#

Ah, thanks. Will AI fire on that though?

little raptor
#

no

#

it's an empty vehicle

#

but invisible

cerulean cloak
#

Ok, was worried other nearby AI would spray it down.

tough abyss
#

THANK YOU so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so MUCH. @little raptor

little raptor
#

np

tough abyss
#

I had been stuck in this for so long. You're a life saver! Gonna get a nighty smoke and some sleep. English isn't my native language so there has been some misunderstanding here and there but still you managed to help me with one of the biggest confusing problems I have had. You should def be a mod, you are very helpful and active not only to me but everyone. Cya around buddy!

tough abyss
little raptor
#

Now I feel bad notlikemeow

tough abyss
#

Why 😦

little raptor
#

For spending so much time in social media notlikemeowcry
I probably killed a solid 5 hours today meowsweats

tough abyss
#

What do they say

#

what you give

#

comes around

#

I have seen the rest of the vets online from when I wake up until now they just active somewhere else on their PC.

cerulean cloak
#

Thanks, with those invisible targets both lights work perfectly. I'll keep a note of that for future.

balmy creek
#

What is the script to kick a player when they join a server with a certain mod? ( In this case personal arsenal)

slate cypress
#

How do I iterate through a group of objects made on 3den Editor in a script?

little raptor
#

_allMObjects = allMissionObjects "All";

#

to iterate:

#
{

} forEach allMissionObjects "All";
glossy pine
slate cypress
little raptor
#

or composition?

slate cypress
#

ah more like a composition

#

yes

little raptor
#

there's this

#

but it doesn't do what you want

slate cypress
#

Can I spawn a BIS function rather than call it?

little raptor
#

a function is just a code

#

so yes

#

but spawned code don't return what you'd get with call

#

they return a handle to the spawned "thread"

quasi sedge
#

How to increase marker size with 5 sec period?

if (isServer) then { 
    sleep 5;
    respawn_east setMarkerSize = getMarkerSize respawn_east + [100,0];
};```
little raptor
winter rose
#

@balmy creek no crossposting please - keep it to one channel

little raptor
#

@quasi sedge also you might need a condition to end it
otherwise it keeps getting bigger forever
for example this makes it bigger 5 times

for "_i" from 1 to 5 do {
sleep 5;
respawn_east setMarkerSize (getMarkerSize respawn_east + [100,0]);
};
distant oyster
#

@quasi sedge @little raptor shouldnt you use vectorAdd?

quasi sedge
#

.."respawn_east" setMarkerSize...

little raptor
#

@quasi sedge use this:

for "_i" from 1 to 5 do {
sleep 5;
_newSize = getMarkerSize "respawn_east" vectorAdd [100,0];
_newSize resize 2;
"respawn_east" setMarkerSize _newSize;
};
leaden haven
little raptor
#

(updated the code)

little raptor
leaden haven
#

Oh ok.

#

Thanks.

quasi sedge
#

@little raptor i re-thinked, what if server change scenario to mine, but with already big ammount of players? Marker won't increase to needed size. This simple-stupid method will work as intended?

if (isServer) then {
    while {true} do {
    sleep 10;
        if ((count allPlayers) => 8 && (count allPlayers) <= 15) then
        "respawn_east" setMarkerSize [1400, 1406];
        
        if ((count allPlayers) => 15 && (count allPlayers) <= 25) then
        "respawn_east" setMarkerSize [1600, 1406];
        
        if ((count allPlayers) => 25 && (count allPlayers) <= 35) then
        "respawn_east" setMarkerSize [1800, 1406];
        
        if ((count allPlayers) => 35 && (count allPlayers) <= 45) then
        "respawn_east" setMarkerSize [2000, 1406];
        
        if ((count allPlayers) => 45 && (count allPlayers) <= 55) then
        "respawn_east" setMarkerSize [2200, 1406];
        
        if ((count allPlayers) => 55 && (count allPlayers) <= 65) then
        "respawn_east" setMarkerSize [2400, 1406];
        
        if ((count allPlayers) <= 65) then
        "respawn_east" setMarkerSize [2600, 1406];
    };
};```
little raptor
# quasi sedge <@!360154905148653568> i re-thinked, what if server change scenario to mine, but...

this one
also replace all thens with exitWith (not in the mood to do it myself)

if (isServer) then {
    while {true} do {
    sleep 10;
    call {
        if ((count allPlayers) => 8 && (count allPlayers) <= 15) then
        {"respawn_east" setMarkerSize [1400, 1406]};
        
        if ((count allPlayers) => 15 && (count allPlayers) <= 25) then
        {"respawn_east" setMarkerSize [1600, 1406]};
        
        if ((count allPlayers) => 25 && (count allPlayers) <= 35) then
        {"respawn_east" setMarkerSize [1800, 1406]};
        
        if ((count allPlayers) => 35 && (count allPlayers) <= 45) then
        {"respawn_east" setMarkerSize [2000, 1406]};
        
        if ((count allPlayers) => 45 && (count allPlayers) <= 55) then
        {"respawn_east" setMarkerSize [2200, 1406]};
        
        if ((count allPlayers) => 55 && (count allPlayers) <= 65) then
        {"respawn_east" setMarkerSize [2400, 1406]};
        
        "respawn_east" setMarkerSize [2600, 1406];
    };
};
#

also remove the first conditions

#

they're already covered by the next ones

#

example:

if ((count allPlayers) => 15 && (count allPlayers) <= 25) then
        {"respawn_east" setMarkerSize [1600, 1406]};

should become

if (count allPlayers <= 25) exitWith
        {"respawn_east" setMarkerSize [1600, 1406]};
#

@quasi sedge also store allPlayers in a variable first

#

don't use allPlayers directly (could be costly)
example

_allPlayers = allPlayers
#

then use that instead

quasi sedge
#
if (isServer) then {
    while {true} do {
    sleep 10;
    _allPlayers = allPlayers;
    call {
        if ((count _allPlayers) => 8 && (count _allPlayers) <= 15) exitWith 
        {"respawn_east" setMarkerSize [1400, 1406]};
        
        if (count _allPlayers) <= 25) exitWith 
        {"respawn_east" setMarkerSize [1600, 1406]};
        
        if (count _allPlayers) <= 35) exitWith 
        {"respawn_east" setMarkerSize [1800, 1406]};
        
        if (count _allPlayers) <= 45) exitWith 
        {"respawn_east" setMarkerSize [2000, 1406]};
        
        if (count _allPlayers) <= 55) exitWith 
        {"respawn_east" setMarkerSize [2200, 1406]};
  
        if (count _allPlayers) <= 65) exitWith 
        {"respawn_east" setMarkerSize [2400, 1406]};
    };
};

That's right?

cold pebble
#

Evening - has anyone got a reliable way to check if a location is inside a rock?

if (
                lineIntersectsSurfaces [AGLtoASL _testPos,AGLToASL _testPos vectorAdd [0,0,5],objNull,objNull,false,1,"GEOM","NONE"] isNotEqualTo [] &&
                nearestTerrainObjects [_testPos,[],5,false] isEqualTo [] &&
                {!(surfaceIsWater _testPos) &&
                {terrainIntersect [_testPos,(_testPos vectorDiff [0,0,-3])]}}}
            ) then {
                _position = _testPos;
            };

This is what I'm currently doing to fulfil a spawn position - but I still get inside rocks on some positions

still forum
#

Maybe sufficient to just check that you are not inside rock bounding box

#

That's how find nearest free position works

#

Or whatever that script command there is called.
NearestEmtpyPosition or smth

cold pebble
#
private _testPos = _startPos getPos [random _maxRadius,random 360] findEmptyPosition [0,_maxRadius,_className];
#

My bad, that was the first line which I missed in the copy

#

that the command you were thinking?

still forum
#

Ye probably

#

It checks the AI path map, which should filter out objects that block positions

#

Unless, it's a boulder/rock that was placed upside down

cold pebble
#

With those things all together, it became rare, but still possible especially in some really tall rocks

#

I'll keep messing with it, see if I can get anything better with it, its far better then the first iteration

#

Looking at BIS_fnc_findSafePos they use isFlatEmpty which could be useful

#
private _testPos = _startPos getPos [random _maxRadius,random 360] findEmptyPosition [0,_maxRadius,_className];
            if (
                lineIntersectsSurfaces [AGLtoASL _testPos,AGLToASL _testPos vectorAdd [0,0,5],objNull,objNull,false,1,"GEOM","NONE"] isNotEqualTo [] &&
                {nearestTerrainObjects [_testPos,[],5,false] isEqualTo [] &&
                {_testPos isFlatEmpty [-1,-1,-1,0,0,false,objNull] isNotEqualTo []}}
            ) then {
                _position = _testPos;
            };
#

This seems to provide decent results, rarely in a rock

#

Also uses the lovely new isNotEqualTo to compare arrays πŸ™‚

little raptor
#

But missing some parantheses

leaden haven
#

Actually, this might be more useful, but I cannot find the script/function associated with it. This is an admin player ban menu apparently:

RscDisplayMPPlayers

meager granite
#

So magazinesTurret no longer accepts [0,0] turret path as right argument

#

There should've been a check if first array value is array before expecting second one to be boolean

#

RIP missions using _vehicle magazinesTurret [0,0] to get commander turret mags

agile pumice
#

So here's something odd. The building "Land_i_Addon_02_b_white_F" returns false with BIS_fnc_isBuildingEnterable
It has a door and you can certainly enter it.

Is this because there are no BIS_fnc_buildingPositions ??

I vote to change BIS_fnc_isBuildingEnterable to BIS_fnc_buildingHasPositions

summer glade
#

Has anyone tested or know if it is possible to have a mission file read an SQF files from a web server address? I am hoping to have a location where Mission makers can compile a virtual arsenal and export it to an SQF import on a FTP upload and it will be there on next mission load "Training Ground" without having to repackage the entire PBO. For Example

Add this to a scroll wheel option to an object. (Can provide the SQF if necessary)

This addaction ["Get RTO Kit", "http://www.example.com/armory/RTO.sqf"];```
warm hedge
#

Never

summer glade
#

Never as in never been tested or never should do it?

warm hedge
#

There's no possibility

summer glade
#

Gotcha... Ok thanks. I was reading the htmlLoad as well and it says you can reference sqf files but i didnt understand how that works either so Thanks for the feedback

exotic flax
#

Only way is through extensions (like a database)

#

Although technically it should be possible to access files or an API as well

summer glade
#

Yeah normally would not be a big deal but we have a few units with 30+ loadouts. Just wanted to avoid having to re-update the PBO every time they want to make a change.

#

Anyway Ill stop wasting my time if its not possible

exotic flax
#

Could upload to userdata folder on server and read that (from server)

#

Although DB is probably a lot easier

summer glade
#

Not familiar enough with those so will read up on that before making a fool of myself asking simple quesions here.

warm hedge
#

FYI: if you even do ctrlText for htmlLoaded control, will return nothing so can't use

loud birch
#

does setObjectScale work globally?

#

the page doesn't say

normal abyss
loud birch
#

darn thats a shame

fathom rapids
#

Me again sorry. I am trying to be super clever here with a training op that i need to conduct. I will be hosting some training on how to use the TFAR radios. I have a script on an officer where players go up to and take their kit. Within this kit there is a certain type of radio for the first part of the training course. I wish to have an addaction on a laptop (by me) that changes the radio that everyone has to another type of personal radio. I was thinking of using the same script but a copy with the different radio in it, but i think this is long winded. Is there a way i can execute a script and make every player logged on have their radio replaced with what i choose?

still forum
meager granite
#

will do

still forum
still forum
languid oyster
slate cypress
fathom rapids
#

yes

slate cypress
# fathom rapids yes

You will want to use remoteExec then and either use -2 if it is a dedicated server or 0 if not.

#

This will run the parameter code on all machines. From there, you can use the addItem and removeItem commands.

fathom rapids
#

so if i change the execVM in this below script to remoteexec, it should work?

#
removeAllWeapons player;
removeAllItems player;
removeAllAssignedItems player;

private _equipment = "";

if ("Squad Leader" in roleDescription player) then {
  _equipment = "SquadLeader";
};
if ("Team Leader" in roleDescription player) then {
  _equipment = "TeamLeader";
};
if ("Combat Medic" in roleDescription player) then {
  _equipment = "Medic";
};
if ("AT Specialist (Javelin)" in roleDescription player) then {
  _equipment = "RiflemanAT";
};
if ("Heavy MachineGunner" in roleDescription player) then {
  _equipment = "AutoRifleman";
};
if ("Rifleman" in roleDescription player) then {
  _equipment = "BasicRifleman";
};
if ("Commander" in roleDescription player) then {
  _equipment = "Commander";
};
if ("Sniper" in roleDescription player) then {
  _equipment = "sniper";
};
if ("Marksman" in roleDescription player) then {
  _equipment = "Marksman";
};
if ("Grenadier" in roleDescription player) then {
  _equipment = "Grenadier";
};

armaofficer addAction ["Rearm", {
    params ["", "_caller", "", "_type"];
    _caller execVM format ["loadouts\%1.sqf", _type];
}, _equipment]; 
#

or should i create a new script where it removes the radio and then replaces it using

#
[] remoteExec ["someScriptCommand", targets, JIP];
fathom rapids
#

using this ?

#
{player setAmmo [primaryWeapon player, 1];} remoteExec ["bis_fnc_call", 0]; 
little raptor
#

No

fathom rapids
#

but additem

slate cypress
#

player means nothing on another machine

still forum
#

you can

fathom rapids
#

that was from the arma wiki

slate cypress
#

oh?

still forum
#

player is a script command that returns an object

#

you can pass an object to another machine same as any other object

#

also here you aren't passing player as parameter at all.

still forum
#

The above is sending a piece of code

little raptor
#

The other machine executes the code

little raptor
#

@still forum I had a question about intercept
After I create a client::invoker_lock, can I create multiple threads and call multiple functions without a mutex and stuff? (the functions do read only things, like line intersects)

still forum
#

no

#

you cannot do any script interaction in more than one thread

#

on windows

#

on linux you can, currently.

little raptor
#

So it's an engine limitation?

still forum
#

yeah

little raptor
still forum
#

because windows has performance optimizations that are currently not enabled on linux

#

no I won't disable them and make all SQF scripts slower.

languid oyster
#

@little raptor @still forum listening to you reveals reveals on how little I know. And gives me a good feeling being lazy as there are more competent people out there getting the stuff done.

little raptor
#

Me? I know nothing compared to Ded meowsweats

still forum
#

but you spill most of your knowledge while I keep most to myself

winter rose
cosmic lichen
#

Your GF?

winter rose
#

I'm single

cosmic lichen
#

Lucky you

winter rose
#

I wanted to represent Dedmen hoarding knowledge but okay πŸ˜„

cosmic lichen
#

Lucky Lou πŸ˜„

quasi sedge
#

Multiplayer > Host server > 3D Editor > Play

#
if (isServer) then {
    while {true} do {
    sleep 10;
    //_allPlayers = allPlayers;
    _allPlayers = 36;
    call {
        if ((count _allPlayers) <= 7) exitWith 
        {};
        
        if ((count _allPlayers) <= 8) exitWith 
        {"respawn_east" setMarkerSize [1500, 1406]};
        
        if ((count _allPlayers) <= 25) exitWith 
        {"respawn_east" setMarkerSize [1700, 1406]};
        
        if ((count _allPlayers) <= 35) exitWith 
        {"respawn_east" setMarkerSize [1900, 1406]};
        
        if ((count _allPlayers) <= 45) exitWith 
        {"respawn_east" setMarkerSize [2100, 1406]};
        
        if ((count _allPlayers) <= 55) exitWith 
        {"respawn_east" setMarkerSize [2300, 1406]};
  
        if ((count _allPlayers) <= 65) exitWith 
        {"respawn_east" setMarkerSize [2500, 1406]};
    };
};
#

i set _allPlayers = 36;, but it won't change marker size according to if ((count _allPlayers) <= 35) exitWith {"respawn_east" setMarkerSize [1900, 1406]};

cosmic lichen
#

Because it sets it to <= 45?

little raptor
#

you can't count scalars

cosmic lichen
#

Yeah also that πŸ˜„

quasi sedge
#

roga

hallow mortar
#

if you use count on a number it should actually count the number out, e.g.

_var = 4;
count _var;
// returns [0,1,2,3,4];

not because it would be useful but because it would be funny

still forum
#

no

#

what you mean is iota

#

but maybe it makes sense to generate arrays. Give a generator function and number of elements, and generator function will be called N times to spit out new elements

cosmic lichen
#

or range(start, end)

still forum
#

just like
{code} makeArray numberOfElements

so
{_forEachIndex} makeArray 4
[0,1,2,3]

hallow mortar
still forum
#

I disagree on funny

hallow mortar
#

it wasn't a serious suggestion for implementation

cosmic lichen
#

{random 10} makeArray 4;

#

Very nice

still forum
#

you can kinda already do it with set and apply.
But that way you are creating two big arrays where one is useless and just a dummy

hallow mortar
#

makeArray would be neat for procedurally generating references to sequentially named variables (e.g. the auto-numbering system used by editor markers)

cosmic lichen
#

I'd prefer 'createArray' though

#

Since we have, createMarker, createVehicle etc...

still forum
#

generateArray maybe makes more sense with what it actually does

cosmic lichen
#

too long πŸ˜„

#

mArr

#

For the ppl who requested #

hallow mortar
#

if you feed it a string it should generate entries using the editor autonumbering system e.g.

{"variable"} createArray 3```
returns
```sqf
["variable_0","variable_1","variable_2"]```
still forum
#

no

#

it shouldn't

#

just build that yourself

cosmic lichen
#

Question is, will it have _createArrayIndex?

hallow mortar
#

struggling to see why easily generating an array to match editor list generation is not a valid potential use case of this command

cosmic lichen
#

_forEachIndex in createArray πŸ”₯

still forum
#

It is a use case

#

but limiting the usability of the command for your very specific usecase is nonsense

cosmic lichen
#

Just use format with index

hallow mortar
#

I did not intend to limit it but to have it automatically recognise when you feed it only a string (an otherwise non-functional argument) as a shortcut. In addition to its other functions

still forum
#

But that does limit it

#

you prevent people from generating a list of strings, of the same string

#

what if someone wants to do that?

#

That limitation is absolute nonsense considering you could just write the variable numbering yourself by just using format

cosmic lichen
#

{selectRandom ["a", "b", ...]} createArray 50

#

Wouldn't work

hallow mortar
still forum
#

This is Arma

#

no matter how obscure, someone wants to

still forum
# cosmic lichen Wouldn't work

What he means (I assume) is to parse the generated script instructions of the code to make sure it only has a single push instruction for a single string.

cosmic lichen
#

yes

still forum
#

Lots of extra work for literally no purpose. You can just use format

#

Its just a bullshit idea.

hallow mortar
#

Thanks.

cosmic lichen
#

But he came up with the initial idea. Thanks for that ❀️

hallow mortar
#

It seemed like it would be a fairly common use case because of how many existing systems in Arma generate sequences like that, so it made sense to me to build in a shortcut (there are plenty of existing commands that have special results depending on input type)

#

maybe it would be more effort than it's worth, but you don't have to be nasty about it

open hollow
#

@still forum https://imgur.com/a/fyYL49j i think "oversize" on save files is geting out of hand (wasnt me i found it on a facebook group )

im wrong or that tryed to save a 2.74TB file lol

still forum
still forum
#

footprint is virtual memory.

open hollow
#

oh ok blobcloseenjoy

toxic dirge
#

when I use the scaling command the object or person will increase in size then revert immediately

meager granite
still forum
#

still same result

still forum
meager granite
#

Does setObjectScale send any network messages or scale gets updated eventually along with other stuff?

still forum
#

eventually

meager granite
#

Good to know

still forum
#

I see the bug in magazinesTurret, thats definitely not intended as it breaks backwards compat.
Some mistake in arg checking, will fix

meager granite
#

Thanks, we already updated mission to use new syntax for nested turret paths but plenty of other missions will remain broken until command is hotfixed.

still forum
#

We'll try not to do a hotfix if its not really urgent.
Although this can be a simple non-version number changing hotfix but... oof

little raptor
#

Wouldn't it be better to just fix broken stuff right away?

cosmic lichen
#

I guess it's expensive πŸ™‚

still forum
#

expensive, very time intensive. And I hate seeing hotfixes and am proud that we didn't need any since I joined :U

winter rose
#

we may have needed some, but none we released* πŸ˜„

meager granite
#

@still forum Any chance to see a scripting command to return unit's ragdoll state (at least return, let alone set), if I nag you enough?

#

I think I've been asking for it since like 2013 or something, can't even recall anymore but always had a need for it

#

Also, any chance for you to dive into ragdoll network sync if I create repros? I had a body dragging feature done for years but can't release it because ragdolls mess up if you change their locality in multiplayer

#

Mess up by appearing at [0,0,0] for some players and not for others

#

Pretty sure I can repro it, just want my efforts to be looked at

meager granite
#

Pretty sure there has been plenty of such tickets over time, should I just create another one?

still forum
still forum
meager granite
#

I'll try to make a repro for it, it happens pretty often in certain environment

#

Alright, I'll have a search, thanks.

still forum
#

I had tons of objects at 0,0,0 last weekend, but atleast they weren't ragdolling. I thought ACE is causing it

meager granite
#

Ragdolls at [0,0,0] been an issue since alpha days, I even had few of my tickets for it fixed, but it keeps coming back in different ways, locality change in this case.

little raptor
still forum
#

yes

#

I know we have some places in code that check for 0,0,0 because its usually an error.
but obviously missing some

slim oyster
#

Ace 2 dumping ground was horrifying

little raptor
#

Any clue why this doesn't work?

#define GAME_VER __GAME_VER_MAJ__##__GAME_VER_MIN__
#if GAME_VER >= 200
//blabla
#endif
#

is game_ver_maj 2?

#

or 02?

#

nvm

#

it's because game_ver_min is 3

#

instead of 03

#

is that a bug?

open hollow
#

@still forum there is any chance that VectorMultply/vectoradd/vectordiff if you give an array bigger than 3 parameters it works?

currently is like:
[1,2,3,4,5] vectormultiply 2
return : [2,4,6]

it can be done with apply... but im just curius meowcamera

still forum
still forum
queen junco
#

Hey, I am currently trying to create a sound source on a car that can be turned on and off again. This is my script:

[
    policecar,                                                        
    "Activate Siren",                                                
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",    
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",    
    "_this distance _target < 2",                                    
    "_caller distance _target < 2",                                    
    {},                                                                
    {},                                                                
    {
        siren_on = true;
        PublicVariable "siren_on";
        hint "Siren is now active.";
        while {siren_on} do {
            playSound3D ["A3\Sounds_F\sfx\alarm_independent.wss", policecar, false, getPosASL policecar, 1, 1, 200];
            sleep 5;
        };
    },                                                                
    {},                                                                
    [],                                                                
    1,                                                                
    0,                                                                
    true,                                                            
    false                                                            
] remoteExec ["BIS_fnc_holdActionAdd", 0, policecar];                

But I seem to have two issues:

  1. the interaction menu freezes. Once the holdAction is executed you can no longer scroll to interact with things. Pressing the mousewheel for to first action works though.
  2. the sound is placed on the positon of car at the beginning of the loop. I'd like it to follow the cars position

Any idea what causes this/how to make it work?

little raptor
# still forum could be done pretty easily yes. FT ticket

Can you make it work with any number of elements?
I made a feature request for 2D version of the commands.
What KK implemented would always add a 3rd element even when you add 2D vectors (e.g [0,0] vectorAdd [1,2] gives [1,2,0])

#

which is redundant most of the time for me (he suggested using resize to make it 2D notlikemeow )

#

but making it work with any number of elements is pretty cool

#

like this:

[0,0] vectorAdd [1,2] //[1,2]
[0,0] vectorAdd [1,2,3] //[1,2,3]

etc.

velvet umbra
#

hey is it possible to disable the auto halo animation above 100ft? i guess its the "halofreefall_non" animation. tried it with evh and switchMove back but didn't work

exotic tinsel
#

is there a command for checking if ai can move to a position before ordering them to?

#

by can move i mean that they can actually get to that positions i dont mean the function canmove.

winter rose
#

(and canMove πŸ˜‹)

exotic tinsel
#

does canmove have that ability to also return false if they are healthy but cant actually get to that position?

winter rose
#

no, canMove is only for the current mobility state πŸ˜‰

exotic tinsel
#

ok

toxic dirge
#

also does the scale thing work in MP?

exotic flax
#

effects are global, so I would say yes

toxic dirge
#

that's pretty pog

agile flower
#

Broad question: I can get PlaySound3D to work on my local host if I pass it with remoteExec

#

Why doesn’t it work on dedicated?

little raptor
#

not yet at least

agile flower
#

I’ve tried 3 approaches, and none work in dedi, but 2 out of 3 work on local host

winter rose
agile flower
#
sRandomSong remoteExec ["hint", 0]; ```
#

I have it encased in a while loop

#

And a bit of logic to choose a random song

#

The song plays in local, and the hint, which I added for testing, gives me the path of the song

winter rose
agile flower
#

The hint works on dedi, but no music played

#

Yeah, I know

crude needle
#

playSound3D has a global effect, don't need to remoteExec on every machine.

agile flower
#

So here’s the full code

velvet umbra
agile flower
#

@crude needle @winter rose

#

Same result when I do:

sRandomSong remoteExec ["hint", 0]; ```
#

Hint works, no music

winter rose
#

]*

agile flower
#

But music plays in local host

#

Yes I know,