#arma3_scripting

1 messages Β· Page 16 of 1

boreal parcel
#

in server? yeah I have the extended debug console

little raptor
#

I thought you said it's dedicated

boreal parcel
#

it is

#

its an armahosts server

#

I have that console once I log in as admin

little raptor
#

ok. are you running the game?

boreal parcel
#

no? im in the server

#

armahosts is running the server if thats what your asking

little raptor
#

I mean are you connected as a client with a debug console? (admin)

boreal parcel
#

oh yes

little raptor
#

ok. if you type 1 into the console and exec it do you get something back?

boreal parcel
#

I get back 1

little raptor
#

what does fileExists "scripts\ghst_halo.sqf" say?

boreal parcel
#

true

#

lol

#

is it possible to execute the script from the console?

little raptor
#

yes

#

[player, player, -1, [false,600,70]] execVM "scripts\ghst_halo.sqf"

boreal parcel
#

returns
mpmissions\__CUR_MP.Stratis\scripts\ghst_halo.sqf

#

for some reason

little raptor
#

but no hint?

boreal parcel
#

no

little raptor
#

what does loadFile "scripts\ghst_halo.sqf" give?

boreal parcel
#

returns the entire script

little raptor
#

and the hint is in it?

#

the one on line 13?

boreal parcel
#

yep, returns this exactly but I removed some comments

_host = _this select 0;
_caller = _this select 1; // 6
_id = _this select 2;
_params = _this select 3;
_typehalo = _params select 0;//true for all group, false for player only.
_althalo = _params select 1;//altitude of halo jump
_altchute = _params select 2;//altitude for autochute deployment

hint str _host;
if (not alive _host) exitwith {
hint ""Halo Not Available""; 
_host removeaction _id;
};

systemChat ""Click on the map where you want to insert"";

openMap true;

mapclick = false;

onMapSingleClick ""clickpos = _pos; mapclick = true; onMapSingleClick """""""";true;"";

waituntil {mapclick or !(visiblemap)};
if (!visibleMap) exitwith {
    systemChat ""Im too scared to jump"";
    };
_pos = clickpos;

if (_typehalo) then {
_grp1 = group _caller;

{_x setpos [_pos select 0, _pos select 1, _althalo];} foreach units _grp1;

{_x spawn bis_fnc_halo} foreach units _grp1;

} else {
_caller setpos [_pos select 0, _pos select 1, _althalo];

_caller spawn bis_fnc_halo;

};
sleep 1;

[_caller] spawn bis_fnc_halo;

openMap false;

_bis_fnc_halo_action = _caller addaction [""<t color='#ff0000'>Open Chute</t>"",""A3\functions_f\misc\fn_HALO.sqf"",[],1,true,true,""Eject""];

sleep 5;

systemChat ""Have a nice trip"";// and dont forget to open your chute!"";

//auto open before impact
waituntil {(position _caller select 2) <= _altchute};

_caller removeaction _bis_fnc_halo_action;

if ((vehicle _caller) iskindof ""ParachuteBase"") exitwith {};

systemChat ""Deploying Chute"";

[_caller] spawn bis_fnc_halo;
little raptor
#

oh nvm

boreal parcel
#

I havent changed the last line yet

little raptor
#

that's copy paste error

#

there's nothing wrong blobdoggoshruggoogly

#

yep, I just ran it and it works blobdoggoshruggoogly

#

(tho the halo part is broken)

boreal parcel
#

it works for me locally

#

just not on the server

#

thats why I assumed some kind of locality error

little raptor
#

it's not

#

but maybe your server is blocking execVM?

boreal parcel
#

How would I check? that would explain why these scripts arent running either now that I think about it

execVM "scripts\fn_advancedTowingInit.sqf";

// Enable Advanced Sling
execVM "scripts\fn_advancedSlingLoadingInit.sqf";

execVM "core\vehicle_init.sqf";
little raptor
#

CfgRemoteExec

boreal parcel
#

in the console?

little raptor
#

no. in config viewer

boreal parcel
#

when I click on it in the config viewer its empty

little raptor
little raptor
boreal parcel
little raptor
#

you're in configFile right now

boreal parcel
#

ah

boreal parcel
little raptor
#

then you've blocked execVM meowsweats

boreal parcel
#

huh, is that a server config setting??

little raptor
#

did you check missionConfigFile?

#

or just check description.ext of your mission

boreal parcel
boreal parcel
#

this is my ext file

#

I dont see anything out of the ordinary

little raptor
#

what are these?

#include "core\fnc\common\dlg.hpp"
#include "core\fnc\fob\dlg.hpp"
#include "core\fnc\log\dlg.hpp"
#include "core\fnc\debug\defines.hpp"

boreal parcel
#

not sure, im running Hearts and Minds, ill check them real quick

#

the dlg.hpp files seem to define button ui's

#

and dialogue ig

#

the defines seems to affect gui, has this comment at the top
// Generated by: "Default" call BIS_fnc_exportGUIBaseClasses;

boreal parcel
# little raptor try this: ```sqf this addAction ["<t color='#00ffff'>Solo Halo</t> ", {_this spa...

Well if there is nothing i can do about the execVM block, can I run my other scripts like so? or how could I go about that? maybe call instead of spawn

spawn compile preprocessFileLineNumbers "scripts\fn_advancedTowingInit.sqf";

// Enable Advanced Sling
spawn compile preprocessFileLineNumbers "scripts\fn_advancedSlingLoadingInit.sqf";

spawn compile preprocessFileLineNumbers "core\vehicle_init.sqf";
little raptor
#

maybe call instead of spawn
depends on the context of execution

little raptor
little raptor
boreal parcel
#

and all three are being called in the init_server.sqf

copper raven
#

use execVM over spawn compile preprocessXX

winter rose
winter rose
boreal parcel
#

it calls a bunch of other scripts and functions in the same way, now that i'm looking at it perhaps I should call my scripts like that as well

winter rose
#

oh, that's part of something else (core).

boreal parcel
#

yeah, im slightly modifying a mission file called Hearts and Minds

#

just adding a few things, unsuccessfully though

#

I just find it strange because normally in other missions I dont have a problem executing these scripts so i assume somehow the mission file is blocking execvm

winter rose
#

(also spawn is binary)

little raptor
#

otherwise we wouldn't be here meowsweats

winter rose
#

either be filters or Cfg commands something

little raptor
#

filters?

hallow mortar
#

BattlEye filters

little raptor
#

I already checked CfgRemoteExec with him and looks like he doesn't have one blobdoggoshruggoogly

copper raven
little raptor
#

config paths?

copper raven
#

i don't know, it can't be BE filters because you would get kicked for it wouldn't you?

#

and if it's not cfgRemoteExec either, then it has to be wrong script paths, or perhaps in config allowedPreprocessorExtensions or whatever(if you've changed them at all)

little raptor
boreal parcel
#

the allowedPreprocessorExtensions

#

We also dont use battleeye at the moment

#

it gives us a hard time

copper raven
#

does execVM not work at all?

boreal parcel
#

Nope

#

I have multiple scripts that simply wont work with this mission but have in other missions

copper raven
#

and spawn compile does?

boreal parcel
#

no that didnt work either actually

#

well

#

not with the other scripts

#

the addaction did

little raptor
#

it was your fault blobdoggoshruggoogly

copper raven
#

yeah, just pass a 0

#

check if that works, then we'll see

boreal parcel
#

I have used them in liberation and other custom made scenarios

winter rose
#

something tells me that

  • your code is broken
  • you don't code with the -showScriptErrors flag
boreal parcel
#

I have gotten script errors in my rpt, typos and such

winter rose
#

yep
fix that

boreal parcel
#

I mean I got them before, fixed them already

#

anyway

#

I changed my other scripts to be executed like so instead of the preprocess bit, this works it seems

[] call compileScript ["scripts\fn_advancedTowingInit.sqf"];

// Enable Advanced Sling
[] call compileScript ["scripts\fn_advancedSlingLoadingInit.sqf"];

[] call compileScript ["core\vehicle_init.sqf"];
winter rose
#

call is unary and binary

boreal parcel
#

Im not sure what that means, could you explain?

copper raven
#

unary commands take one argument (on the right side), binary takes two, left and right

winter rose
#
call { hint "OK" };
"OK" call { hint (_this select 0) };
boreal parcel
#

Ohh alright

true frigate
#

Hey, I'm having troubles with creating a custom vehicle for an op. Basically, its a static weapon on the back of a civilian boat. This is in the init of the static weapon, R1_2 is the boat. When I play the scenario, the weapon gets destroyed and the boat flips over, or gets launched around 500m, as if it still is colliding with the gun. Have I set something up wrong?

[this, R1_2] call Bis_fnc_attachToRelative;
this remoteExecCall ["disableCollisionWith", 0, R1_2]; 
hallow mortar
#

For remoteExec, all arguments for the command being remoteExec'd go in the left argument of remoteExec. You're passing R1_2 as the JIP parameter of remoteExec, which is...not what that's for. There's a pin in this channel that explains it better, along with the wiki page for remoteExec, but essentially what you want is this:

[this,R1_2] remoteExec ["disableCollisionWith",0,true];```
(`remoteExecCall` is unnecessary for commands, you would only want to use it for functions)
That being said, `disableCollisionWith` shouldn't be necessary, because `BIS_fnc_attachToRelative` should have already taken care of that. So there's something else funny going on.
sudden bear
#

How do this mod work ? I already try and didn't understand anything ...

granite sky
#

The bits I've used so far are just better versions of the vanilla debug console & config viewer. They're pretty self-explanatory if you used the originals.

true frigate
#

I had taken a look but it was a little confusing, I use remoteExec to call scripts a bit, but I'm still relatively new to it haha. Only figured out the other day something wasn't working in MP because I had the target set to 2, not 0

hallow mortar
#

It's worth getting to know it, it's a very powerful command for enabling a lot of other commands to work properly.
But, still....you shouldn't need it at all in this case, BIS_fnc_attachToRelative normally works fine on scenario start. So my guess is that either something is delaying that attachTo until after scenario start, or R1_2 doesn't actually refer to the boat.

true frigate
#

I think I just figured it out with this

So my guess is that either something is delaying that attachTo until after scenario start
Its on a show/hide module

#

Would that be causing the issue?

hallow mortar
#

I don't know enough about show/hide modules to say for certain, but it's certainly worth trying it without the module to see if anything changes.

true frigate
#

Well, looks like its working fine now. I don't see why it would be causing that though? I know it disables sim and drawing of the object, but I thought scripts in the init would still work. I'll just place them in the trigger that shows the unit πŸ™‚

#

Huh, its gone right back to it ._.

#

Looks like its actually the unit that's causing the issues then

elfin comet
#

It's cool that lockTurret does what I want (you know, locking turrets and such). But it'd be cool if it also prevented them from being accessed from within the vehicle. Unless i'm just missing something.

hallow mortar
#

It should prevent access from inside the vehicle.

#

If this is for multiplayer, make sure it's being executed where the vehicle is local.

#

Also check that you've got the right turret path (you can easily find the right path by getting in the appropriate seat and running (vehicle player) unitTurret player in the debug console)

proper niche
#

Hey. I am trying to have the freefall height of some units set to 3000 when they are spawned. I am running the function on the units init eventhandler and it is working in singleplayer, but not in multiplayer. any ideas?

class EventHandlers: DefaultEventhandlers
{
    init = "(_this # 0) setUnitFreefallHeight 3000;";
};
hallow mortar
#

Is the mod loaded on the machine where the units are local when they're spawned?

proper niche
hallow mortar
#

In that case, the code appears to be correct and the locality appears to be correct. I'm out of ideas.

proper niche
#

hmm. ill double check that the mod was updated correctly on the server. thanks for the help

proper niche
#

server is updated with the mod. im at a loss

drifting portal
#

seems to have a maximum delay of 0.06 according to my tests

#

between the projectile hitpart and the buildingchanged

#

Oh no... there is something weird with the hashmap
so I destroyed '6' buildings, here is the resulting hashmap:

[
    ["425794", Tro_player_AT],
    ["426325", Tro_player_AT],
    ["427637", Tro_player_AT],
    ["", Tro_player_AT],
    ["413702", Tro_player_AT],
    ["413690", Tro_player_AT]
]

the fourth element... why is the objectID "" ??

tough abyss
#

@drifting portal Did it miss an element?

#

That would only happen in the case it misses an element.

#

Add a simple check with an if condition to make sure the returned value isn't equal to ""

#

If it is don't execute the further instructions.

#
params ["_buildingID", "_killer"];
if (_buildingID in alreadyDestroyed) exitWith {"don't count it twice"}
if !(_buildingID isEqualTo "") then {
    alreadyDestroyed set [_buildingID, _killer];
    [_kiiler, -100] call my_fnc_addRating;
}
#

I've actually had this happen to me too.

#

Generally a good idea to defensively test for the possibility something is empty.

still forum
#

how about === 🀣

drifting portal
#

very odd stuff going on right now
I'm only calculating the losses in buildings using hitpart attached to a projectile that the player fired, BUT

addUserActionEventHandler ["TacticalPing", "Activate", {
    _Crosshair = lineIntersectsSurfaces [AGLToASL (positionCameraToWorld [0,0,0]), AGLToASL (positionCameraToWorld [0,0,5000]), player]; 
    _PosASL = _Crosshair#0#0;
    _missile = "ammo_Missile_Cruise_01" createVehicle [0,0,10];
    _missile setposasl _PosASL;
}];

this simple script I made for testing is causing the building loss count to increase??
very weird

proven charm
#

triggering HitPart

drifting portal
#

so it shouldn't do that?

proven charm
#

I would check the _projectile in HitPart to see what it is

unique sundial
little raptor
little raptor
#

Check it in buildingChanged

drifting portal
#

the timer is the difference between time inside the buildingChanged and the time that was stored in hitpart

drifting portal
#

I'm only spawning cruise missiles, I'm not firing in between spawning them

winter rose
drifting portal
little raptor
#

oh nvm that's the server's thing

#

Tro_DestroyedBuildings_Counter_Enabled seems to be always false?

drifting portal
#

I set it to true prior to testing

#

its so that I can control when the system should work

little raptor
#

your timer is wrong, as I said

#

you simply check the time

#

not which object was hit

drifting portal
#

can you write the script so I can understand the idea?

little raptor
#

getObjectID _to
you should use _from, not _to

#

that's why you get "" for object ID

little raptor
# drifting portal can you write the script so I can understand the idea?
Tro_DestroyedBuildings_Player_ProjectileHitPartEH = _projectile addEventHandler ["HitPart", { 
    params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
        if (alive _hitEntity) then{
          Tro_DestroyedBuildings_ProjectileHitTime = time;
          Tro_DestroyedBuildings_HitEntity = _hitEntity;
        };
}];
drifting portal
#

that's sound but why do I need to check if its alive?

little raptor
#
addMissionEventHandler ["BuildingChanged", {
   params ["_from", "_to", "_isRuin"];
    if (_isRuin && {_from == Tro_DestroyedBuildings_HitEntity && {time - Tro_DestroyedBuildings_ProjectileHitTime < 0.5}}) then {

    }
}]
little raptor
#

tho you should use an array imo

drifting portal
#

what would happen if I don't check if its alive

little raptor
#

you can go back to _hitEntity isKindOf "Building" if you want blobdoggoshruggoogly

little raptor
drifting portal
#

isn't isNull more suited for this orr?

little raptor
drifting portal
#

oh alright

little raptor
#

and timers for all

#

e.g if you fire 2 rounds at 2 buildings from a distance and kill both, one of them will not be triggered

drifting portal
#

hmmm, I understand the idea but I'm not very sure about its execution (how to form the array, check it and remove it later on)

little raptor
little raptor
drifting portal
little raptor
drifting portal
#

an empty array I presume

little raptor
#

you can also try this tho thonk

_projectile addEventHandler ["HitPart", { 
    params ["", "_hitEntity", "_projectileOwner"];
        if (_hitEntity isKindOf "Building" && alive _hitEntity) then {
        _hitEntity addEventHandler ["Killed", {... if (player == _killer) then {...}}];
    };
}];
#

should be simpler and work fine

drifting portal
#

lol would this actually work?

#

weird

south swan
#

sounds oof

drifting portal
little raptor
#

or actually not

drifting portal
#

and how would we implement the timer here

#

oh alright

little raptor
#

a player killed it anyway. that's a negative point blobdoggoshruggoogly

south swan
#

i guess i'm missing stuff. What's the initial problem? Finding who destroyed the building when the actual destruction happens at least one frame after the actual hit?

drifting portal
#

finding if a player destroyed a building yeah

little raptor
#

finding if a player destroyed a building

south swan
#

i'd say: 1 onhit EH that stores [instigator,timestamp] in the object namespace and 1 onkill EH that checks if there is a pair stored and timestamp is close enough to now?

drifting portal
drifting portal
# little raptor you can also try this tho <:thonk:700311400152825906> ```sqf _projectile addEve...

well, it has inaccuracy I think, 5 buildings destroyed yet it only counted 3

Tro_DestroyedBuildings_Player_ProjectileHitPartEH = _projectile addEventHandler ["HitPart", { 
    params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
    if (_hitEntity isKindOf "Building" && alive _hitEntity) then {
        _hitEntity addEventHandler ["Killed", {
            params ["_unit", "_killer", "_instigator", "_useEffects"];
            if (player == _instigator) then {
                [getObjectID _unit, player] remoteExecCall ["Tro_fnc_BuildingDestroyedValidator", 2];
            };
        }];
    };
}];
elfin comet
# hallow mortar If this is for multiplayer, make sure it's being executed where the vehicle is l...

I'll check the turret paths, but I would imagine that running it in the init of the vehicle pretty much makes it run globally. Even putting it there, it does lock the respective door gunners and such from the outside but since the door gunners can be swapped to from a passenger seat of the helicopter, it doesn't seem to fully lock them. Unless I'm misunderstanding where the helicopter is local to in a client hosted server.

drifting portal
little raptor
#

?

#

just put Tro_DestroyedBuildings_ProjectileHits = [] in initPlayerLocal.sqf

drifting portal
#
Tro_DestroyedBuildings_Player_BuildingChangedEH = addMissionEventHandler ["BuildingChanged", {
    params ["_from", "_to", "_isRuin"];
    if (_isRuin && {Tro_DestroyedBuildings_ProjectileHits findIf {_from == _x#1 && {time - _x#0 < 0.5}} >= 0}) then {
        _ObjectId = getObjectID _from;
        if (_ObjectId == "") then {
            _ObjectId = getObjectID _from;
        };
        [_ObjectId, player] remoteExecCall ["Tro_fnc_BuildingDestroyedValidator", 2];
    };
}];
#
Tro_DestroyedBuildings_Player_ProjectileHitPartEH = _projectile addEventHandler ["HitPart", { 
    params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
    if (_hitEntity isKindOf "Building" && alive _hitEntity) then {
        Tro_DestroyedBuildings_ProjectileHits = Tro_DestroyedBuildings_ProjectileHits select {time - _x#0 < 0.5};
        Tro_DestroyedBuildings_ProjectileHits pushBack [time, _hitEntity];
    };
}];
#

now its not working at all

#

hmm

little raptor
#

_ObjectId = getObjectID _from;
if (_ObjectId == "") then {
_ObjectId = getObjectID _from;
};
that check is redundant

#

objectID is never ""

#

(plus you're recalculating it for _from again...)

little raptor
#

check in debug console

drifting portal
#

yep i think its not init too

elfin comet
south swan
#

everybody, it seems

elfin comet
#

ouch

drifting portal
#

(I can see 5 buildings destroyed)

little raptor
#

which is why I removed it

drifting portal
#
if (_isRuin && {Tro_DestroyedBuildings_ProjectileHits findIf {_from == _x#1 && {time - _x#0 < 0.5}} >= 0}) then {

        [getObjectID _from, player] remoteExecCall ["Tro_fnc_BuildingDestroyedValidator", 2];
        
    };

I don't think this is correct

#

is it?

little raptor
#

should be

#

try without it first

little raptor
#

well unless the time is too short blobdoggoshruggoogly

drifting portal
#

well should I add

Tro_DestroyedBuildings_ProjectileHits = [];

to the end of if statment

little raptor
#

no

drifting portal
#

the array won't overflow?

little raptor
#

you can remove the element tho if you want

little raptor
drifting portal
#

alright

#

let me try alive _hitentity then

#

Same result

#

Indicates 3 buildings

little raptor
#

how many do you record with hitPart?

#

all 5?

drifting portal
#

How do you want me to check that

little raptor
#

add a counter...

#

or remove or comment out the select part

#

then count the array

drifting portal
#

127

#
Tro_DestroyedBuildings_Player_ProjectileHitPartEH = _projectile addEventHandler ["HitPart", { 
    params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
    if (alive _hitEntity) then {
        Tro_DestroyedBuildings_DebugCounter = Tro_DestroyedBuildings_DebugCounter + 1;
        Tro_DestroyedBuildings_ProjectileHits = Tro_DestroyedBuildings_ProjectileHits select {time - _x#0 < 0.5};
        Tro_DestroyedBuildings_ProjectileHits pushBack [time, _hitEntity];
    };
}];

Tro_DestroyedBuildings_DebugCounter returns 127

little raptor
drifting portal
#
Tro_DestroyedBuildings_Player_BuildingChangedEH = addMissionEventHandler ["BuildingChanged", {
    params ["_from", "_to", "_isRuin"];

    Tro_DestroyedBuildings_DebugCounter = Tro_DestroyedBuildings_DebugCounter + 1;

    if (_isRuin && {Tro_DestroyedBuildings_ProjectileHits findIf {_from == _x#1 && {time - _x#0 < 0.5}} >= 0}) then {

        [getObjectID _from, player] remoteExecCall ["Tro_fnc_BuildingDestroyedValidator", 2];

    };

}];
south swan
#

Takistan? As in CUP? I remember seeing some pretty shaky building models/classes there meowsweats

little raptor
drifting portal
little raptor
#

or Tro_DestroyedBuildings_DebugCounter = Tro_DestroyedBuildings_DebugCounter + parseNumber _isRuin; πŸ˜…

drifting portal
#

7

#

it returns 7

little raptor
#

and you destroyed 7?

drifting portal
#

validator says 3

south swan
#

like, the first two buildings i've demolished caused the "BuildingChanged" to fire with "_isRuin" set to false

#

on CUP Taki right now

little raptor
#

yeah imo it's probably better to check alive @drifting portal

drifting portal
#

well

#

I'm testing all of the previous numbers I gave with

Tro_DestroyedBuildings_Player_ProjectileHitPartEH = _projectile addEventHandler ["HitPart", { 
    params ["_projectile", "_hitEntity", "_projectileOwner", "_pos", "_velocity", "_normal", "_component", "_radius" ,"_surfaceType"];
    if (alive _hitEntity) then {
        Tro_DestroyedBuildings_ProjectileHits = Tro_DestroyedBuildings_ProjectileHits select {time - _x#0 < 0.5};
        Tro_DestroyedBuildings_ProjectileHits pushBack [time, _hitEntity];
    };
}];
#

quite the shocker honestly

south swan
#

and both say that alive is true meowsweats

drifting portal
#

because I haven't done that

little raptor
drifting portal
south swan
#

okay, i stand corrected. 1 of those 2 actually had another level of destruction that fires "BuildingChanged" with "_isRuin" set to true.~~ But another one doesn't ~~meowsweats

drifting portal
#

wait i frogot the !

#

oof

south swan
#

and, for the extra clarity, the last test was done with cursorObject setDamage 1 meowsweats

little raptor
#

btw did you guys know that when you destroy a building it just sinks into the ground and the ruin is created on top? meowsweats

#

so the original building is still there

south swan
#

the one that says _isRuin == true does. It just had a very damaged intermediate state that wasn't yet a ruin meowsweats

#

okay i stay even more corrected. Repeated setDamage 1-ing of the second one managed to produce a proper ruin too meowsweats

drifting portal
#

alright now its saying 7 despite me seeing only 6 destroyed so

#

is there a way

#

to get an object using objectid

#

so i can teleport my camera to every building and check?

little raptor
drifting portal
#

well

#

I guess the reason I can't see the 7th object

#

is because it sank

#

without leaving ruins

south swan
#

ye some of the do that

#

like, the "BuildingChanged" explicitly states that "_to" is "objNull"

drifting portal
#

yeah but it gets assigned the object id again I think

#

well I guess the system that we came up with last is the best

#

this system gave me a headache a year ago in 2.02, we were never able to do it here in the scripting channel, thanks for the projectile eventhandlers lol
Many thanks to everyone who helped

elfin comet
#

Is there a command that returns the number of occupants of a vehicle?

drifting portal
#

Then count on the array it returns

elfin comet
#

Nice

copper raven
#

just hack by adding a dummy element and seeing if count changes or not in both 🀣

south swan
#

inb4 two checks in the racing threads happen at the same time

copper raven
#

well obv dont use sched code for it

elfin comet
# elfin comet It's cool that `lockTurret` does what I want (you know, locking turrets and such...

With regards to this, I did check my turret paths (0 is Co-Pilot, 1 & 2 are the left and right door gunners). As I understand it, a vehicle is local to the driver. I have an AI pilot in the helicopter so that leads me to think that I just run it on the server and it should be golden.

Does locality of a vehicle change when a player gets into the cargo of a vehicle and if so, how do I keep the doors locked when someone gets in?

This is what I have running in a script dedicated to operating the AI pilots and their helicopter.

(vehicle leader _heliGroup) lockTurret [0, true];
(vehicle leader _heliGroup) lockTurret [1, true];
(vehicle leader _heliGroup) lockTurret [2, true];
(vehicle leader _heliGroup) lockDriver true;```
little raptor
#

Does locality of a vehicle change when a player gets into the cargo of a vehicle and if so, how do I keep the doors locked when someone gets in?
afaik yes. but the command has global effect so you don't need to do anything

elfin comet
#

So then why would people still be able to swap to gunner positions despite locking them with a command that has a global effect?

little raptor
#

does lockturret even prevent switching seats?

#

test in single player

#

pretty sure it doesn't

elfin comet
little raptor
#

why would people still be able to swap to gunner positions
however way you got that blobdoggoshruggoogly

meager granite
still forum
#

I think that would give it the same meaning as it has in javascript right?

meager granite
#

Oh wait, true, it does check if its the same reference for arrays in JS

#

So if SQF allows such name then why not

#

Just thought about another name for the command isEqualRef

#

to be in line with isEqualTo

#

Though 2 === 2 => true in JS, while it would be false in SQF

still forum
#

isEqualRef or isSameRef, KK now added isSameAs

#

I guess isEqualRef fits best into our current set

meager granite
#

isSameAs sounds too much like isEqualsTo to me

copper raven
#

referenceEquals πŸ˜„

little raptor
elfin comet
# little raptor pretty sure it doesn't

Well, I don't have that answer, but I did get it working.

Turns out the question using thing lockTurret [0, true] or thing lockTurret [[0], true] has only one right answer.

#

With the second one, I can't swap into the turret from cargo.

copper raven
#

the first one is not valid

#

it takes an array, not number as turret

little raptor
#

yeah turret paths are always array

wind hedge
#

Do you guys think this (disabling collision of all vehicles with the dead body) could mitigate the "Touching dead bodies launches vehicles into space in MP bug"? ---> ```sqf
addMissionEventHandler ["EntityKilled", {
params ["_unit", "_killer", "_instigator", "_useEffects"];

{[_x, _unit] remoteExecCall ["disableCollisionWith", 0, _x];} forEach vehicles;

}]; ``` Or would it be better to do it the other way around and disable the body's collision with the vehicles?

little raptor
wind hedge
little raptor
#

not that part

#

units are not PhysX anyway

wind hedge
#

I don't get why that wouldn't work then but if you say it won't it is enough for me... I have noticed that using the setUnconcious true command makes units fall though objects as if they lost their collision with everything... perhaps uncouncious units do not cause the bug I am trying to mitigate so instead of allowing units to die I just make them unconcious and after the player is away I turn the bodies into agents with a dead animation rather than units... that might work for the intended purposes?

little raptor
#

I don't get why that wouldn't work

wind hedge
#

ohhhh

little raptor
#

yes, but it would only work for 1 dead unit

wind hedge
#

the cero... I need to change that to _X right

wind hedge
# little raptor yes, but it would only work for 1 dead unit

Since the command is run from a mission EH... on each death it would be disabling the collision of each vehicle with the dead unit that triggered the EH... but each dead unit would be different. The reference you mentioned from the wiki refers to not having the reference to the SAME object more than once

hallow mortar
#

It actually means that it can't reference more than one object at a time. The wording's just a little off.

wind hedge
#

Weird

hallow mortar
#

You can sort of disable it with multiple objects if those other objects contain the reference. But then those other objects can't themselves reference multiple objects, so you can't, like, create a mesh out of it

wind hedge
#

We need a command that does what the hideObjectGlobal does but without hiding the object's model and texture... hideCollisionGlobal

open hollow
#

Can we have an terrain edited EH in the future? meowheart

hallow mortar
#

Those both sound like good candidates for FT tickets (there might already be one requesting global collision disable, check first)

little raptor
wind hedge
digital jacinth
#

is it possible to get some more info about setTerrainHeight and the jip queue?

the second example details only an array of arrays of the same size.
Can it be done by adding one more entry every time you use setTerrainHeight. meaning each time you call that command on server the same array + extra content is being applied

little raptor
#

I think not. but only Dedmen would know

digital jacinth
#

i was hoping he would see this, cannot ping tho

coarse dragon
#

anyone know of a good script that will make units garrison buildings?

little raptor
#

or tells them to move into buildings?

coarse dragon
#

automatically and makes em hold there positions

little raptor
#

that's easy. I can write one for you

coarse dragon
#

oh thanks πŸ™‚

little raptor
# coarse dragon oh thanks πŸ™‚
/*
    how to use:
    [obj, classNames] execVM "garrison.sqf";
    
    example:
    
    [
        this,
        ["B_soldier_F", "B_soldier_GL_F"]
    ] execVM "garrison.sqf";
*/

if (!isServer) exitWith {};

params [["_building", objNull, [objNull]], ["_classNames", [], [[]]]];

private _first = _classNames param [0, "B_soldier_F"];

private _side = [east, west, resistance, civilian] select getNumber (configFile >> "CfgVehicles" >> _first >> "side");

private _group = createGroup _side;

_classNames pushBackUnique _first;

{
    private _unit = _group createUnit [selectRandom _classNames, _x, [], 0, "NONE"];
    _unit setPosASL AGLToASL _x;
    doStop _unit;
    _unit setDir random 360;
} forEach (_building buildingPos -1)
#

I didn't test it so if it doesn't work let me know

#

put it in a file called garrison.sqf and put it in the mission folder

#

then put this in the init of the building you want to garrison:

[
        this,
        ["B_soldier_F", "B_soldier_GL_F"]
] execVM "garrison.sqf";
#

you can add whatever classnames you want

#

the above example adds NATO rifleman and grenadiers randomly

still forum
digital jacinth
#

meaning if I set the terrain with one position

then next time set it with 2 positions but the first (or second) is the same, even with the same height it will work and jip queue will only have the latest one?

still forum
#

no

#

as I said, they need to be the same

#

adding one, means they are not the same

digital jacinth
#

shit, oh well. then there is no way of optimizing the jip queue for artillery splashes...

still forum
#

You could edit a bigger area, hoping that future hits land inside the area and you being able to keep it in one batch

#

not sure if editing heights to unchanged values is optimized in code, probably not

digital jacinth
#

that would be a lot of positions tho

willow hound
#

You can remove entries from the JIP queue, but I have a feeling that the overhead of deciding which entries to remove / replace / modify is going to make this impractical.

dreamy kestrel
#

Q: re: "HandleDamage" event handler. difference between _source and _instigator? IIRC, sometimes you may want/need to do vehicle _instigator, i.e. when the trigger man is in a vehicle? But is that source or instigator? I'm not sure which... thanks...

winter rose
open hollow
digital jacinth
#

No reference to the jip queue else i would have looked into that as well somehow

still forum
winter rose
#

because a solid no is better than ghosting πŸ˜›

open hollow
dreamy kestrel
dreamy kestrel
open fractal
#

if it's a unit with a rifle both will be the unit

winter rose
#

^

dreamy kestrel
winter rose
#

if in doubt, try πŸ˜‰

copper raven
#

server cfg

#

voteThreshold

hallow mortar
#

#server_admins and no, it's server.cfg. If your server.cfg doesn't have that line just add it

manic sigil
#

Checking my thoughts; if a trigger is set to repeatable, it can run a new instance of its onAct for every condition event, correct?

winter rose
#

if it deactivates in-between, it will fire onAct

#

(no idea what "new instance of onAct" means 😬 😁)

manic sigil
#

I suppose thats a better way of putting it, would it run its onAct each time the condition occurs... hrm.

I have a server-created, global-flagged trigger detecting allPlayers for anyone that has a variable set on them (the Mike Force incapacitated variable), then passes the same search to a function. While it works, I havent tested yet for 'what if multiple players get shot at the same time'.

winter rose
#

…no idea what it all means sorry

manic sigil
#

XP fair. I think I just need to add a variable flip so the trigger deactivates after calling the function, ready for the next player to get wounded.

winter rose
#

…or not use triggers?

manic sigil
#

Oh? What do you have in mind?

winter rose
#

scripting

#

first: what is your goal
(not "what do you want to write in script", what is your end goal, what is the feature for which you aim)

manic sigil
#

Fair enough, god knows Im usually the one asking that question :p right, so...

In SOGPFs Mike Force scenario, they have a variable on each player that flips when you are knocked out, doing their whole custom bleedout thing.

The trigger I have right now takes every player with that trigger set true (knocked out), and passes them to the function, which checks if they are in a vehicle, if any of their AI teammates are in the vehicle with them and not knocked out themselves, and finally selects the next one that qualifies, has them yell 'Im taking the wheel!', then knocks that AI out while restoring the player - a sloppy 'they take over' without mucking around with making them playable and forcing the player to swap around seats, but quite handy if you can think of your squadmates as ablative armor.

It functions fine, though the groupChat isnt being called on the players side so it needs a little touch up, but when my group tested it kept a few helicopters airborne after getting the cockpit ventilated.

The trouble is, the trigger activates when a player is shot, but I have about fiveish seconds of sleep before they get restored (for gameplay purposes), where the trigger would still - I suppose - be activated and unable to fire again if anyone else gets wounded.

winter rose
#

that's… not exactly what I asked? :p

so:
you want to catch when a unit is knocked out, and send that info to a function somewhere and do other stuff :D

your issue is:
you can only catch one of them and don't know if the trigger is triggering on another (close in time) knockout

#

my question is:
does SOGPF not provide a scripted event handler for their "knockout" event?

manic sigil
#

Might do, but Im trying to develop this whole project as an addon that can work alone, not a fork of the scenario.

Though if I could find it, I could stack on it, yeah.

winter rose
#

you are using their variable, sooo

#

when I say "scripted event handler", I mean this BIS_fnc_addScriptedEventHandler

manic sigil
#

Yeah, had to use that on their custom melee EH so my tools could move structures. Im digging through the files, but not sure where they put the incapacitated script. Or how it functions, exactly, just that if true, bleedout, if false, full health and get up.

winter rose
#

they have a wiki, maybe they documented it

manic sigil
#

I suppose I could fit it into a onHit EH; its already spawned code, adding a one second delay to check if the variable has been set wouldnt hurt. At least, not hurt to script, cant say anything about performance.

manic sigil
#

... because they sure wont get hit more than once in a one second span of time πŸ™ƒ

winter rose
#

PS: that would be one thread per unit per hit and it would be very bad, really

manic sigil
#

Yeahhh, thought it through a little further :p

GetIn EH - spawn {waitUntil (sleep 1 player variable) ...}?

#

GetInMan, w/e

#

With some choice exit clauses for getting out of a vehicle, so the spawned script doesnt get stacked.

copper raven
manic sigil
#

Likely; I got a tip from their discord, but Ill have to wait a few days before I can get back on my computer with some free time to explore it further.

digital torrent
#

Is there a method to mix vehicle turret?
such as, if i want to put a slammer up turret on a madrid, is it possible other than using the attachto?

sharp grotto
digital torrent
sharp grotto
#

Not possible....

misty epoch
#

Got a question regarding the getPos wiki, specifically this bit:

the commonly misused code: _obj1 setPos getPos _obj2 is absolutely wrong
The only correct usage of this command is to determine the altitude of an object from the surface below it
May I ask why it's "absolutely wrong"?
And why it "only" has one "correct" use?

hallow mortar
#

It's slower, and the position format it returns is not consistently the same as the format used by any setPos command, including setPos (see the setPos page). This can lead to objects being misplaced.

misty epoch
#

the position format it returns is not consistently the same as the format used by any setPos
I have never seen this been the case? I know getPos is slower than other commands but to say that something is absolutely wrong and only as 1 use seems like a stretch personally.

granite sky
#

What else do you think you should use it for?

misty epoch
#

As in what other case could getPos be used?

granite sky
#

Where getPosATL isn't superior, yes.

misty epoch
#

If you're talking in terms of superiority vs another command then there isn't a great use in which it is superior (exception being the one mentioned)

#

I'm not comparing it to other commands though, simply wondering why the language in the wiki is as strong as it is.

granite sky
#

Because too many people default to setPos and either hurt themselves unnecessarily on perf or store up bugs.

misty epoch
hallow mortar
#

If you know exactly the command's limitations and how to avoid them, or are simply very lucky, you can use it and it will work (but slower).
However, many people who read the wiki are beginners who don't have the background understanding needed, and relying on luck is bad practice. So, the heavy warning, so people don't try it, find it "works", and form a bad habit they will regret later (but not before teaching it to other people)

hallow mortar
# misty epoch > the position format it returns is not consistently the same as the format used...

As described on the setPos page, the format it uses varies between the getPos format and a different one based on a frankly horrifying condition. Meanwhile, the getPos format does correspond to the formats used by the other setPos commands.....sometimes. The conditions in which it doesn't match can't be relied on to always be true or false in a live mission, and it's better to use one of the more predictable - and faster - matching getters.

misty epoch
#

Maybe I'm weird (well I know I am) but to me having the getPos wiki say - "The code _obj1 setPos getPos _obj2 is often misused to place objects at another objects position which can lead to placement issues in some edge cases (eg. over water). Using the other position commands [links to the "positions" command group] such as getPosASL is the correct way to handle these cases" - or similar such explanation would be a better approach than the current entry (although it would be longer) as it explains a typical case (placement over water) and why getPos would not work while also offering a solution and other commands.

Maybe my first message was unclear (re-reading it, it was unclear) but I'm not arguing for/against getPos but rather in clarity and expansion of the wiki to further explain the "why" behind it's statements. "is absolutely wrong" and "it is not the optimal way to approach this, here's an example and other commands" read differently.

hallow mortar
#

The thing is that "it's not optimal" leads to "oh well I'll just leave it in for now, what harm can it do", while "DO NOT USE THIS" leads to people not using it. Well, mostly. It's better to put a hard stop to it before it bleeds in (and brings its worse performance with it).

misty epoch
#

But saying "DO NOT USE THIS" also causes people to not understand the "why" behind not using it, they just don't use it

#

It's similar to tossing code at people vs walking them through writing the code themselves and the reasons behind each bit.

hallow mortar
#

Teaching the principles behind what code does is good and useful because you want them to use those principles later on their own. In this case, however, it doesn't really matter why, because we want them to not use it later on their own. Even when you understand why, you still shouldn't use it.
Incidentally, the information on why does exist and can be figured out once you understand the principles behind the commands you should use. It's just not described there, presumably to avoid confusing the issue.

misty epoch
#

I get where your coming from, maybe I'm overthinking it or coming at it from a different view than normal

#

Granted I also have a 100 line function with 40 lines of comments so maybe I'm just weird and like over-explaining things lol

open fractal
#

saying "DO NOT USE THIS" also causes people to not understand the "why" behind not using it
the wiki says why...?

#

it doesn't match up with other position commands

#

and it's slower to boot

misty epoch
hallow mortar
#

getPos has been a recurring problem for a very long time and the wiki page has been through several iterations trying to get people to not use it. It's possible it could still be improved in some ways, but an unambiguous "do not use this" is necessary. Weaker warnings, or warnings long enough to encourage skipping, lead to people thinking they can safely ignore it and continuing the problem, which leads to worse-performing scripts, potential breakages, etc. I'd even argue that a warning that "forces" people to go look up getPosASL and getPosATL and understand the difference is more educational than letting them continue using the "easy" getPos.

copper raven
#

it has its use cases

#

for most part, you shouldn't need to use it

copper raven
copper raven
pulsar bluff
#

does origin getPos [distance, heading] syntax also suffer

polar belfry
#

I want to make a mission where my players are not targeted by the ai if they are over a certain altitude. is there a way to achieve this in arma

#

I'll do it with trigger

#

and objectparent

#

is there a variable for altitude for trigger conditions

manic sigil
polar belfry
#

think something like reverse ravine mission like an ace combat canyon mission but inverse

#

they must stay over a certain altitude

#

they will be in a civilian cessna

#

so I'm not afraid of them abusing it to strike targets

#

I have the objectparent check

#

the altitude one is missing

manic sigil
#

Create a trigger, condition

( getposatl cessnaNameHere) select 2 < altitudeAboveTerrainLevelYouWantThemToMaintainHere

And onAct, a setFriend switch. Or setCaptive, but im not sure if that propagates from vehicle to passengers.

polar belfry
#

setcaptive

#

so cessnanamehere is the variable name
getposatl is to take the altitude

#

select 2?

manic sigil
#

Getposatl will return x,y,z. Select 2 narrows it to z.

polar belfry
#

hi lou

winter rose
#

hi game

manic sigil
#

Eh, im sure I got something not exactly right, but its hard to check on mobile :p

#

Bluh, i see where i goofed.

polar belfry
#

the parenthesis?

winter rose
#

no, it is getPosATL theObject, not the other way around

polar belfry
#

oh ok just saw it

#

this returns true under a certain altitude

#

the "altitudeAboveTerrainLevelYouWantThemToMaintainHere" is in meters right?

manic sigil
#

Yeah, adjust < >s to taste, and its in meters.

polar belfry
#

thanks

austere pendant
#

Is there any way to hide a vehicles model but still have it function the same way. I've attached a frigate (optre) to a helicopter, and I want to be able to fly it without the helicopter being visible

manic sigil
true frigate
#

Hey, does anyone know why this only lets Speaker1 play the sound? Cheers πŸ™‚

Alarm = true;
while {Alarm == true} do {Speaker1 say3D ["Alarm", 8000, 1, false, 0]; sleep 25.2;};
while {Alarm == true} do {Speaker2 say3D ["Alarm", 8000, 1, false, 0]; sleep 25.2;};
while {Alarm == true} do {Speaker3 say3D ["Alarm", 8000, 1, false, 0]; sleep 25.2;};
warm hedge
#

Because the first while's only doing its job. Rest is suspended because the first is doing still

little raptor
#

In other words you're stuck in the first while

warm hedge
#

To solve you need to include every say3Ds into one while

true frigate
#

Ahhh right, that makes sense. I completely overlooked that haha. Thanks! πŸ™‚

granite sky
past wagon
true frigate
#

Thats what I've got now haha, originally though I'd written sleep after every line, which just caused the same problem lmao

#

Thanks anyway though πŸ™‚

past wagon
#

how do I get the currently entered text in an RscEdit? I can't find any commands for it on the wiki...

granite sky
#

I would guess the general ctrlText.

past wagon
#

ah, that makes sense

#

thanks

past wagon
#

I did, I was just looking for the wrong thing

#

I thought RscEdit would have its own command group πŸ€·β€β™‚οΈ

granite sky
#

RscEdit is just a flavour class for CT_EDIT.

austere pendant
#

Im trying to use Bis unit capture/play. Unit capture works fine and the movement is recorded, I paste the data into the wp1.sqf file but when I got to play I get this error;
'wp1 |/|-;
[heli1, wp1] spawn BIS_Fnc_Unitplay;'
Error GTAS (or 5) pre stack size violation.

#

what does it mean and how do i solve it? (p.s captured movement was about 50 seconds.

open fractal
#

I don't know what causes your error but I can walk you through another method in a minute here

austere pendant
winter rose
open fractal
# austere pendant i'd appreciate taht
_wp1 = parseSimpleArray loadFile "wp1.txt";
[heli1, _wp1] spawn BIS_Fnc_Unitplay;

from here make a file called wp1.txt in your mission root. You can then paste your raw data in this file and hit save without worrying about formatting for the sqf file. The script will load the contents and store it as an array. If you need to optimize later you can always take the data and put it back into the sqf like before. This is slower but easier in my opinion

copper raven
open fractal
austere pendant
open fractal
austere pendant
#

yes i rerecorded then pasted into wp1.text file and copy pasted the script u gave me

#

this is the one in the sqf file

wp1 = parseSimpleArray loadFile "wp1.txt";
[heli1, wp1] spawn BIS_Fnc_Unitplay;

open fractal
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

```sqf
// your code here
hint "good!";
```
↓

// your code here
hint "good!";
open fractal
#

this will highlight your code and spot brackets and stuff

#

but I don't see an issue

austere pendant
#
wp1 = parseSimpleArray loadFile "wp1.txt";
[heli1, wp1] spawn BIS_Fnc_Unitplay;
open fractal
#

what does the rpt say?

austere pendant
#

rpt?

open fractal
#

%localappdata%\Arma 3 paste this in windows explorer and open the .rpt file

wicked roostBOT
#
Arma RPT

Arma generates a .rpt log file each time it's run, which contains a lot of information like the loaded mods, or any errors that appear, this log file can be very useful for troubleshooting problems.

To get to your RPT files press Windows+R and enter %localappdata%/Arma 3

Additionally see the wiki page for more info: https://community.bistudio.com/wiki/Crash_Files

To share an rpt log here, please use a website like https://sqfbin.com/ to upload the full log, that way the people helping you can take a look at it and try to figure out the problem you're having together with you.
Note: RPT logs can hold personal information relevant to your system, the game or others.

austere pendant
open fractal
#

Arma3_x64_2022-08-26_18-14-46.rpt no files named like this?

#

do you have logging disabled?

winter rose
#

(you may not have file extensions displayed)

austere pendant
#

file extensions are displayed

austere pendant
open fractal
#

did you happen to follow an optimization guide at some point that had you disable logging

austere pendant
#

nope

#

ill restart arma and double check

#
17:20:29 Error in expression <wp1 =;
[heli1, wp1] spawn BIS_fnc_Unitplay;>
17:20:29   Error position: <=;
[heli1, wp1] spawn BIS_fnc_Unitplay;>
17:20:29   Error GIAS pre stack size violation
17:21:08 EPE manager release (25|81|0)
17:21:08 Number of actors in scene after release: 25
17:21:08 EPE manager release (0|25|0)
#

I believe this is the error related to the script

winter rose
#

seems to happen when there is a mistake in unscheduled environment
can you retry with this please?

0 spawn {
  private _wp1 = parseSimpleArray loadFile "wp1.txt";
  [heli1, _wp1] spawn BIS_Fnc_Unitplay;
};
austere pendant
#

Exact same error

winter rose
#

c/p it here please?

#

so please c/p the error here (really)

and after that, try```sqf
0 spawn {
private _wp1 = parseSimpleArray loadFile "wp1.txt";
};

austere pendant
#
7:28:10 Warning Message: '/' is not a value
17:28:17 [CBA] (optics) INFO: Scripted camera restarted.
17:28:21 Error in expression <wp1 =;
[heli1, wp1] spawn BIS_fnc_Unitplay;>
17:28:21   Error position: <=;
[heli1, wp1] spawn BIS_fnc_Unitplay;>
17:28:21   Error GIAS pre stack size violation
17:28:52 EPE manager release (20|140|0)
17:28:52 Number of actors in scene after release: 20
17:28:52 EPE manager release (0|20|0)
17:28:56 Link to 8e04a889 (Obj-149,112:137) not released
17:28:56 Link to 9d243ed7 (Obj-135,233:1751) not released
17:28:56 Link to 9d2436ea (Obj-134,233:1770) not released
17:28:56 Link to 9aa1f187 (Obj-62,213:391) not released
17:28:56 Link to 99c5c134 (Obj-184,206:308) not released
17:28:56 Link to 9905c345 (Obj-184,200:837) not released
17:28:56 Link to 94c5030c (Obj-160,166:780) not released
17:28:56 Link to 94a503d8 (Obj-160,165:984) not released
17:28:56 Link to 948240ee (Obj-72,164:238) not released
17:28:56 Link to 946224f5 (Obj-68,163:1269) not released
17:28:56 Link to 91a52a2e (Obj-165,141:558) not released
17:28:56 Link to 91851a31 (Obj-163,140:561) not released
17:28:58 No more slot to add connection at 023022 (2368.9,2201.0)
winter rose
#

yep, you are not running the _wp1 code

austere pendant
#

lemme try again

winter rose
#

eventually, do it on an empty mission to start from scratch

upper siren
#

question about BIS_fnc_initVehicle, is there anything like it that takes global arguments?

I really don't wanna rewrite my whole EH just because that one function needs to be local

austere pendant
#

different error this time

17:37:55 Unknown attribute itemsCmd
17:37:55 Unknown attribute itemsCmd
17:37:59 Error in expression <0 spawn {
private _wp1 = parseSimpleArray loadFile "wp1.txt";
[he>
17:37:59   Error position: <parseSimpleArray loadFile "wp1.txt";
[he>
17:37:59   Error Generic error in expression
winter rose
#

oh
is remoteExec a thing you heard before? πŸ˜„

upper siren
#

but that means I have to learn

winter rose
austere pendant
#

yes

winter rose
#

please send it to me in DMs

upper siren
winter rose
#

@austere pendant name your file wp1.txt

#

not wp1.sqf

open fractal
#

they're both called wp1 i think

#

(they don't need to be)

austere pendant
#

theres a wp1.txt and sqf

winter rose
#

first char: `

#

@austere pendant

austere pendant
#

`

#

that

#

at the begnining

winter rose
#

remove that from the txt file......................................................

#

or suffer my wrath! have a nice day 😬 πŸ˜„

austere pendant
#

so the entire script was broken cause of a single `

winter rose
#

the script was good, the data not
if a file is not in the expected format, yes, it breaks the whole chain

austere pendant
#

well, ima go crash a frigate into the ocean, thank you very much for your assistance

sharp grotto
#

A single misplaced , or ; can break your whole server/mission πŸ˜†

winter rose
#

initServer,sqf

sharp grotto
#

It's even better when you copy code from somewhere (Bi forums for example) and there is a invisible symbol that breaks everything notlikemeowcry

winter rose
#

" " much? 😁
this is why I set an invalid character spotter in the SQF highlighter yeah :D

#

that or weird quote signs too

#
hint β€œerror”;
#

I am sad it has come to this but I realise I have to say it: don't code in Word, thank you

winter rose
#

I'm afraid I have to ban you after this
no hard feelings though

austere pendant
#

plz no

#

πŸͺ i give cookie if no ban

winter rose
#

!burgerpan @austere pendant 0 speaking heresy
*nomnoming the cookie dough though*

#

but for real, I recommend Visual Studio Code with the SQF plugin πŸ˜‰

austere pendant
#

I got a question, now that I know how to do this script with one unit, I want to have two units with two seperate movements. How do I get two vehicles to begin movin on the activation of 1 trigger

winter rose
#
[heli1, parseSimpleArray loadFile "wp1.txt"] spawn BIS_fnc_UnitPlay;
[heli2, parseSimpleArray loadFile "wp2.txt"] spawn BIS_fnc_UnitPlay;
past wagon
#
_num = selectRandom [1,2,3,4,5];
player addEventHandler ["Killed", {
  systemChat str _num;
}];
```Would `_num` still be defined inside the EH?
distant egret
#

no

past wagon
#

how can I pass it, then?

distant egret
#

global variable, setVariable on player to name a few.

past wagon
#

hmm

#

ok

true frigate
#

Sorry for the easily findable question, but would this work for every player on a dedicated server when called with remoteExec? Or do I have to add something like foreach allplayers; My testing one is currently in use, otherwise I'd be able to test it myself πŸ˜…

"colorCorrections" ppEffectEnable true; 
"colorCorrections" ppEffectAdjust [0.8, 1, 0.1, [0.0, 0.0, 0.0, 0.0], [3.0, 0.1, 0.1, 0.55],  [0.2, 0.5, 0.2, 0.0]];   
"colorCorrections" ppEffectCommit 0;```
#

I was looking at the wiki post processing effects, but I couldn't find if it said it was local or global

open fractal
#

you should never have to loop it

#

just remoteExec your function and you're good

true frigate
#

Alright, awesome. Thanks πŸ™‚

open fractal
#

i.e. ```sqf
player addEventHandler ["PostReset", {"colorCorrections" ppEffectEnable true}];

#

i would actually like some closure on this

coarse dragon
#
[spawn] {
bill sideChat "Ah good to meet you, im the commander of the UN troops stationed here on Altis"; 
sleep 2; 
me sidechat "Thank you sir"; 
sleep 3; 
bill sidechat "UN troops along with Greek troops are moving into a town to fully secure it."; 
sleep 4; 
bill sidechat "We need you to observe the operation and make a report on the civillains living conditions"; 
sleep 4; 
bill sidechat "We arnt expecting trouble so this should be a easy one for you"; 
sleep 3; 
me sidechat "Ha nothing  is easy in this line of work"; 
sleep 4; 
bill sidechat "that is true. Good luck" ;};

i swear this code hates me.. it never friggin works

granite sky
#

ITYM [] spawn {

coarse dragon
#

arhhhh im dumb thanks

boreal parcel
#

heyo, so I have this addaction:

_crate addaction ["Arsenal", {[player, player, true] call ace_arsenal_fnc_openBox}];

and I also have an array of items I want added to it. Can anyone tell me how I would do this?
I know normally I could do

[_box, ["MyItem1", "MyItem2", "MyItemN"]] call ace_arsenal_fnc_initBox

but I want it as an addaction rather than an ace interaction

ocean folio
#

bit of a theory question. I have a repeatable trigger that starts a loop when players enter, and stops the loop when they leave. Would it be better to suspend the loop until the trigger conditions are met (waitUntil inside the loop) or to just kill the looped script and run it again when the trigger is activated again

#

I guess that question doesnt really have a definitive answer

winter rose
#

triggers are evil
kill them with fire

#

that's the definitive answer

ocean folio
#

what makes triggers evil? the performance cost?

winter rose
#

waitUntil inside the loop
can't wait anything inside a loop.

ocean folio
#

it would be waiting on a variable to change from outside the loop

winter rose
#

if you spawn code then

ocean folio
#

yeah, it would be spawned

winter rose
#

basically, either keep one thread alive and checking with a global variable,
or creating/deleting the thread on need/disposal

cosmic lichen
#

why create a loop inside a loop if both are waiting more or less for the same thing.

#

And triggers are not generally bad. It depends on the complexity of the condition.

ocean folio
#

any player present?

cosmic lichen
#

That's it?

ocean folio
#

yup

#

all I care about is if the players walk in

cosmic lichen
#

you can create 500 of those and won't notice it

ocean folio
#

or out

winter rose
cosmic lichen
#

No, you mean truckers

#

not triggers

winter rose
#

oh

cosmic lichen
#

and truckers usually have big horns

ocean folio
#
_trg setTriggerActivation ["ANY", "PRESENT", true];
_trg setTriggerStatements ["this", "systemChat 'on'", "systemChat 'off'"];    
winter rose
#

honk honk

winter rose
cosmic lichen
#

I read that wrong the first try, what do I win

ocean folio
#

can I pass the trigger object into the onActivation code?

#

in the same way that _thisList exists?

winter rose
boreal parcel
# open fractal check their documentation

I did, and I seen the mention of virtual items like so but when I try to access it I get no vitrual items

[_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_addVirtualItems
winter rose
ocean folio
#

ah yes, I'm used to this from init fields and _this from.... some sqf stuff that I cant even remember

#

unless _this is just a local version of this

winter rose
#

it's… complicated

cosmic lichen
#

no you!!11

#

This has all the info

ocean folio
#

wait a second, _this is pointless? Cant you just use params instead?

winter rose
winter rose
ocean folio
#

instead of variable = _this select #

winter rose
#

yyyup, this is obsolete for a while now πŸ™‚

#

it also privates your variables properly (and forces you to use local _var)

ocean folio
#

sometimes I regret learning from reverse engineering, because I have come out with a lot of depreciated methods and skills

#

slowly bringing my knowledge up to date, but I learned a lot of old things

winter rose
ocean folio
#

one thing the wiki doesnt mention, are the onActivation and onDeactivation fields of a trigger scheduled or unscheduled?

winter rose
ocean folio
#

oh, I might just be blind

ocean folio
#

oh. I was looking at the trigger page meowsweats

open fractal
boreal parcel
boreal parcel
#

thank you

vocal heath
#

What explains this logic?:
I am sitting in a vehicle.
In debug watch window:

input : player
output: B Alpha 1-1:1 (JAMESON)

input : vehicle player
output: B Alpha 1-1:1 (JAMESON)

input : (vehicle player == player)
output: false
winter rose
#

sorcery, of course

#

What explains this logic?
the "toString" returns the effective commander of a vehicle.

open fractal
#

what you're seeing is the output string for player and vehicle player so there may be a uh yeah what he said

winter rose
#

(if it has no vehicle var name)

vocal heath
#

thanks... This was actually an unexpected side mission to my real goal: How do I get the specific type of vehicle that I am sitting in. I thought "vehicle player" would do that, but the result is weird. Specifically I want to get a true/false answer to the question: Am I in the pilot seat of an AH-9 Pawnee?

vocal heath
#

thanks for the direction 🀩

vocal heath
#

Got my thing working! Thanks again. Here's the top of it:

_in_veh    = typeof vehicle player in _veh_list;
_is_pilot  = driver vehicle player isEqualTo player;
if (_in_veh && _is_pilot) then {```
pulsar bluff
#

there is also a β€œcurrentPilot” command

winter rose
#

it concerns pilot/copilot, not the driver seat itself then.

pulsar bluff
#

ah

meager granite
#

I assume there is no way to localize custom radio channel labels with radioChannelCreate or radioChannelSetLabel commands?

meager granite
#

Yes, doesn't work, strings starting with STR_ don't work either

#

radioChannelSetLabel is global even for clients

#

I guess I'm out of luck

copper raven
meager granite
#

Global too

copper raven
#

yeah but it supports localized text, which i assume would be localized locally

meager granite
#

Oh, true, lemme check

#

Well, its something, the channel name in bottom left still can't be localised though.

meager granite
#

Yeah, could work too

copper raven
#

idd is 63 for the channel, not sure about idc

meager granite
copper raven
# meager granite Yeah, could work too
fn_onChannelChanged = {
    addMissionEventHandler ["EachFrame", {
        if (_thisArgs # 0 != diag_frameNo) exitWith {};
        removeMissionEventHandler ["EachFrame", _thisEventHandler];
        if (currentChannel <= 5) exitWith {}; // skip default channels
        private _translation = "blabla";
        findDisplay 63 displayCtrl 101 ctrlSetText _translation;
    }, [diag_frameNo + 2]]
};

addUserActionEventHandler ["PrevChannel", "Activate", {
    call fn_onChannelChanged;
}];

addUserActionEventHandler ["NextChannel", "Activate", {
    call fn_onChannelChanged;
}];

works fine, just have to do it a frame or two later, currentChannel is too early in the EH

meager granite
#

Thanks!

exotic flame
#

I havea question: is there a command to place an object on top of another ? I you use attachTo to carry an object and use detach to drop it you most likely have to use setPosAGL to place it on the ground because the physic doesn't ork properly. For example, if i drop an object over a table, i want to be able to detect the table place this object on the table and not on the ground

unique sundial
#

setVehiclePosition

exotic flame
# unique sundial setVehiclePosition

But how can i detect where the top of the table is to place the object directly on the table ? I would need to detect if there is the roadway of this table to place my object on it

unique sundial
#

give position above table it should place it on top.

#

if doesn’t work for some reason then you can always use lineIntersectsSurfaces to find top surface

coarse dragon
#
[bomber, ["vn_bomb_500_blu1b_fb_ammo"], 6] call vn_ms_fnc_casAirstrike;

Anyone know if that code will work?

coarse dragon
#

oh dang thats a SOG code, is there a none sog way?

manic sigil
#

Vanilla function, works beautifully - though you dont get a flyover unless you really script in your own. Ive done it before, its not difficult, but it is a lot of trial and error to line things up.

#

Feels good when a helicopter unleashes a CnC: Generals style Rocket Barrage, tho.

coarse dragon
#

Fab 500 m62.. I'll be in the config viewer for awhile

manic sigil
#

Well yeah, thats also a SOGPF projectile :p the vanilla fnc should still work I think, but dont quote me on that.

lime frigate
#

Hey there, bit of a weird one.

I have an arsenal on which I'm using ace arsenal. I want to add an action that takes whatever is in the inventory of the arsenal and adds it to the ace arsenal.

Essentially populating the ["item1", "item2", "item3"] bit of this code with the inventory of the arsenal.

[_box, ["item1", "item2", "itemN"]] call ace_arsenal_fnc_addVirtualItems

Any help would be appreciated, thanks

lime frigate
#

This is what I'm currently trying but it doesn't seem to be working

[this, ["Add inventory Ace Arsenal",{[acearsenal, {ItemCargo acearsenal}] call ace_arsenal_fnc_addVirtualItems},nil,9,true,false,"","(side player == Civilian)"]] remoteExec ["addAction", -2];
coarse dragon
#
[jet, "rhs_mag_fab500_m54_bd3_umk2a"] call BIS_fnc_fire;

i assume that that mag name is wrong?

south swan
#

Syntax: [entity, muzzle, turret] call BIS_fnc_fire the function doesn't take a mag name at all

coarse dragon
#

Ep what's it take?

south swan
#

muzzle. "rhs_weap_fab500" for the RHS FAB-500's, it seems

coarse dragon
south swan
# lime frigate This is what I'm currently trying but it doesn't seem to be working ``` [this, ...

blobdoggoshruggoogly

this addAction ["Add inventory Ace Arsenal",{[acearsenal, ItemCargo acearsenal] call ace_arsenal_fnc_addVirtualItems},nil,9,true,false,"","(side player == Civilian)"];```
You don't need curly brackets on `{ItemCargo acearsenal}`, just `ItemCargo acearsenal` gets executed/calculated as is and its return value gets passed to `ace_arsenal_fnc_addVirtualItems`
And you don't need remoteExec at all. At least if you're using this code in the Init field in the editor, because the contents of Init are executed on every client anyways. And if you use remoteExec in the way you've written - every new client connecting would run it and add another copy of action to everybody on the server. And If you don't use the Init field - then i doubt `this` in the beginning would work.
lime frigate
#

is there a way to get a flat array of all items a unit is carrying, a bit like getUnitLoadout but not sorted into categories?

little raptor
south swan
lime frigate
south swan
#

ye, 2,524 pages in category "Arma 3: Scripting Commands". On one hand you're not likely to remember them all. On the other hand the chance of any english word being a command is pretty high :3

lime frigate
#

It's also that while I have programming experience, I have very little game engine (if the editor can be considered such a thing) scripting experience, it's often that I know what I want to do and the kind of functions I'd need to be using, just not what they're called or how they all work exactly

proven charm
#

anyone know why my image can be loaded in GUI but not as marker? when I try to make it a marker the color changes

#

i have color[] = {1,1,1,1}; in the marker config

little raptor
#

can not be loaded as marker
the color changes
so which one is it?

proven charm
#

both

#

as marker the color changes...

#

as GUI control its ok

little raptor
proven charm
#

i meant can be made as marker but not working 100% correctly

#

could have been more clear about that one πŸ™„

proven charm
#

nvm had line that changed the color 😬

drifting portal
#

addcamshake doesn't work with cameras created with camCreate ?

unique sundial
#

just shake it with setpos

true frigate
#

Quick one, I'm using s1 action ["Surrender", s1];, is there a way of cancelling this after a certain amount of time? I've tried removeAllActions but I think that only works for scroll wheel actions. If someone knows how to make them exit the surrendered state, it would help a load! Thanks πŸ˜„

hallow mortar
#

You could try:
action "None"
action ""
action "Surrender" again
action "CancelAction"

true frigate
#

Thanks for the suggestions but it doesn't look like its working sadly :/

#

Looking at "CancelAction", I'm not too sure why it wouldn't work, it says that the unit will finish anim without performing the action. Is surrender an infinite animation or something? πŸ˜„

little raptor
#

try

s1 playActionNow "STOP";
s1 setCaptive false;
#

if it doesn't work try:

s1 switchAction "STOP";
s1 setCaptive false;
true frigate
#

Well the AI now tracks the player (imagine if path was disabled, same thing), but he's still in the surrendered animation thonk

little raptor
#

try the second one then

true frigate
#

Looks like it didn't do much else either, I'm half tempted to delete these units and create new ones on their exact previous positions πŸ˜„

little raptor
true frigate
#

You legend, works beautifully, thanks Leopard! πŸ™‚

little raptor
#

use that with switchMove instead of ""

true frigate
#

I think I prefer the jump, its supposed to take the player off guard, they won't be looking at the unit at the time anyway πŸ™‚

open fractal
#

maybe it will work if you use switchCamera but definitely not with cameraEffect

meager granite
#

I'm attaching a unit to Logic created with createVehicleLocal and move Logic smoothly each frame, but attached unit doesn't update as smooth as Logic does. Question is, how can I trigger the engine to update attached unit's position each frame?

#

Is there a vehicle with higher frequency of updates than Logic?

#

I tried Sign_Sphere100cm_F and it updates even less frequently

#

Looking for an entity that updates attached objects each frame

#

Wonder which config parameters affect that apart from simulation

drifting portal
drifting portal
meager granite
#

placed_chemlight_green is the best one so far, seems to be super smooth thronking

granite sky
#

Probably a side-effect of a major network performance bug :P

little raptor
#

it's not a bug. objects have different simulation and sync frequencies

meager granite
#

Trying to figure which config values determine rate of updates

little raptor
#

projectiles should be the smoothest maybe blobdoggoshruggoogly

#

not sure if you can attach anything to them

little raptor
#

don't remember right now

#

simulation should also affect it

meager granite
#

Noticed that building objects update more often

#

I need something invisible, simple and that updates attached objects each frame πŸ€”

meager granite
little raptor
#

don't attach blobdoggoshruggoogly

meager granite
#

Welp, that's the only way there is for what I'm trying to do

#

Won't go into details, it just is

little raptor
meager granite
#

Is it really about simulation frequency? πŸ€”

little raptor
#

that's what I use in my "engine" for simulation frequency blobdoggoshruggoogly

boreal parcel
#

would anyone know why this is getting init.sqf not found? I have confirmed that the folder exists in the root directory as well as the init.sqf file

if (!hasInterface) then // load external config if is server, no interface
{
    RELO_var_externalConfigFolder = "\reloadedsettings";
    if (loadFile (RELO_var_externalConfigFolder + "\init.sqf") != "") then
    {
        [] execVM (RELO_var_externalConfigFolder + "\init.sqf");
        diag_log "[INIT] -> External Configuration Initiated";
    };
};
meager granite
#

Try without leading \

#

"reloadedsettings"

pastel pier
#

Anybody have any more info about glanceAt ? Like does it stack, how frequent do they look, would they move to take a look?

boreal parcel
little raptor
coarse dragon
#
this forceWeaponFire ["rhs_weap_fab250", "this"];

any idea why this wont work?

thats the weapons name and "this" is the fire mode

pastel pier
little raptor
#

I don't remember

coarse dragon
#

is that code just very wrong?

little raptor
#

also it will only work fire

#

and since you've put that in unit's init you probably won't see that happening

coarse dragon
#

its going into a Move waypoint for the bomber

copper raven
little raptor
boreal parcel
#

roger, thank you its an old file lol

little raptor
#

or fireAtTarget

coarse dragon
#

this Fire ["rhs_weap_fab250", "rhs_weap_fab250"];

#

like that?

little raptor
#

wiki says:
unit fire [muzzle, mode, magazine]

little raptor
#

unit forceWeaponFire [muzzle, firemode]

#

firemode is usually "single"

#

you need to check in config

open fractal
#

or a command like weaponsInfo to get the firemode

#

actually weaponState is simpler

coarse dragon
#

ughh nothing seems to be working

little raptor
#

where do you put that again?

signal kite
#

wohoo, I love the new setTerrainHeight command - finally I can get artillery and IED craters πŸ™‚

open hollow
#

i want to do my own role selection, there is a way to see how vanilla works to modify it?
im asuming you can create a new display on it, and close the vanilla one meowawww

little raptor
open fractal
#

you should probably just have the server slot everyone into generic civilian (or whatever faction) slots and do role assignment in the mission

little raptor
#

you can provide your own secondary role selection screen tho

coarse dragon
#

bomber Fire "rhs_weap_fab250";

#

that.. works.....

little raptor
coarse dragon
#

move waypoint

little raptor
#

then change it to vehicle this fire "rhs_weap_fab250"

coarse dragon
#

no

little raptor
#

why no?

coarse dragon
#

cause i got it to work

little raptor
#

what I wrote will work too

coarse dragon
#

6 move WP's and they all worked

#

unless i only need a single move wp with your code?

little raptor
#

no

#

it's the same

open hollow
coarse dragon
open hollow
little raptor
coarse dragon
exotic flame
#

I would like to know: Is there an animation to have the character stand at ease (for example using "AmovPercMstpSnonWnonDnon_Ease" ) and stay at ease ?

coarse dragon
#

Thanks leo

meager granite
#

It must be attached

little raptor
#

attachTo uses setVelocityTransformation under the hood tho

#

unless you do that for the collision

stable dune
#

And sry, missed yours and Leo conversation so I think you get that work before I answered

coarse dragon
#

Thanks for the time you took anyway πŸ™‚

brazen lagoon
#

any suggestions for making it so players on the civilian side are unable to pick up weapons?

granite sky
#

Do you want them to be able to pick up anything else?

brazen lagoon
#

hmm.. I can't think what else they would need to

#

but yeah I guess non-weapon items should be fine

granite sky
#

Easiest solution I can think of atm is hooking inventoryClosed.

brazen lagoon
#

isn't there an event handler for taking something?

granite sky
#

I guess that doesn't work for picking weapons up directly...

granite sky
#

Take EH probably works for that.

winter rose
#

aaand there is a Take, yep πŸ˜‰

brazen lagoon
#

yeah. but this says item. is this triggered when you pick up a gun?

granite sky
#

I'm pretty sure guns are going to trigger that.

#

"item" is pretty fuzzy.

#

As usual with Arma you'll have to try it and see.

brazen lagoon
#

sure hope so

#

I'll give it a try. now then how would you suggest checking if something is a gun?

#

my initial guess was check if there's a cfgweapons entry

#

because if it's not a weapon it'll be in cfgitems or cfgmagazines right

hallow mortar
#

That depends. Some things are """weapons""" but not weapons. Things such as uniforms, vests, and hats. And first aid kits.

brazen lagoon
#

@hallow mortar are faks in cfgweapons?

#

i thought they were in cfgitems

little raptor
little raptor
brazen lagoon
#

what am i confusing it with

#

probably cfgammo

little raptor
#

no. ammo is ammo

hallow mortar
#

I'll tell you in a minute when the game loads

brazen lagoon
#

i was hoping there was a BIS_fnc_itemType or something

#

oh right. there is.

hallow mortar
#

FAKs are indeed CfgWeapons

brazen lagoon
#

interesting

#

thats fine ill just use itemType

#

@winter rose do you know if the Take EH is persistent?

winter rose
#

persistent…

brazen lagoon
#

i.e. will it stay attached to the player on death

winter rose
#

that I do not know, my guess is "no" but I might be wrong
test plz

hallow mortar
brazen lagoon
#

kk i thought maybe you knew off the top of your head

#

@hallow mortar would also want to do MineCore I think

winter rose
#

nope sorry :( I wish, because some EHs do some things, some EHs do differently

brazen lagoon
#

yeah

#

I'll figure it out, thanks for the help!

winter rose
#

good luck soldier!

brazen lagoon
#

this is what im going with, will test and see if it works: ```sqf
_newUnit addEventHandler ["Take", {
params ["_unit", "_container", "_item"];
if !(alive _unit) exitWith {};
if (
_item isKindOf "RifleCore" ||
_item isKindOf "PistolCore" ||
_item isKindOf "LauncherCore" ||
_item isKindOf "GrenadeCore" ||
_item isKindOf "MineCore"
) then {
_unit removeItem _item;
_container addItemCargoGlobal [_item, 1];
};
}];

winter rose
brazen lagoon
#

oh good point so I guess if its persistent it doesn't matter

brazen lagoon
hallow mortar
pulsar bluff
#

trying to get the "Open door" action localization

#

i can get the Open hatch stuff, but not open door

#

open hatch is like localize "$STR_A3_HATCH_OPEN"

#

cant find the open door tho

#

closest i get is localize "$STR_A3___1_1___OPEN_DOOR"

#

but that outputs something like "%1.1 - Open door"

little raptor
#

remove the %1.1 - manually blobdoggoshruggoogly

#

localize "$STR_A3___1_1___OPEN_DOOR" select [7]

meager granite
#

$STR_DN_OUT_O_DOOR

winter rose
unique sundial
still forum
winter rose
still forum
#

yeaa :harold: Kinda

#

I just didn't want to say it :poutcat:

velvet merlin
#

allUnits and vehicles seems fairly expensive - does it make sense to cache via pFEH with a less then per frame frequency a desired subset of vehicles or allUnits/entities "CAManBase" ?

#

like these sets only change via createUnit/createVehicle/deleteVehicle/etc and players joining/leaving but statistically with a quite lower frequency and probability [leaving out animals, and other special types]

#

so if your code doesnt need 100% accuracy on entities until the next pFEH check interval this should be a decent optimization strategy, no?

unique sundial
#

allUnits and vehicles

They are not the same, allunits iterates through all groups and all units in a group and potentially is expensive, vehicles iterates through vehicles array and is whatever it takes to go from start to finish of the array (i.e fast)

coarse dragon
#

hey, i have a modded WW2 landing craft. and i need to find a way to Open the ramp of it via a trigger. anyone know how id go about doing that?

pseudo ridge
#

There is a way to disable mouse movement on map? disableUserInput don't do that.

pseudo ridge
#

disableUserInput just disable clicks.

warm hedge
#

Maybe setMousePosition

hallow mortar
pseudo ridge
#

I will keep this way.

unique sundial
#

then add own file to mission

winter rose
unique sundial
#

but it’s more fun to make your own

pulsar bluff
#

yea i am doing some localization stuff, poked thru diag_localized

#

accidentally posted to systemchat, big mistake πŸ˜„

meager granite
#

How I got it, picked some random house, then did getTextRaw on open door action

pulsar bluff
#

systemchat str (diag_localized "global")

#

oh i didnt know getTextRaw could do that. glanced over and looked like it was config related

tough abyss
#

where are faction preview images located? ive copied and created a new one using the alive orbat tool and want to delete the old unit preview images

meager granite
#

Still looking for an info why placed_chemlight_green updates objects attached to it much more often than Logic, what config values (apart from obvious simulation) determine it.

little raptor
#

placed_chemlight_green uses mines

meager granite
#

Used for Mission Editor basic category selection πŸ€”

little raptor
#

yeah nvm their simulation was different too

#

and the chemlight has animated = 0

#

apart from those I don't see anything else that could affect it

little raptor
#

tho I doubt that affects the simulation speed

#

but all mines have simulation = "house" and animated = 0

#

so if you attach it to a normal house and that one is slow then animated is affecting simulation

meager granite
#

Tried Land_Pillow_F, updates attached objects very often (every frame?) too

little raptor
#

that one is PhysX

ivory lake
#

ThingX vs Thing is my guess yeah

odd turret
#

Is there any reason that deleteVehicle won't work to delete objects like a barricade I've placed with createVehicle?

#

Feel like it's something simple, but nothing in the notes

meager granite
#

Wrote a script to compare every config property of tested objects, only simulation is the notable difference. So I guess it all comes down to it.

hallow mortar
winter rose
hallow mortar
#

If it helps, I was wrong - neither of the createVehicle syntaxes have that problem, I must be thinking of something else
*it was createUnit

odd turret
#

Yeah, I think it might be something funky with the reference not being passed, just wanted to check before I went down the rabbit hole

winter rose
#

seeing your create & delete code may help πŸ™‚

coarse dragon
#

How would I get a helicopter to eject its passenger when it passes a move waypont. With it not landing or slowing down

little raptor
coarse dragon
#

Oh

coarse dragon
#

blobdoggoshruggoogly cant get it working

stable dune
coarse dragon
#

{ moveOut _x } forEach crew _ship;

stable dune
#

None of them did not get out?

coarse dragon
#

ive no idea what im doing notlikemeowcry

#

nope none

#

i put it in a Move waypoint init.
tried a trigger
gave the squad a move waypoint tryed in that

coarse dragon
#

tried that too