#arma3_scripting

1 messages · Page 172 of 1

astral bone
#

Although- I initially thought I was using the wrong command, thus my asking here, but not idk if it still belongs here xP

west grove
#

hm is there a way to detect if a soldier is speaking?

quaint ivy
#

I have a scripting performance question. Does assigning variable names to objects in editor have an impact on performance (aside from taking up some memory) ?

exotic gyro
#

Not one you can measure

winter rose
west grove
#

yeh, there seems to be no return value or anything when a character speaks

#

kinda wish we'd have an EH for that 😄

winter rose
west grove
#

ah nice.

#

only problem is -- this is just for the conversation system. it doesn't cover regular commands 😄

vapid scarab
#

So i have this 3den attribute for objects. When enabled, data is loaded on the object which includes a saved position. The function attempts to move the object to that saved position.
It seems that using setPos on an object during 3den attribute init doesnt work.
Does anyone know if it is possible? Im already moving on from this with a different solution, but im am still curious about this.

Sample code below has some test functions, but the first one that is commented is the actual cide.

tulip ridge
west grove
#

"man, 100m, front" etc

weary yarrow
#

is there a way to insert stringtable instead of WEAPONS ? _description + "<t size='1.2' color='#D9D98C'>WEAPONS</t><br />";

tulip ridge
#
format ["...", localize "STR_someStringtable"];
wind hedge
#

I am trying to replicate via script how the game sets the damaged material on damaged vehicles (not destroyed) but I haven't been successful so far:

#
_vehicle addMPEventHandler ["MPHit", {
    params ["_unit", "_causedBy", "_damage", "_instigator"];
    
    private _engineDam = 0;
    private _bodyDam = 0;
    private _finalVehDam = 0;
    
    _engineDam = _unit getHitPointDamage "hitEngine";
    _bodyDam = _unit getHitPointDamage "hitbody";
    _finalVehDam = _engineDam + _bodyDam;
    
    if (_finalVehDam > 0.49) then {
        _unit setObjectMaterial [0,"A3\soft_F\Offroad_01\Data\Offroad_01_ext_damage.rvmat"];
    } else {
        _unit setObjectMaterial [0, "#reset"];
    };
}]; ```
#

It is for a modded vehicle (offroad) which doesn't have a damage material configured and I don't want to mess with the PBO

fleet sand
west grove
#

you need to apply the texture as well

wind hedge
west grove
#

like ```this setObjectTexture [-1,"A3\Data_f\Destruct\destruct_rust_mca.paa"];
{this setObjectMaterial [_foreachindex,_x];} foreach [
"A3\armor_f_beta\APC_Tracked_02\Data\APC_Tracked_02_ext_01_destruct.rvmat",
"A3\armor_f_beta\APC_Tracked_02\Data\APC_Tracked_02_ext_02_destruct.rvmat",
"A3\armor_f_beta\apc_tracked_01\data\apc_tracked_01_aa_tower_destruct.rvmat"
];

wind hedge
west grove
#

funny, i was never driving with a destroyed marshall before

wind hedge
# west grove like ```this setObjectTexture [-1,"A3\Data_f\Destruct\destruct_rust_mca.paa"]; ...

That is working great for a destroyed vehicle like so: sqf _vehicle addEventHandler ["Killed", { params ["_unit", "_killer", "_instigator", "_useEffects"]; _unit setObjectTextureGlobal [-1,"A3\Data_f\Destruct\destruct_rust_mca.paa"]; {_unit setObjectMaterialGlobal [_foreachindex,_x];} foreach [ "A3\armor_f_beta\APC_Tracked_02\Data\APC_Tracked_02_ext_01_destruct.rvmat", "A3\armor_f_beta\APC_Tracked_02\Data\APC_Tracked_02_ext_02_destruct.rvmat", "A3\armor_f_beta\apc_tracked_01\data\apc_tracked_01_aa_tower_destruct.rvmat" ]; }];

west grove
#

you need to change the texture and material to whatever else you want

#

for example damage_metalsheet_mca.paa instead of destruct

#

and it needs the correct rvmat

fleet sand
west grove
#

since damage rvmat also has the base vehicle nohq and such in it referenced

wind hedge
#

Yeah, I can apply the rvmats (materials) just fine... What I haven't been able to replicate is how the game determines when to apply the "damaged" rvmats (materials)

west grove
#

at 0.5 damage or something like that

#

depends on vehicle config. oftentimes it is the hull hitpoint that matters

weary yarrow
hallow mortar
tulip ridge
#

You didn't put the %1 where the text should be

wind hedge
west grove
#

is hitbody correct?

wind hedge
# west grove is hitbody correct?
getAllHitPointsDamage vehicle cursorTarget [["hitlfwheel","hitlf2wheel","hitrfwheel","hitrf2wheel","hitfuel","hitengine","hitbody","hitglass1","hitglass2","hitglass3","hitglass4","hitrglass","hitlglass","hitglass5","hitglass6","hitlbwheel","hitlmwheel","hitrbwheel","hitrmwheel","hithull","#light_l","#light_r","#lightsirenm","#lightsirenlfront","#lightsirenm","#lightsirenl","#lightsirenl2","#lightsirenl3","#lightsirenlfront","#lightsirenlfront","#lightsirenrfront","#lightsirenr","#lightsirenr2","#lightsirenr3","#lightsirenlfront"],["wheel_1_1_steering","wheel_1_2_steering","wheel_2_1_steering","wheel_2_2_steering","","engine","","glass1","glass2","glass3","glass4","","","","","","","","","palivo","light_l","light_r","","","","","","","","","","","","",""],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]] ```
#

Probably hitHull would be better

weary yarrow
fair drum
#

im digging this gif

weary yarrow
tulip ridge
#

"Didn't work" doesn't tell anyone anything about your issue. What didn't work? Did it not localize properly? did it not appear in the string?

weary yarrow
#

Thank you

dire island
#

I have a bunch of scripts for spawning a whiteboard and drawing various things on it. Drawing stuff is done via addAction, remoteExec'd globally. The constituent scripts call each other via call compile preprocessFileLineNumbers. When I used remoteExec instead of preprocessFileLineNumbers, the scripts just didn't work (didn't execute) when I tested on the local multiplayer in 3den. But now the script doesn't work on multiplayer on a dedicated server. Anyone has any ideas what the problem might be? I could dump a zip file of all the scripts here if it is any help. This is the code I'm running on the test character's (z1) init field:

    "<t color='#FF0000'>(Trolla fram whiteboard)</t>", 
    {params ["_target", "_caller", "_actionId", "_arguments_"];
 call compile preprocessFileLineNumbers "scripts\whiteboard\spawnWB.sqf";}, 
    z1, 
    1.5, 
    false, 
    true, 
    "", 
    "_this isEqualTo z1", 
    3, 
    false, 
    "", 
    "" 
];

spawnWB looks like this:

params [
    ["_target", objNull],
    ["_caller", objNull],
    ["_actionId", objNull],
    ["_arguments", objNull]
];
_pos = getPosAtl _caller;
_wb = "Land_MapBoard_F" createVehicle _pos;
missionNamespace setVariable ["VLRS_" + str _caller + "_wb", _wb];
[_wb,"img\wb\blank.paa",false] call compile preprocessFileLineNumbers "scripts\whiteboard\drawTexture.sqf";
[_wb,_caller] call compile preprocessFileLineNumbers "scripts\whiteboard\initWB.sqf";


[_caller, _actionId] remoteExec ["removeAction", 0];
[
    _caller,
    [ 
        "<t color='#FF0000'>(Trolla bort whiteboard)</t>", 
        {params ["_target", "_caller", "_actionId", "_arguments"];
        call compile preprocessFileLineNumbers "scripts\whiteboard\despawnWB.sqf";}, 
        nil, 
        1.5, 
        false, 
        true, 
        "", 
        "true", 
        3, 
        false, 
        "", 
        "" 
    ]
] remoteExec ["addAction", 0];```
both implimentations work in local mp but not on a dedicated server. On a dedicated server, the action "(trolla fram whiteboard)" just plain does nothing, no error messages, no nothing.
faint burrow
#

That's because spawnWB.sqf can only be executed on server.

dire island
#

Oh!

oblique arrow
#

Hey peeps what was the right way to execute custom functions/script files for everyone on a server again? iirc remote Exec only takes scripts allowed by its config, or?

oblique arrow
#

Huh I thought remoteExec only took stuff allowed by the config, I shall try it tho

sharp grotto
oblique arrow
#

Hm ok

#

What I want to do at the moment is
Player clicks a button in a UI
UI starts script on server
server sends remoteExec with custom .sqf files/precompiled functions to players to execute

#

so I gotta find the right way to go from player to server since then remote Exec should be fine

#

I'd ver ymuch appreciate help with that sinc I dont have much multiplayer experience 😅

sharp grotto
#

Yup, then you just need to create the two functions, allow the exec from client to server via cfgRemoteExec (server to client doesn't need to be whitelisted).

oblique arrow
#

👍

#

so remote exec the fnc in the UI and then do the normal isServer check in the fnc so only the server executes it I assume?

sharp grotto
oblique arrow
#

oooh right that exists, ye

#

Also looking at the wiki article, could I also just make an empty cfgremoteexec setting the whitelist to mode 2 to just ignore the whitelist?
So pretty much like this

class CfgRemoteExec
{
    class Functions
    {
        mode = 2;
        jip = 1;
    };
};
#

Would save myself actually defining the functions 😅

#

although the wiki article does say that mode 2 is default? so wouldnt remoteExec allow everything already anyways?

#

2 - remote execution is fully allowed, ignoring the whitelist (default, because of backward compatibility)

sharp grotto
#

I think so yea, i only ever did Exile servers, that had the cfgremoteExec inside the mod config.

oblique arrow
#

Ah yeah fair

#

hm I'll try without it for now and see if it works and report back

#

if so that'd save me some extra complxity which I'd appreciate since my scripts folder already looks like this 😅

vocal chasm
#

Did try to implement the script i had been given yesterday, thought i did it right, but apparently not.
Its not showing up in chat, the markers do work though.

null=[]spawn {
{ _x setMarkerAlpha 1 } forEach ["SyndicatFlag", "SyndicatArea", "WarlordOne", "WarlordTwo"];
{
  if (not alive NATO) exitWith {}; 
  _x params ["_text", "_delay"]; 
  [NATO, _text] remoteExec ["sideChat"]; 
  sleep _delay; 
} 
forEach 
[ 
  ["ATLAS, this is NATO Command. Over", 4], 
  ["We got reports telling a revolt has started near a town called Kruger.", 5], 
  ["Support the resistance and help them gain ground in the region. ", 5],
  ["Your priority is to eliminate a warlord that has been oppressing the local civilians. ", 5],
  ["We have updated your map with the warlords possible locations and the location of the resistance. Out. ", 5] 
]; 
};
#

*inside a trigger activated by radio alpha

hallow mortar
#

Does the unit with the variable name NATO have a radio item in their radio slot? It's required for sideChat to work

vocal chasm
#

hmmm, that is a good one

vocal chasm
tulip ridge
#

Yeah chat messages only show if you have a radio

I kept getting bug reports on stuff like that with a chat wheel I made

fair drum
#

thats when you make a recursive annoying pop up reminding them that they need a radio

oblique arrow
#

But any chance anyone here knows why an emitter spawning timeline wouldnt work correctly when being remoteExec'd?
when I call it locally using debug it works just fine, but trying to remote Exec on the server doesnt do anything at all

oblique arrow
#

I've spent 2+ hours trying to fix this and I think the mission hasnt been exporting correctly the entire time, which is why all my changes didnt apply

#

for some reason the export got borked, file didnt change and timestamp was old too

#

Yeah I've been repeatedly reuploading and retesting the same mission file for the last 2 hours notlikemeow

#

yeah I actually re-exported it now and who'da thunk, stuff actually works

#

I love arma 3 so much, such a great piece of software

junior moat
#

anyone know what this menu on the map is called and how to interact with it?

meager granite
#

diary

#

Ctrl+F diary commands

junior moat
#

appreciated o7

tender inlet
#

hello all,
I'm stuck with a very basic function, I don't found any help in the Discord history or on the Internet.

I'm not able to use the second example in setMarkerColor

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

"MarkerOne" setMarkerColor "#(1,0,0,1)"; // red color - since Arma 3 v2.20

no matter what I try, I've got console error msg, like
Warning Message: No entry 'bin\config.bin/CfgMarkerColors.#(1,0,0,1)'

someone can show me how to use custom color on marker please ?

warm hedge
#
  1. it is a command not a function
  2. it is a upcoming feature in Dev-Branch
tender inlet
#

haaaaa, thanks a lot, I was pulling my hair !

#

when I read "since Arma 3 v2.20" I was sure it's already available, thanks again for the info!

remote cobalt
#

Hey folks,

a question to getMissionConfigValues.

How can I define Bools in an Arma config?

Right now I only get a string ("true") back from

getMissionConfigValue "testbool";

At the moment I decline the bool variable like this in the config.cpp:

testBool = true;

Is there a way to get a Bool back from getMissionConfigValue or is it always string and I have to "switch" the type myself?

little raptor
#

Configs don't have bool

#

But parseNumber can give you a bool iirc

warm hedge
#

A config itself does not have a boolean/true etc but you can just value == 1 so it converts it to bool

#

Or what he said

little raptor
#

I think it just gives 0 or 1

#

I don't remember

remote cobalt
#

Okay, got it. Thanks for clarifying

tulip ridge
#

getNumber on "true" also returns 1, but you still shouldn't use a string for boolean flags

fast glade
#

hey everyone is there a way to change the drone (Darter) size by scale ?

tulip ridge
fast glade
#

ive tried

#

it changed the size but i couldnt control the drone

#

not flying

fast glade
tulip ridge
#

You could have a dummy drone that's invisible, and attach a simple object copy of it to the actual drone

little raptor
#

(invisible by default not by hideObject)

fast glade
#

myDrone2-
this hideObject true;

cedar bay
#

Thank you @still forum Will test tonight.

vapid scarab
#

So there is something interesting going on here.
Line 32: I forgot to add a default value to a getVariable, throwing a syntax error
Code resumes execution??? what? shouldnt it stop execution?
Line 40: Unassigned variable because the line of code that assigns it throws an error an fails

Did code always resume execution after encountering an error?

tulip ridge
#

Yes

tulip ridge
#

You could use something like this in the drone's init. This creates a dummy drone model on each player's machine and attaches it to the actual drone. Then hides the original by disabling its textures.

if (!hasInterface) exitWith {};
private _dummy = createSimpleObject [getText (configOf this >> "model"), [0, 0, 0], true];
_dummy attachTo [this];
_dummy setObjectScale 0.3;
{
    this setObjectTexture [_forEachIndex, ""];
} forEach (getObjectTextures this);
fast glade
#

it didnt changed the size

fast glade
#

if you have another idea

fleet sand
# fast glade thank you for trying

Something Like this might work:
Not tested btw

private _drivableDrone = createVehicle["B_UAV_02_F", player modelToWorld [0,5,0],[],0,"NONE"];
createVehicleCrew _drivableDrone;

private _visualDrone = createVehicle["B_UAV_02_F", player modelToWorld [0,5,1],[],0,"NONE"];
_visualDrone enableSimulationGlobal false;

_visualDrone attachTo [_drivableDrone,[0,0,1]];
_visualDrone setObjectScale 10;
hallow mortar
gritty escarp
#

Hello,
Is it possible to enable Dynamic Simulation on triggers? As in, triggers won't be checking until a player comes near the trigger(not into the trigger)

gritty escarp
#

well, the thing is, it says it affects objects, and triggers are considered objects, although on Eden Editor, there's no option to enable Dynamic Simulation on the triggers

faint burrow
#

Then this is not applicable to triggers.

#

Or you can try adding triggers to DynSim using script commands.

fair drum
#

I believe the object needs to have the can wake flag which triggers don't have. Have you tried it yet?

faint burrow
#

No.

gritty escarp
#

that's what I'm basically doing, adding the dynamic sim to triggers via script, although I'm just asking here to be clear if it'll work or not, as there's no mention of exceptions, nor suggestions of doing so.

the real issue I have is, I'm using EOS (very outdated, I know, I've been modifying it to fit my needs) and it creates too many triggers it just lags the server eventually, so I'm basically trying to disable far away triggers, and to do that, I really hope it works, otherwise I'll have to rework the trigger system of EOS to be on players instead of the markers

tall barn
#

I get an error from it

tulip ridge
meager granite
#

I wonder if there is a way to quickly remove dead unit from the group instead of waiting for leader to realize that they are dead

gleaming rivet
#

killed eventhandler, remove from group.

meager granite
#

Define "remove from group"

gleaming rivet
#

<unit> join grpNull

meager granite
#

Do you realize that joining grpNull creates new group?

#

There seems to be no way to simply remove dead unit from group

gleaming rivet
#

Yes, but it will remove the dead unit from the original group. You didn't specify.

#

Now that you specified, I have no idea.

meager granite
#

I did that, the problem is that it creates lots of empty groups, if I move all dead units into single group, it grows and dead units never get removed from it because apparently there is no leader to shout that unit is dead and have them removed

#

I guess there is no easy way

gleaming rivet
#

You could add them into a group that contains a single living unit that isn't on-map to do that for you. Seems messy and a crappy work-around for it.

meager granite
#

Well that garbage collecting group had Logic unit as leader

vapid scarab
#

is there a 3den command for syncing two objects?

#

nvrmnd. I was looking for something3denSync... Answer is add3denConnection

sharp rune
#

how do I stop arma tools from making a project drive every day

#

I unmounted and un-did everything in workdrive.exe

#

but it still remounts and tries to reextract every day I open the computer

junior hearth
#

I'm trying to make an eden module that will turn anything it's synced to into an intel object, but in the eden module all the boxes and stuff are overlapped, I don't understand where though, I followed the BIS tutorial and some other ones and I still don't understand what's going on. If yall don't want to read the code and inspect it then can I at least get some pointers on what might be causing an issue like this typically?

 class CfgPatches {
    class NES_Intel {
        units[] = {"NES_Module_AceIntel"};
        requiredVersion = 1.0;
        requiredAddons[] = {
            "ace_main",
            "ace_interaction",
            "ace_intelitems",
            "A3_Modules_F"
        };
        author = "Nes";
        version = "1.0.0";
    };
};

class CfgFunctions {
    class NES_Intel {
        tag = "NES_Intel";
        class Functions {
            file = "\nes_intel\functions";
            class moduleAceIntel {};
            class addIntelAction {};
        };
    };
};

class NO_CATEGORY;

class CfgFactionClasses {
    class NES_Intel_Category: NO_CATEGORY {
        displayName = "NES Intel";
    };
};

class CfgVehicles {
    class Logic;
    class Module_F: Logic {
        class AttributesBase {
            class Default;
            class Edit;
            class EditMulti;
            class Combo;
            class Checkbox;
            class ModuleDescription;
        };
        class ModuleDescription;
    };

    class NES_Module_AceIntel: Module_F {
        scope = 2;
        displayName = "Add ACE Intel";
        icon = "\A3\modules_f\data\iconTaskCreate_ca.paa";
        category = "NES_Intel_Category";
        
        function = "NES_Intel_fnc_moduleAceIntel";
        functionPriority = 1;
        isGlobal = 1;
        isTriggerActivated = 0;
        isDisposable = 1;

        class Attributes: AttributesBase {
            class IntelTitle: Edit {
                property = "NES_Intel_Title";
                displayName = "Intel Title";
                tooltip = "Title of the intel item";
                defaultValue = """Intel""";
            };

            class IntelContent: EditMulti {
                property = "NES_Intel_Content";
                displayName = "Intel Content";
                tooltip = "Content of the intel item";
                defaultValue = """Intel content here""";
                rows = 8;
                columns = 50;
            };

            class IntelImage: Edit {
                property = "NES_Intel_Image";
                displayName = "Image Path";
                tooltip = "Path to image file (optional)";
                defaultValue = """""";
            };

            class ActionText: Edit {
                property = "NES_Intel_ActionText";
                displayName = "Action Text";
                tooltip = "Text shown in ACE interaction menu";
                defaultValue = """Collect Intel""";
            };

            class DeleteAfterCollection: Checkbox {
                property = "NES_Intel_DeleteObject";
                displayName = "Delete After Collection";
                tooltip = "Delete the object after intel is collected";
                defaultValue = 1;
            };

            class ModuleDescription: ModuleDescription {};
        };

        class ModuleDescription: ModuleDescription {
            description = "Sync to an object to make it an intel object that players can collect using ACE.";
        };
    };
};
fair drum
#

@vapid scarab @junior hearth

I see you both have been working on modules. Feel free to look at modules enhanced code for ideas and reference.

fast glade
vapid scarab
junior hearth
#

the issue is that I wanted to make it persistant for an upcoming campaign and make bodies searchable with intel and things like that

#

I was able to do this with the init of objects but that got wayy too messy

#

I'll try that and see if it fixes it

junior hearth
#

Yeah bax intel is a pretty good mod for intel and its very customizable

#

Criminally underused

vapid scarab
#

My intel mod should be rather complient given that it offers the onPickup code. What was the short coming that made you want to make your own mod?

junior hearth
#

mostly intel sent from triggers and a body search for intel thingy

#

so you could sync a module to a trigger and onactivation it would give the players the intel

#

and body search for intel is pretty self explanatory

#

It's a very good mod though and considering how little stuff there is about working with intel functions and shit i'm very happy it exists

vapid scarab
#

Yeah gotcha. You are doing something different from me then

#

A different "source" of obtaining the intel.

junior hearth
#

Oh also I forgot

#

I wanted to add a module for zeuses to give intel to players under the guise of like "SIGINT" or something

#

you can already do this but its a little odd and I just wanted to make it more straightforward

#

at least for the mod pack im using

#

okay i built the mod im testing it

vapid scarab
junior hearth
#

Feel free to but I wanted to add it to mine so I could learn zeus modules and that sort of thing

#

I know some people that could really use your mod though since I plan on keeping this stuff to myself for the most part

#

I know dudes that just place all the intel using zeus modules and have us wait for 10 minutes so he can place everything just because he doesnt wanna do stuff with scripts

#

Alright so commenting out that fixed it and now it works normally

#

Except for not having the edit intel box obviously

#

I'll try what you said about the control attribute

#
class IntelContent {
    property = "NES_Intel_Content";
    displayName = "Intel Content";
    tooltip = "Content of the intel item";
    defaultValue = """Intel content here""";
    control = "EditMulti";
    rows = 8;
    columns = 50;
};
#

its overlapping still

#

guh

#

why does arma have to do this to me why

winter rose
#

. . . meowheart

junior hearth
#

@vapid scarab I'm gonna use your mod since I need something I know will work for this and I'll experiment later, but it would be super cool if you could add the other modules I mentioned, if not that's fine though as the mod is still very good

#

Also is the mod only client side or does it have to be on the server too?

vapid scarab
# junior hearth its overlapping still

I have used EditMulti5 and EditCodeMulti5
Im going to assume that the issue lies particularly with the control type EditMulti or your rows/columns attributes.

#

Testing now. its throwing me an error that says control type EditMulti does not exist... Would that be your issue? (it is)

#

Use config viewer and take a look at the available Attribute controls in configFile >> "CfgVehicles" >> "Module_F" >> "AttributesBase"

#

Where did you find the thing for EditMulti?

regal kraken
#

I got a script but it doesnt like to work on multiplayer, it works on singleplayer, and when i host it works - but when you're not the host it doesnt work

#

theres a create vehicle inside the script

#

now the method i used to do it does work because everybody is able to use it and no issues - but there seems to be an issue when waypoints are involved

#
_heli = (leader group1);

    sleep 5;
    cargo1 = "B_Slingload_01_Cargo_F" createVehicle getMarkerPos "CRATE_CREATION_MARK";
    private _wp = group1 addWaypoint [getPosASL GENERALS_WAYPOINT2, 1];
    _wp setWaypointType "move";
    _wp setWaypointStatements ["true", "Chinook1 setSlingLoad cargo1;"];
    
    
    sleep 5;
    private _wp = group1 addWaypoint [getPosASL GENERALS_WAYPOINT1, 2];
    _wp setWaypointType "UNHOOK";
    
if (triggerActivated AC_TRG1) then 
{
    {deleteVehicle _x} forEach nearestObjects [AC_TRG1, ["B_Slingload_01_Cargo_F"], 25];
    deletevehicle cargo1;
    hint "Logistics Payment: Shipment recieved!";
    sleep 2;
    _wage = 1000;
    hint format ["Logistics: Payment for $%1 for airborne cargo", _wage];
    sleep 10;
    [[4, player], "scripts\Automatic_Cargo.sqf"] remoteExec ["execVM"];
    _killpotcash = KILL_POT1 getvariable ["Cash",0];
    _logwage = _killpotcash + _wage;
    KILL_POT1 setVariable ["Cash", _logwage, true];
    sleep 2;
    hint "Logistics Payment: Payment added to Contracts fund!";
};```
#

is it just fucked?

grizzled lagoon
#

Hello, I have a problem when I try to subtract a small value from a large amount, it doesn’t work or it always subtracts 8 by default. Do you have a solution to fix this problem ?
Here’s the test I used :

private _first_mount = 118949952; 
private _second_mount = 1; 
private _new_mount = _first_mount - _second_mount; 
diag_log format ["Test | First mount : %1 | second mount : %2 | new mount : %3", ([_first_mount] call BIS_fnc_numberText), _second_mount, ([_new_mount] call BIS_fnc_numberText)];```
Here’s the output I got in the logs : ```17:40:07 "Test | First mount : 118 949 952 | second mount : 1 | new mount : 118 949 952"```
dusk gust
# grizzled lagoon Hello, I have a problem when I try to subtract a small value from a large amount...

This is because Arma uses floating point numbers and scientific notation to count numbers over '999,999'. Any numbers over this are basically rounded to the nearest multiple of... i think 16 or 32, but I can't remember right now.

The only way I am aware of accurately storing numbers this way is to store up to 999,999, and having a separate variable storing how many times the original number has rolled over that number.

grizzled lagoon
junior hearth
vapid scarab
#

If its subtracting 8, he would be in the value range that has lost 3 precision(or value?) bits?

dusk gust
vapid scarab
#

Same.

granite moat
# junior hearth the issue is that I wanted to make it persistant for an upcoming campaign and ma...

I created a script that does that, when enemy killed, random chacne to have intel spawn on it or next to the body (to imitate the AI dropping it when killed).

see https://github.com/gerard-sog/arma3-macvsog-columbia-scripts --> 13. Intel on body (at the bottom of the readme).

If you need help custamizing it feel free to reach me, I also made most of the setting configurable in the Addons setting 👍

GitHub

Arma3 MACV-SOG Columbia - Scripts & Settings. Contribute to gerard-sog/arma3-macvsog-columbia-scripts development by creating an account on GitHub.

regal kraken
#

is there some magic sling code i'm not knowing about?

regal kraken
#

i'm thinking its my setup of the cargo loading tbh

#

i seen someone else had it and said it literally had to be within a distance of the helicopter too work

opal zephyr
#

I'm blanking hard right now, can anyone tell me how to get the vectorUp between two 3d vectors? I have done this before relatively easily but I cannot find the solution

opal zephyr
#

Thanks!

sharp rune
#

how do I stop arma tools from attempting to remount and reextract every day I open the computer. I un-did everything in WorkDrive.exe but it still tries to do that

#

could I maybe delete the workdrive related executables and folders etc?/

dusty steppe
quaint ivy
#

Can I exit a scope trough one of its sub scopes by nesting exitWith in an exitWith? Or is there perhaps a command to exit the entire current script?

sharp rune
#

thanks raven

dusk gust
#

Anyone know if theres a way to get default mass of a vehicle without having to spawn the vehicle in?

tulip ridge
#

It's a property in the model itself, so you have to spawn it

pallid palm
#

i only know how to add mass, i don't know how to get the mass

#

and hello Mr Dart

tulip ridge
#

getMass

pallid palm
#

nice

#

im wrighting a meatel vrison of winter wounder Land he he fun stuff

tough abyss
#

how long a player stays dead before he respawns

#

in seconds

#

respawnDelay = 10; // 10 second timer before respawning

lunar mountain
#

Is the addPublicVariableEventHandler still broken with object variables? If not, what is the correct syntax?

tough abyss
#

addPublicVariableEventHandler is not supposed to work with (public) object variables

#

PVEH only triggers when any other machine uses publicVariable

#

Or on the server if any machine (incl. the server) uses publicVariableServer

#

Or on that client if any machine (incl. that client) uses _id publicVariableClient

lunar mountain
#

1.48 changelog: "Added: addPublicVariableEventHandler support for object, group and teammember targets. setVariable accepts a 3rd ‘public’ parameter for its namespace version."

#

on Wiki it says it's not working as intended, so it supposed to be working, but it doesn't?

tough abyss
#

That means that the value of the public variable can now be a group, object or string

#

Not that it's a object namespace variable

#

e.g.
theman = player;
publicVariable "theman";

lunar mountain
#

I see... not sure how the setvariables comes in here though

#

sure, you can do missionnamespace setvariable, but...

tough abyss
#

Where did you get that from. Object type support was not as recent as 1.48 ?

#

namespace setVariable does not accept the public parameter

lunar mountain
#

I know

#

this is why I'm kind of confused about how is the setvariable mentioned there

#

Anyways, intended or not. It's not working 😄 😄

tough abyss
#

The spotrep is trolling you. No idea what they are talking about

#

"setVariable accepts a 3rd ‘public’ parameter for its namespace version."

lunar mountain
#

LOL

tough abyss
#

they lied to you, haha

#

I hope they never touch PVEH. It's one of the few things in this game that does work.

little raptor
pallid palm
#

ah nice i see thx m8

lunar mountain
#

true. Would be awesome though on objects 😄

tough abyss
#

I'm currently on 1.55 dev and namesace setvariable acutally accepts the 3rd parameter

#

For missionNamespace only, errors on uiNamespace etc.

lunar mountain
#

but that's like doing a simple publicvariable, isn't it?

tulip ridge
tough abyss
#

yes.

#

Since you can't use on-the-fly names anyway with PVEH

#

Or it would be stupid to do...

little raptor
tulip ridge
#

Interesting, guess I haven't ever tried to get the mass of a simple object
Good to know, thanks

tough abyss
#

I'll play around with it a bit. Maybe it's one of these dev branch only things

#

// client 1
"a" addPublicVariableEventHandler {systemChat str _this}

// client 2
missionNamespace setVariable ["a", 3, true]

#

confirmed working, 1.55dev

#

aaaaand this works too:
player setVariable ["a", 5, true]

#

No idea about stable

#

The object is passed as thrid parameter too

#

["a",6,C Alpha 1-1:1 (Gefr. commy2 (2)) REMOTE]

#

works on groups
["a",6,C Alpha 1-1]

junior hearth
open hollow
little raptor
#

Is that the Armaholic foxhound?! 😅

analog mulch
#

hi,

i would like to know how to add custom tactical numbers on the side of tanks and ifvs

#

i have the pic of the numbers in .paa file but not sure how to add it to the side of vics

vapid scarab
#

The correst way iirc is to add a face and texture to the side of the model, and then have the texture be a hidden texture.

The typical scripted work around is to attach a texture object to the tank.

analog mulch
#

which object in props is best for that?

#

tried it with one of the grafitti it didn't work

vapid scarab
#

I forgot the name, but there are 2 objects that are literally "texture object". Its a 1x1 and 10x10. Look up "texture" in objects and i think itll come up

analog mulch
#

so get that prop texture object, use setobjecttexture on it using the custom numbers, but then how to make it stick on a vic and stay on it while it moves?

#

also if the vehicle respawns, it will lose that right?

vapid scarab
#

AttachTo

#

Yes

analog mulch
#

any way to make it respawn with the vic?

vapid scarab
#

The respawn vehicle module has a on respawn code block.

#

Otherwise, you will have to script your own solution

#

If. This is in a multiplayer context, you should make the texture object be local only objects that get attached on every client.

#

Otherwise, clients will see the texture object jumping around as sync catches up with it.

analog mulch
#

wouldn't setobjecttextureglobal be better in that case?

vapid scarab
#

It you had a ovject hat wasnt being moved around, it would be fine to have it as a global object, and as such the setObjectTextureGloabl would be fine, but it wont work for everyone if the object is local only.

Essentially do this:
On Vehicle Respawn -> [tankObj, "tagfile.paa"] RE fnc_initTag -> create local texture object, attach to tank, and set texture

true skiff
broken pivot
#

Good morning guys, Im looking for a way to bind a command to a default classname

I want it to add a Ace Arsenal to a placed down box
Something like this

_Arsenal = [this, true] call ace_arsenal_fnc_initBox ;
_Box = "I_supplyCrate_F";

_Box addAtribute(?) _Arsenal;
warm hedge
#

What is bind a command to a default classname

broken pivot
#

haha I gues language barrier

Maybe you would say "attatch to a classname"
That every object of this type becomes automaticly
an ace arsenal only from existing

warm hedge
#

addMissionEventHandler, EntityCreated is what I would do

broken pivot
broken pivot
warm hedge
#

missionNamespace is unrelated at all

broken pivot
#

Copy

#

This is what I got so far

_Arsenal = [_Box, true] call ace_arsenal_fnc_initBox ;
_Box = "I_supplyCrate_F";

addMissionEventHandler ["EntityCreated", {params ["_Box"]},"_Arsenal"];
broken pivot
#

Dont work until now if I put it into the init.sqf

dusk gust
#

Look into createVehicle

#

Also not sure what "_arsenal" is with the event handler, as addMissionEventHandler only takes 2 parameters. Event name as a string, and the code it executes as a code block
Edit: I'm stupid, I was unaware that you could pass it additional parameters...

broken pivot
#

Edit:

_Arsenal = [_Box, true] call ace_arsenal_fnc_initBox ;
_Box = "I_supplyCrate_F";

addMissionEventHandler ["EntityCreated", [_thisArgs _Box], [_Arsenal]];
broken pivot
dusk gust
# broken pivot I thought thats how the arguements work

You are correct, I actually didn't know that you could add additional parametersmeowsweats

Regardless, I've detailed it a little here for you.

_boxSpawnPosition = [0,0,0]; // Position you want the box to spawn at
_boxObject = "I_supplyCrate_F" createVehicle _boxSpawnPosition; // Creates the actual box object
[_boxObject, true] call ace_arsenal_fnc_initBox; // Initilizes ACE Arsenal options on the box

// Not entirely sure what you'll use this for
addMissionEventHandler ["EntityCreated", {
    params ["_box"];
}];
broken pivot
#

Thats not I want it to use for at all

#

I want that if somebody placedown _boxObject = "I_supplyCrate_F", its allways an [_boxObject, true] call ace_arsenal_fnc_initBox;

dusk gust
#

Ohhh

#

I misunderstood what you wanted then

broken pivot
#

I think its my fault cause of language barrier

broken pivot
dusk gust
# broken pivot I want that if somebody placedown ```_boxObject = "I_supplyCrate_F"```, its allw...

Hopefully this'll work for your case.

addMissionEventHandler ["EntityCreated", {
    params ["_object"];

    if (typeOf _object isEqualTo "I_supplyCrate_F") then {
        [_object, true] call ace_arsenal_fnc_initBox;
    };
}];

typeOf is a command that takes an object, and returns itsclassName as a string. We can use that to check exactly what type of object was spawned.
https://community.bistudio.com/wiki/typeOf

broken pivot
#

Edit:

//Allways Arsenal
addMissionEventHandler ["EntityCreated", {
    params ["_object"];

    if (typeOf _object isEqualTo "I_supplyCrate_F") then {
        [_object, true] call ace_arsenal_fnc_initBox;
    };
}];
dusk gust
broken pivot
#

Im adding I_supplyCrate_F with Liberation Building or Zeus. Ive also edited the message over me

Removing the string from I_supplyCrate_F creates errors

dusk gust
broken pivot
#

Made it. Now I need to understand the ongoing full

dusk gust
broken pivot
dusk gust
#

Yes

broken pivot
#

Does this anything together with the Namespace or am I mixing the wrong things?

dusk gust
#

Technically it exists in the missionNamespace however, that is not relevant to what you wat

#

want*

broken pivot
#

Copy bro. You helped me a lot to understand whats going on and how things work together 😄

I want to thank you really alot ❤️

  • Greetings from germany 😄
tall barn
#

Hi, could anyone help me understand what this issue could be from?

I copied the liberation files over from altis into another map

All but the mission sqm.

in the editor, everything runs fine, and the game mode starts

This alert appears in the editor but the game mode runs fine

however, when I play it from a server hosting website, i get stuck in the lobby.

Any suggestions?

dusk gust
#

Also, could be wrong, but I think that error might be from a mod

tall barn
#

One moment

tall barn
#

Not sure if should paste the whole log

dusk gust
#

Just upload it as a file, should be fine?

broken pivot
#

Btw Fraali, do you know a way how to reduce the ace arsenal to the Items that are used in the default loadouts.
I know you can reduce the ace arsenal by this:

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

There are usefull informations writen down, but I cant find a nice way to make it done. Maybe you have some experience or idea

dusk gust
tall barn
#

Please note

#

I did just fix the last comment about missing a ; in wipe 2

broken pivot
dusk gust
# broken pivot I mean this

I don't have any idea for that. It depends on what items you want exactly. I don't know what you mean by default loadouts

dusk gust
# tall barn

I dont see any specific errors that would stop loading from this Maybe try unloading all mods except the hellanmaa map? (any requirements of course)

tall barn
#

and in my modlist

dusk gust
broken pivot
#

Btw this[Attached Picture] dont work *(Im just joking around, I dont want this seriously to work) *

addMissionEventHandler ["EntityCreated", {
    params ["_m4a1"];

    if (typeOf _object isEqualTo "rhs_weap_m4a1_blockII_bk") then {
        [_m4a1, true] call ace_arsenal_fnc_initBox;
    };
}];

=======
What I mean with the Default Loadouts is that you can enter default Loadouts with ace arsenal so they are preseted to the server.
What I want to achieve is to limit the placed down arsenal only to the items that Ive used in that default loadouts.

Btw. I think its language barrier again. Because ger.:"Standard Ausrüstungen" in the marked message means eng.:"Default Loadouts"

tall barn
dusk gust
broken pivot
#

So EntityCreated works with createVehicle in somehow?

tall barn
tall barn
fiery gull
broken pivot
broken pivot
dusk gust
broken pivot
#

whats iirc?

dusk gust
#

If I recall correctly

broken pivot
#

ahhhhh language 🫡 😂

fiery gull
#

you can treat it like any other weapon box (only difference it is gets deleted when empty)
So if you want to check if it contains x weapon you can do it the same as a regular weapon box with weaponCargo or whatever script command you prefer

broken pivot
#

Okay logic in theory

tall barn
#

quit the game 3 times

tall barn
#

I get a black and white screen of Liberation RX and doesnt get past it. says the logistics (forgot full name but seen it before) has initialised

fiery gull
tall barn
tall barn
fiery gull
#

Why are you trying to run it in EDEN?
Just go to multiplayer > server browser > host server > select map > select liberation mission > select

tall barn
#

im exploring the new mission file I was suggested and of course im in the eden editor.

i was working on the same map from a different avenue but now I found there is a prebuilt for it so im checking it out but its get stuck loading in

dusk gust
fiery gull
tall barn
fiery gull
tall barn
#

I went back to editing the previous file, the one before the liberation mod was announced to me. here is the log if you could help me decypher what is wrong with it

spare adder
#

Can someone help me out? I am trying to have artillery fire on a perpetual fire mission. After they fire for a bit, they stop aiming toward the target area, the guns slide back to facing front, but they continue firing. Is there a way to keep their guns pointing toward their fire mission target without going back to idle?

#

_wp = group this addWaypoint [_targetPos, 0]; 
_wp setWaypointType "ARTY"; 
_wp setWaypointCompletionRadius 10;  
_wp setWaypointStatements ["true", "{ _x doArtilleryFire [_targetPos, '8Rnd_82mm_Mo_shells', 5]; } forEach units (group this);"]; 

_cycleWp = group this addWaypoint [getPos this, 0];
_cycleWp setWaypointType "CYCLE";```
#

I tried this, and a fire mission and cycle wayppint, but they never go back to firing on their target.

#

Additionally, this code is used to add back the round afterr every shot. this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]

south swan
#

also, is "ARTY" even a valid WaypointType? 🤔

spare adder
#

It's not, just an example. I have a fire mission waypoint.

#

Tried changing the cycle waypoint, but they still just fire at the target, then look forward and keep firing.

willow hound
#

Why the waypoint instead of using doArtilleryFire on its own?

fair drum
#

Yeah no need for waypoints at all

tall barn
grim cliff
#

how can i pickup on when an apers mine dispenser releases its payload?
i have tried eventhandlers for submunition created and fired, and neither seem to respond.
i want to make the dispenser create mines owned by the player that deployed them in MP, so another players handledamage event handler will be able to pull the mine owner to compare and determine if the player should take friendly fire damage

fiery gull
tall barn
# fiery gull howmany times do we have to tell you to not run it from the editor? -_- bro

Buddy,
How else am I suppose to edit the file?

1 - I’m not going to be uploading a vanilla file to the server without re-organising where the assets are because that’s not fun, hence I want to edit. I also want to add mods and those are not in the original file, weapons etc
2 - even if I did upload it, and it worked, what’s the point if I can’t edit stuff in the editor? It would be stuck like that forever
3 - this is a previous mission file, not the mod I was suggested last night

#

Hope that’s clear

#

So thank you, but that’s my perspective

#

I only want help interpreting the log file so I can see what’s breaking down
It says I am missing a model

fiery gull
#

if you cant get the first step to work there is no point in trying to edit it

#

nobody is telling you to play the vanilla version, just to test it to see if your mission is the problem or your server is the problem

fair drum
#

Keep in mind, running a mission as multiplayer in the editor is the same as a listen server. You just actually have to say play in multiplayer.

tall barn
vapid scarab
#

In 3den, I have the vectorDir and vectorUp of an object, and I want to set the rotation 3den attribute of the object using them.
How would I convert those to rotation?

tulip ridge
vapid scarab
#

No

tulip ridge
#

Does that command not work on 3den entities / update those values?

#

Oh you mean vector to degrees

vapid scarab
#

Thats.... not how that works.
setVectorDirAndUp doesnt set the attribute. And the rotation vector value is very different from vectorDir and vectorUp

tulip ridge
#

I misunderstood what you needing help on, I thought you had the values and just needed to set them

vapid scarab
#

I wish it was as simple as that

tulip ridge
#

You could try searching for general vector to degrees formulas, shouldn't be too different in sqf

hallow mortar
#

getDir and bis_fnc_getPitchBank should™ be what you need. And set3denAttribute / s

fair drum
#

but they also said that stuff needs to start moving to Quaternions as they are easier to work with

vapid scarab
fair drum
#

dig into the functions and build your own. i just can't tell you the math behind the why

vapid scarab
#

that is true.

#

thanks for the reminder.

fair drum
little raptor
#

@vapid scarab

vapid scarab
#

Thanks!

vocal chasm
#

Is there a way tyo make the collor of a callsign in sidechat a different color than blue?
I want to do something like modernwarfare where friendly armed forces turn to opfor, and let it be obvious by the sidechat and the callsign changing color

warm hedge
dusk gust
tropic nimbus
#

I have a problem
Im using this to get an array of all muzzles, what ammo is loaded, and how much ammo it has
However, when i use it with a disposable (eg, the RHS m136) it breaks the disposable and prevents it from being reloaded
Does anyone see a different way i could be doing this?
(before people ask if things are defined, they are, it works, it just doesnt like disposables)
https://github.com/acemod/ACE3/pull/10541/files#diff-efc2950c84a6c2322fd5df1edaa9543606cbd8d7b1a0b16631ba631f7932a54e

proven charm
#

please post your description.ext

#

is the image size ok?

dusk gust
#

Anyone have any idea where the saved3DENInventory variable comes from?
I see it accessed in BIS_fnc_unitHeadgear, however I don't see any place that it is created.
It's set globally on all units, and over a 2 hour restart has been set over 100k times, so trying to track it down.

south swan
#

inb4 "proper path separator is \"

pallid palm
#

so it worked when you put the .paa file in the main mission folder

#

ill have to try that lol @knotty moth

tulip ridge
#

Did you try using \ as the separator?

#

That's now how that should be, you should do images\info1.paa

split ruin
#

how to force AI heli pilot to hover on one place ? 🤷

#

I have found only this command isAutoHoverOn but I need something to force auto hover ...

split ruin
#

unfortunately it doesn't work if AI is the heli pilot

hallow mortar
#

If you disableAI "PATH" on them they'll probably stop and hover

split ruin
#

@hallow mortar Its working thanks! 👍

versed widget
#

is there a way to slow down flares when they fall i tried messing with setVelocity setting the z-axis to -0.0001 and such didnt make much a difference and 0 would stop it from falling completely.

fair drum
lunar mountain
#

Nice, gonna check it out

cobalt path
#

any idea why this doesnt work? Essentially I want all vehicles of those types to get an addaction

addMissionEventHandler ["EntityCreated", {
    params ["_entity"];
    vehiclelist = ["B_ION_Pickup_mmg_rf","B_ION_Pickup_rf"];
    if (_entity in vehiclelist)
    then
    {
        _entity addAction
        [
            "<t color='#FFCC00'>Interaction",
            {
                params ["_target", "_caller", "_actionId", "_arguments"];
            Script here;
            },
            nil,
            1.4,
            true,
            false,
            "",
            "true",
            10,
            false,
            "",
            ""
        ];
    };
}];
south swan
#

_entity is not a string blobdoggoshruggoogly

#

check for typeOf _entity in vehiclelist or something. And probably use a private array instead of global one if you don't need to change that on the fly. And if you do need to change that on the fly - use a tag in your global variable name blobdoggoshruggoogly

proven charm
#

and whats "Script here;"?

cobalt path
proven charm
#

alright

#

just making sure 🙂

#

typeof

cobalt path
#

just added it, checking

#

works

#

thanks

trim solstice
#

Not sure where to post but I'm trying to make a mod that brings up my tablet i have made and the picture for it. I have the dialog file made but im having a problem with the game running/bring up the mod. Not sure what im doing wrong.

trim solstice
#

dialog code is pretty long not sure if i should post it here or just dm you it but this part is in my init sqf
Tablet_available = false;

Tablet_addAction = {
waitUntil {(!isNull player) && (alive player)}; // Wait until player is alive and not null

// Add action to the player with the custom icon and name
player addAction [
    "<img image='addons\image\IconN.png' /> <t color='#FF0000'>Tablet</t>",  // Action text and icon
    { _dialog = createDialog "Tablet"; },  // Script to run when action is selected
    nil,  // Argument for the script (none here)
    -1,   // Priority (default priority)
    false, // Show window
    true,  // Hide on use
    "User19", // Shortcut key for the action
    "true",  // Condition to always show the action
    -1,    // Radius (not specified)
    false  // Don't allow when unconscious
];

Tablet_available = true;  // Mark that the action is available

};

// Wait for the player to be alive and not null
waitUntil {(!isNull player) && (alive player)};

// If the action isn't already available, call the function to add it
if (!Tablet_available) then {
[] call Tablet_addAction;
};

// Add event handler for respawn, so the action is added again after respawn
_EHRespawn = player addEventHandler ["Respawn", {[] call Tablet_addAction;}];

hallow mortar
open hollow
# cobalt path any idea why this doesnt work? Essentially I want all vehicles of those types to...
    if (_entity in vehiclelist)
    then
    {

this indentation hurts lol

if ((typeof _entity) in vehiclelist)

to have a cleaner code you can use reversed ifs

addMissionEventHandler ["EntityCreated", {
    params ["_entity"];
    private _vehiclelist = ["B_ION_Pickup_mmg_rf","B_ION_Pickup_rf"]; //no reason to have this global 
    if !(typeof _entity in _vehiclelist) exitwith {};  // if it not in the list, just go out
    _entity addAction
    [
        "<t color='#FFCC00'>Interaction",
        {
            params ["_target", "_caller", "_actionId", "_arguments"];
            //Script here;
        },
        nil,
        1.4,
        true,
        false,
        "",
        "true",
        10,
        false,
        "",
        ""
    ];
}];
proven charm
#

!code

wicked roostBOT
#
How to use SQF syntax highlighting in Discord

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

// your code here
hint "good!";
proven charm
#

Sneakyamr syntax highlight there ^

#

have you check that your code reaches createDialog and that Tablet is valid class?

open hollow
trim solstice
#

haven't checked and the class should good.
and oki FlyingTarta

proven charm
#

isnil takes string

open hollow
fleet sand
#

Quick question i knew this in past but i forgot now how would i update the text on procedural text texture ?
Basicly i want my count down to be shown on screen and with the text to show the timer ?

dusk gust
tropic nimbus
twilit mesa
#

vehicle and objectparent aren't working for me, anyone else notice this?

warm hedge
#

Share your code

twilit mesa
#

theres nothing to share the command doesn't seem to work, its probably on my end idk

warm hedge
#

What? You can share the code that doesn't work

twilit mesa
#

it was on my end, disregard

warm hedge
#

Asking for coding help 101: tell what is and how it is not working. Otherwise nobody can provide anything

night mantle
#

Entity: Me
Game: Arma 3
Looking for: Someone who can update this customized hetman mission to also include jets and planes even in custom factions and make them fly around ingame?

Send DM if interested
Paid: Yes
Contact: DM me
Additional info: I want you to edit the mission pbo and the scripts so that it detects jets and planes form custom factions and spawn them and have them fly around and fight and be ordered around by the hetman ai commander. No need to make custom scripts to force the AI jets to attack just have them spawn since currently it only detects helicopters

night mantle
proven charm
#

can you get the IP of the server in the server itself?

dusk gust
proven charm
#

hmm what about extension?

flint topaz
#

What is your intention as it might help find a good solution

proven charm
#

was planning on making custom server browser/list where you can grab IP of server and join it

flint topaz
#

But for the more typical, an extension and checking the status of a server using a post request might be best, I’ve not really looked into this much though, so success might vary.

proven charm
#

it says that command doesnt work

dusk gust
#

Not in MP, no

proven charm
#

maybe i could use serverName instead

#

its not like i can launch arma from website with the IP anyways

#

though some one might want to put the IP in launcher and auto join

fiery gull
proven charm
#

ooh nice 🙂

fiery gull
#

but once again if you are creating a website you can either just scrape all the arma 3 servers using the steam master server and filter by whatever ur mission is, or just have people manually register their server on your website

all this extension sending server ip to an api to then list it is overly complicated for no reason

#

and if you are using an extension to send the ip to an api, you might as well still just use the arma 3 https://community.bistudio.com/wiki/htmlLoad function and grab the ip on the api side (server will request webpage from your api, your api records the IP and uses it for your server list), saves you having to write a useless extension

proven charm
#

the problem... at least with arma server browser is that it cannot find lets say missions made by me. it can only filter by server name which doesnt quarantee all my missions are listed

fiery gull
# proven charm the problem... at least with arma server browser is that it cannot find lets say...

once every x minutes go over all 4000 arma servers (querying 4000 servers really isn't that much) and request what mission file they are running like was already mentioned #arma3_tools message
or use the htmlLoad
or have people list their server on your server list if they actually want to be listed there
or use the overly complicated extension that grabs the servers ip and send it to your website/api

the solutions are there

#

The chances of someone manually registering their server on your server list are higher than somebody running some unknown extension with questionable functionality

proven charm
#

i was thinking of using POST to the website to register the server

fiery gull
# proven charm i was thinking of using POST to the website to register the server

or use GET and provide server information as parameters...
You are trying to come up with a solution to a problem that doesn't exist

  • htmlLoad sqf to ask the server to register on the server list
  • web server validates the the IP given by the htmlLoad is actually running and arma 3 server with your mission (use the steam api)
  • web server adds the server to your server list
proven charm
#

htmlLoad would work too, already wrote C# code to do the same 🙂

fiery gull
#

You expect servers that run your mission to run your extension too tho?
Why should I as a server running your mission add a separate mod that will run an extension just to register to my server on your serverlist

proven charm
#

my mission already requires mod and extension so it wouldnt be big deal

proven charm
#

why does this only open the launcher?

#
<a href="steam://rungameid/107410/ -connect=127.0.0.1 -port=2302 ">test</a>
dusk gust
proven charm
#

ya makes sense

south swan
#

--nolauncher is a thing

dusk gust
#

The more you know...

south swan
#

<a href="steam://run/107410// -window -nosplash -nolauncher">test</a> shows a steam confirmation prompt and when i agree runs the game @proven charm blobdoggoshruggoogly

sharp torrent
#

Is there a way to select the highest ranking alive unit from group ?
I am doing right now the

private _HQCand = {rating _x} forEach (alive _unitG);
private _NewHQ = _HQCand call BIS_fnc_greatestNum;

but I know it will not work, since _NewHQ would be a unit rating, not the unit...

sharp torrent
#

And script further down requires position, that is inherited from squad leader and if he is gone, it gets object nulled...

south swan
sharp torrent
#

I was thinking about using "select" command for selecting out of array, but this will work perfectly. Thanks.

drowsy geyser
#

Is there a fisheye lens effect in Arma 3 or is it possible to simulate this effect somehow?

warm hedge
#

No

junior moat
#
case "STRONG": {
    private _tankPos = [_spawnPos, 0, 25, 5] call BIS_fnc_findSafePos;
    private _tankArray = [_tankPos, 0, _tankClassname, _side] call BIS_fnc_spawnVehicle;
    private _tank = _tankArray select 0;
    private _tankCrew = _tankArray select 1;
    private _tankGroup = _tankArray select 2;

    private _ifvPos = [_spawnPos, 0, 25, 5] call BIS_fnc_findSafePos;
    private _ifvArray = [_ifvPos, 0, _ifvClassname, _side] call BIS_fnc_spawnVehicle;
    private _ifv = _ifvArray select 0;
    private _ifvCrew = _ifvArray select 1;
    private _ifvGroup = _ifvArray select 2;

    [_tankGroup, _toPosition, 0, "SAD", "AWARE", "YELLOW"] call CBA_fnc_addWaypoint;
    [_ifvGroup, _toPosition, 0, "SAD", "AWARE", "YELLOW"] call CBA_fnc_addWaypoint;

    {
        _attackArray append [_x];
    } forEach [units _tankGroup, units _ifvGroup];
};
``` is this an efficient way to do this? or is there a better way?
warm hedge
#

Efficient way to do what?

tulip ridge
#

I don't see why you need a loop at there at all, and I think you're getting nested arrays when you don't need them

junior moat
opal zephyr
little ether
#

Hey lads, maybe a silly or simple question but I'm at the end of my rope

Got a classic 2 part vehicle spawner set up;

  • Invisible helipad
  • Terminal with a spawn script

Work great but I wanted to put that spawn locations on a larger moving vehicle (aircraft carrier style) but the deployment area for my vic is NARROW and the randomness of normal getATL spawn is getting it blown up.

Here's what I'm trying to work out/implement;

  • Aircraft carrier has a bird attachTo'd with a "Clamp Release/engage" script (done)
  • Either when bird is destroyed or when terminal is used (I'd settle for either), bird spawns and is attachTo'd at the exact model co-ordinates that won't get it blown up on an aircraft carrier that could have very well moved since the bird left

My issue is finding those model co-ordinates, how the hell do I go about finding them?
Is there a way I can take the initial position of the bird relative to the carrier, store that, then use that for the bird spawn/respawn? I thought I was getting somewhere with getrelpos but it doesn't seem to be what I need.

Picture should clarify a bit

Thanks in advance!

sharp grotto
junior moat
thorny osprey
#

Is anyone aware of a script that can override Hide and/or Stop commands given by the player to his group?

opal zephyr
junior moat
little ether
sharp grotto
little ether
thorny osprey
# little raptor joinSilent

That does it for Stop, but not all units on Hide. For some reason the last or second units in group (“formation leaders”) stay stuck in Hide after JoinSilent and again a doMove. It’s like it’s stuck in the FSM somewhere…

little raptor
#

Do you do joinSilent on the current group, or do you create a temp group, joinSilent into temp group, then move them back into the current group?

#

In any case, try both

thorny osprey
#

Will try again with a temp group, but think I already did. Hide is a persistent command 😉

#

Is there need for a sleep between the joinSilents?

#

@little raptor Nope, even after joinSilent to another group, the unit goes back into Hide after returning and being told to doMove somewhere... feels like a bug

#

Only player commanded Regroup will fix it, it seems.

shrewd ermine
#

Does anyone here know a place I can find a scripter for my unit? ours left due to life getting hectic and im not sure where to find a replacement. You scripters are like gold lol

shrewd ermine
#

Thank you!

junior moat
#

for some reason, this disableAI "MOVE"; put into a units init box seems to make it so that the unit cant turn either, anybody know why?

faint burrow
junior moat
#

ah im stupid i meant to use PATH

#

ignore me being stupid 😭

tough abyss
#

Trying to create some small AOs with tasks in my mission. At the mission init it will select a random AO (all AOs are pre made hidden layers). Randomly selected AO will then show and enable simulation. The issue is getting tasks/task modules to show in that layer. As it stands all tasks start on mission start. Regardless of what layers enabled.

I was thinking maybe use a trigger to check if the layer is enabled that would then fire up the createtask module to create a tasks in that layer only?

Some advice would appreciated .

frank lynx
#

How do i script to create an object

#

the wiki is confusing me

frank lynx
#

not a vehicle

fleet sand
frank lynx
fleet sand
frank lynx
#

What is the class name

fleet sand
frank lynx
#

Can i keep the "createVehicle" or do i need to change that

fleet sand
#

createVehicle is a command witch is createing a type of object on a positon.

hallow mortar
# frank lynx Can i keep the "createVehicle" or do i need to change that

Any object that is not a) a baked-in terrain object or b) intelligent is technically "a vehicle" in Arma. The game doesn't make a hard distinction between "vehicle" and "non-vehicle object", they are all the same basic thing, just with varying properties. deleteVehicle and createVehicle apply to everything except full AI (createUnit) or limited AI (createAgent).

primal trench
#

Is there a way to reference the last word in a string?

warm hedge
#

Word? Not a character?

frank lynx
hallow mortar
#

Same way you'd save anything else to a variable.

my_variable_name = createVehicle [ ... ];```
frank lynx
#

ty

primal trench
warm hedge
#

If you think of English (or any other Latin) words,

_str = "I have a little lamb" splitString " ";
_str#-1```should return "lamb"
primal trench
#

Ok thanks I'll try it

primal trench
#

Evidently _str select -1 works as well

warm hedge
#

Well they are semantically the same

tulip ridge
#

# is just select with higher priority

little ether
#

Could use some help finishing up the following code, as it's frying my brain still.

Everything works except for the setPitchBank, if the platform is on an angle I want the spawned vehicle to attach at that angle, at the moment it's the right position but wrong angle, clipping through the carrier vessel. I realise setPitchBank is looking for the specific numbers, not a variable name, but am unsure of how to get the correct numbers into each place after storing in a variable, as this pitch and bank can change frequently.

_pos = [(getPosATL h1) # 0, (getPosATL h1) # 1, (getPosATL h1) #2 + 5];
_relangle = h1 BIS_fnc_getPitchBank;      
_vehicle = createVehicle ["17th_Valkyrie_Transport", _pos,[],0,"NONE"];   
{ _x addCuratorEditableObjects [[_vehicle], true] } forEach allCurators;   
[_vehicle, _relange, _relange] call BIS_fnc_setPitchBank; 
_vehicle setDir (getDir h1);  
_vehicle setPosWorld (AGLToASL(h1 modelToWorld [-0.135254,8.3811,-2.253628]));   
[_vehicle, Hdropship] call BIS_fnc_attachToRelative;      
}]};```

Thanks for any help offered!
warm hedge
#

setPitchBank uses an object, a number and a number. You have two arrays

little ether
#

Yeah I get that sorry, I just don't know how to take the getPitchBank or otherwise find those numbers when the action is used, then apply those numbers

I'm very much newer to arma coding and this is what I'm trying to work out 😂

tulip ridge
#

BIS_fnc_getPitchBank returns an array of [pitch, bank]

#

So you can just use params to get those values easily:

(h1 call BIS_fnc_getPitchBank) params ["_pitch", "_bank"];
warm hedge
#

Or use select or #

tulip ridge
#

Params is easier for newer people to understand IMO

warm hedge
#

Well preference, I guess. I don't just really use it for very one-time non-complex declaration

tulip ridge
#

That code could just use some clean up in general too, I don't know why you have the whole thing wrapped in a call

little ether
#

So looking at that it would pass each of the values off to variables that are only readable within that call loop (what _variable does right?). But then don't I hit the same issue with setbankpitch?

#

It's part of a larger spawner

#

Whole code


   
call{this addAction ["Spawn Valkyrie",{      
_pos = [(getPosATL h1) # 0, (getPosATL h1) # 1, (getPosATL h1) #2 + 5];
private _relangle = h1 BIS_fnc_getPitchBank;      
_vehicle = createVehicle ["17th_Valkyrie_Transport", _pos,[],0,"NONE"];   
{ _x addCuratorEditableObjects [[_vehicle], true] } forEach allCurators;   
[_vehicle, _relange, _relange] call BIS_fnc_setPitchBank; 
_vehicle setDir (getDir h1);  
_vehicle setPosWorld (AGLToASL(h1 modelToWorld [-0.135254,8.3811,-2.253628]));   
[_vehicle, Hdropship] call BIS_fnc_attachToRelative;      
}]};      
    
call{this addAction ["Spawn Vulture",{      
_pos = [(getPosATL h1) # 0, (getPosATL h1) # 1, (getPosATL h1) #2 + 5];      
_vehicle = createVehicle ["DMNS_40k_Vulture", _pos,[],0,"NONE"];      
{ _x addCuratorEditableObjects [[_vehicle], true] } forEach allCurators;      
_vehicle setDir (getDir h1);  
_vehicle setPosWorld (AGLToASL(h1 modelToWorld [-0.0712891,-10.7347,-3]));   
[_vehicle, Hdropship] call BIS_fnc_attachToRelative;         
}]};     
   
call{this addAction["<t color='#ff4000'>Repair/Rearm",    
{_veh = nearestObjects [h1, ["Helicopter","Plane","Car","Tank"], 10] select 0;     
_veh EnableSimulation false;     
_veh setvehicleLock "LOCKED";     
_veh setDamage 0;     
_veh setFuel 1;     
_veh setVehicleAmmo 1;    
_veh EnableSimulation true;     
_veh setvehicleLock "UNLOCKED";     
}]};    
  
call{this addAction["<t color='#37A9E7'>Unclamp Vehicle", {_veh = nearestObjects [h1, ["Helicopter","Plane","Car","Tank"], 10] select 0; detach _veh;}];}   
  
call{this addAction["<t color='#37A9E7'>Clamp Vehicle", {_veh = nearestObjects [h1, ["Helicopter","Plane","Car","Tank"], 10] select 0; [_veh, Hdropship] call BIS_fnc_attachToRelative;}];}   
     
call{this addAction["<t color='#37A9E7'>Store Vehicle", {_veh = nearestObjects [h1, ["Helicopter","Plane","Car","Tank"], 10] select 0; deleteVehicle _veh;}];} ```
warm hedge
#

The point is:

  • getPitchBank returns an array with two numbers
  • setPitchBank uses two numbers
  • You need to unwrap the array to use these numbers because what you have right now is not a number but an array
little ether
#

Yeah okay awesome, so the fnc WILL read variables as I put in, I've just got to seperate it out first

#

Much much MUCH appreciated

fleet sand
#

Basicly code vise this is what he is telling you:

(h1 call BIS_fnc_getPitchBank) params ["_pitch","_bank"];
[_vehicle, _pitch, _bank] call BIS_fnc_setPitchBank;
little ether
#

I was just about to say, that initial variable shouldn't be needed right? I don't need to store the array once it's passed out

warm hedge
#

Theoretically. Preference you take matters

fleet sand
little ether
#

Not working I'm afraid, I'm going to keep tweaking on my end just in case I've stuffed something up

fleet sand
little ether
#

Not working either sadly, I've played around with a few positions for the code

Placed after setposworld but before attachtorelative results in the same picture as above

Placing it after attachtorelative breaks it completely

little ether
#

I've gotten it working by swapping to select as Polpox suggested, thanks again everyone!

remote cobalt
#

Hey Folks, its me, lost in Configs again.

I am trying to read out how many passengers a helicopter can have to dipslay that in an info screen.

I would like to view it without spawning the helicopter, so I thought I try to find something in the config.

I found "transportSoldier" but I already saw that this is often not the real passenger count. For the Ghost Hawk it is, for the MH-6 Little Bird its not (it shows 2 but infact 6 passengers can take place). This is most likely due to the fact, that the four seats on the benches are also turrets.

Then I thought about counting the entries in cargoActions. This is mostly precise (Ghost hawk has 8, Little Bird has 6, Chinook has 16) but in case of the unarmed Chinook, it has only 16 but he can fit 18 peaplo in it. This is, again, because of the two "additional" seats are Turret seats.

I admit, now I am out of ideas. Is there any way to get a precise count of how many people can fit in a helicopter (without the crew) or do I really have to spawn the heli, count the free seats and then despawn it?

meager granite
#

You'll need to count turrets

#

Figuring which turret is passenger can be a bit tricky

#

No weapons? Person turret? Some mods have 2 turrets for one passenger (RHS vehicles where you can swap between passenger and firing turret for one soldier)

remote cobalt
meager granite
#

Well these are exceptions, maybe you can account for them too somehow

#
private _cfg = configFile >> "CfgVehicles" >> "someclass";
private _seats = getNumber(_cfg >> 'transportSoldier');
private _turret_seats = [];
{
    if(getNumber(_x >> "isPersonTurret") > 0 && count(getArray(_x >> "magazines")) == 0) then {_turret_seats pushBack [_forEachIndex]};
    private _index = _forEachIndex;
    {
        if(getNumber(_x >> "isPersonTurret") > 0 && count(getArray(_x >> "magazines")) == 0) then {_turret_seats pushBack [_index, _forEachIndex]};
    } forEach ("true" configClasses (_x >> "turrets"));
} forEach ("true" configClasses (_cfg >> "turrets"));
#

Didn't test it, it should fill _turret_seats with paths of person turrets with no weapons (I think there are seats where you can shoot the turret AND turn out to shoot handheld guns)

#

_seats + count(_turret_seats)

#

otherwise you can just increase the counter instead of pushBacking paths

#

also make it recursive function

#

or more complex conditions

remote cobalt
proven charm
#

nevermind was using old buggy code it seems

lone tiger
#

Im trying to make a mod that adds realistic fighting, does anybody know how I could make animations for stances and throwing different types of punched (like hooks, crosses etc.)

pallid palm
#

when i go running i aways bring a knife you run faster with a knife lol he he

#

just kidding m8s lol

vapid scarab
# little raptor <@295726442208165889>

Ummm... finally tested this, and well.... the vehicle on the left is where I am getting the input dir and up from, and the vehicle on the right is the one being applied the rotation vector after.
Looks like i might need to relearn that math🙃

#

Edit: ignore this.... I tried a few weird things including reversing the vectors, and I thought fixed it back before testing other things, but I guess not which screwed the other tests. Fixed this and figured out it should be X,Y,Z. I think the editor swaps the values after they are passed.

fleet sand
fleet sand
rapid vortex
#

I'm trying to add Get In Pilot and Get In Gunner actions to the Sentinel. Needs to work for multiplayer. Here's what I have currently:

private _GetInPilot = this addAction ["Get in Sentinel as Pilot", {player action ["getInPilot",_this];}]; 
this setUserActionText [_GetInPilot, "Get in Sentinel as Pilot", "<img size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\getinpilot_ca'/>"];

Getting an error. The action option and icon appear but the action doesn't work.

fleet sand
vapid scarab
fleet sand
queen shoal
#

I was wonder if there's any way to make a glitch screen effect that could be trigger from the zeus executor module?

rapid vortex
fleet sand
# queen shoal I was wonder if there's any way to make a glitch screen effect that could be tri...

You can make it with postProcess effects like film grain you can see example code here and see if that is the glitch effect you want.
https://community.bistudio.com/wiki/Post_Process_Effects
Or with the ppEffectEnable, ppEffectAdjust,ppEffectCommit
example:

        "dynamicBlur" ppEffectEnable true;   
        "dynamicBlur" ppEffectAdjust [50];   
        "dynamicBlur" ppEffectCommit 0;     
        "dynamicBlur" ppEffectAdjust [0.0];  
        "dynamicBlur" ppEffectCommit 2;
rapid vortex
fleet sand
fleet sand
rapid vortex
proven charm
#

no space in _car?

fleet sand
proven charm
#

it should be ```_target moveInAny _caller;

#

actually the params is on wrong order

#

should be params ["_target", "_caller", "_actionId", "_arguments"];

fleet sand
proven charm
#

the moveInAny was fine

#

fix params instead for it to make sense 🙂

#

still missing "_actionId" if you want it to be perfect

fleet sand
#

i would say _args is also unessry

proven charm
#

yes but you have _args there at its place

rapid vortex
#

The syntax for moveInAny is unit moveInAny vehicle.

proven charm
#

yep

rapid vortex
#

Then why _target moveInAny _caller?

proven charm
#

that was my bad, i didnt realize the params were in wrong order.

#

so just ignore that :/

#

Legion's code should work

rapid vortex
#

@fleet sand @proven charm Thank you both, working as intended now. 🙂

little raptor
#

xzy is how they're stored in sqm (and in radians)

#

(which is what SaMatra wanted when I replied to him)

little raptor
fleet sand
#

Quick Question how would i stop VLS from shooting this is what i have currnly i want it to shoot 1 time but it keeps on shooting.

private _realPos = _userInput call CBA_fnc_mapGridToPos;
private _offset = _realPos vectorAdd [50,50,0];
private _target = createVehicle ["LaserTargetW",_offset,[],0,"None"];
private _dummy = createVehicle ["Land_HelipadEmpty_F",_offset];
_target attachTo [_dummy];
[west,[_target,120]] remoteExec ["reportRemoteTarget",_gun];
[_target,[west,true]] remoteExec ["confirmSensorTarget ",_gun];
[gunner _gun,_target] remoteExec ["doTarget",_gun];
[_gun,[_target]] remoteExec ["fireAtTarget ",_gun];
[gunner _gun,objNull] remoteExec ["doWatch",_gun];
fleet sand
#

nvm i got it another way.

vapid scarab
fleet sand
versed trail
#

How do I make a unit exit a looping animation smoothly with the designated end animation?
I have a script for

unit playMoveNow "ACTION_START";
unit playMove "ACTION_LOOP";
``` and a seperate script later for ```
unit playMoveNow "ACTION_END";```
When the second script is ran after the first one finishes (and the animation is still looping) nothing happens and the animation continues. Same thing happens if (which a friend suggested) I use empty quotes `""` instead of the `"ACTION_END"`. The animation still ends and the loop terminates, giving way to the end animation to play, if the unit is shot / dies. Any ideas?
#

I can put the specific lines here if needed but this seems to be more of a structural issue im facing I havent seen documented on the biki

fleet sand
versed trail
#

Havent tried that but I'm worried about it clipping directly to the anim end instead of being contiguous like the anims are supposed to

thorny osprey
#

I need some insight into why this is not working:

_m = createMine ["SatchelCharge_F", player, [], 0];
player addOwnedMine _m;
player action ["SetTimer", player, _m];

Not working as in the timer not being set. What object do I need to provide to the SetTimer action for this to work?

thorny osprey
frank lynx
#

How do i script so if i leave the area of the trigger a task will be completed currently i have a create task that is synced to a state task (to succeed) and a trigger with no code in it because i dont know how to

vapid scarab
#

In the init function of a module, how would I determine if the module was created from the mission file or by a curator/zeus?

#

The prupose being, if a module was preplaced in 3den, I dont attempt to open a dialog, but if it was placed by a curator, then I need to open a menu.

rich frost
#

When using Stringtable.xml, what happens when an entry does not have the used language?

Will it fallback on Original or to English?

leaden ibex
#

There's no way to make a turret of a tank turn to a desired angle/position just by setting it's animation source value, right? haha

granite sky
#

IIRC that does work.

leaden ibex
#

yeah, kinda bummed about it
But I could use alt of lockCameraTo

open hollow
#

i have a question about HandleChatMessage missioneventahandler.

if i exxecute this eh in player1 ( side blufor) and player2 (side opfor) writes something in the side chat.

player1 eh is triggered with that message?

leaden ibex
#

Furthermore, is there a way to make a turret fire even when no one is sitting inside of it? monkaHmm
All the fire commands I've seen look like they are targeted towards whoever controlls the turret

flint topaz
#

even a system message will trigger

#

aka any messages a client sees will trigger that EH

faint burrow
open hollow
#

it should trigger

flint topaz
#

Yeah so if you see a message on your machine, it will trigger that EH

frank lynx
#

I put to any player not present

#

synced it to state of task

#

Doesnt work

#

@faint burrow this is what is going on rn

thorny osprey
faint burrow
frank lynx
#

What does server only do

faint burrow
#

Checkbox tooltip describes this.

frank lynx
faint burrow
#

Have the task been created?

frank lynx
#

maybe it has and im just dumb

#

The task was on succeed thats why

#

it wasnt assigned

faint burrow
#

You can assign it.

frank lynx
#

Wait i think i fixed it

#

Yep fixed it

#

it was not synchonised to the player

versed trail
#

There's a page on the wiki for "synchronizing waypoints" where you can link a trigger to a waypoint or a waypoint to another waypoint https://community.bistudio.com/wiki/synchronizeWaypoint
question still is though, what does this even do here? there's a behavior in the editor where you set a trigger as a waypoint activation, is this just the script version of that? there's also the ability to sync two waypoints, which makes less sense. can you set a waypoint to complete once a different waypoint completes?

hallow mortar
#

There are some things you can do with syncing waypoints together, like connecting the waypoints of transport crews and the groups riding in the transports to make them do drop-offs properly. It's a bit opaque though and I never use it so can't offer much insight

vapid scarab
#

Afaik, dont use set trigger as waypoint activation. I havent found a behavior that it works for.

hallow mortar
# vapid scarab Afaik, dont use set trigger as waypoint activation. I havent found a behavior th...

It does work. It makes the trigger activation a condition for the waypoint to complete. So for example, if you have a Move waypoint connected to a trigger, the AI will move to the waypoint position, but can't complete it and move on to the next until the trigger is activated. Or, if used with a Skip Waypoint trigger, it allows the trigger to force skip that waypoint, which is useful for e.g. Hold waypoints.

#

Source: I've used it

steep verge
#

Hello i hope this is the right channel to ask. I wanted recently to tweak some weapon optics to make them a little bit more "realistic" in terms of the usually engagment ranges which occur in Arma 3. For example i would like to change the default zoom of the RHSUSAF ACOG optics, to be less powerful and change the zoom to x2 from x4. Where should i begin?

hallow mortar
#

You're gonna need ✨ a mod ✨
Those kinds of properties of an item can't be modified by scripting. Instead, you'll need a mod that can change the item's config. For that, you'll need #arma3_config .
Btw, I believe the RHS ACOGs have an effective zoom (accounting for the slightly wacky way zoom is calculated in Arma) of 2.9x. Unless we're thinking of different variants of the ACOG. The ACE Arsenal shows the sight's true effective zoom when you select it so it's easy to check (....if you have the game open)

steep verge
#

Thank you very much for the response sir! 🫡

frank lynx
#

Hey i wanna script a helicopter crash and i have the crash but how do i make it so after the plane hits the ground and the player exits damage will be enabled and he will take some damage from the crash

#

Player damage is disabled so he doesnt die

#

but how do i make a trigger so its enabled and make him take some damage when it hits

pallid palm
#

player setDamage 0.5; or whatever you want

#

0.5 is 50%

#

or p1 setDamage 0.5;

#

player allowDamage true; player setDamage 0.5;

faint burrow
pallid palm
#

waitUntil { isTouchingGround Helo2 };

faint burrow
#

You can't use waitUntil in trigger's statements.

pallid palm
#

oh ok i did not know that

frank lynx
#

if (isTouchingGround player)

#

And what is the code to enable damage

pallid palm
#

i would make a script then execVM it from the trigger

#

player allowDamage true;

#

i guess i never tryed to use waitUntil in a trigger i guess thats why i didnt know that

#

but thx anyways m8 @faint burrow

#

your 1 of the good guys in here also

#

i hope some day i can be half as good as some of the guys in here

#

WooHoo Arma 3 yeah

pallid palm
#

if you use execVM then you can use sleep in your script

faint burrow
#

execVM isn't needed.

frank lynx
#

This is my code

faint burrow
#

You wrote that a trigger is used.

frank lynx
#

and without sleep

pallid palm
#

D1 is the player ?

frank lynx
#

No

faint burrow
pallid palm
#

i would name the player like p1 or something like that

frank lynx
frank lynx
#

i can just use "player"

pallid palm
#

well that would mean all player right

frank lynx
pallid palm
#

oh ok

faint burrow
frank lynx
faint burrow
#

It has at least 3 fields. Which one?

frank lynx
frank lynx
frank lynx
faint burrow
# frank lynx Wdym

Let's count: "Condition", "On activation", "On deactivation"... + extra fields. But you provided just the code. How are we supposed to figure out which field this code is in?

frank lynx
#

its in on activvation

#

Í might have fixed it sec

#

IIt needs to be in condition

#

Bro when i alt tab sometimes my screen goes black and i lose all of my progress

#

its so annoying

faint burrow
# frank lynx

Your trigger should be repeatable, have condition, where will be checked if if the heli (not player) is on ground and player is not in vehicle, and on activation code, where player damage will be enabled and set some damage. I don't see that.

frank lynx
frank lynx
faint burrow
#

Then determine when to consider that the heli has crashed.

frank lynx
#

Player touching ground works well though

#

and im gonna switch maps since the player gets stuck in the trees

faint burrow
#

OK, then set trigger's statements.

frank lynx
#

Now when i cant heal because the condition repeats itself

astral bone
#

brain fart-

private _magnetPositionCheck = {
params ["_positions","_newPosition",["_errorMargin",0.001,[0]]];
{
if((_x distance _newPosition) < _errorMargin)exitWith{
true;
}
} foreach _positions;
};

exitWith just breaks out of the for loop here, right? xD

#

also inb4 there's an obvious, and easier way to do this

south swan
#

inb4 ||findIf||

astral bone
#

ah

south swan
#

also, exitWith seems to exit from the scope containing the loop (the entire function call in this case, i suppose?)

astral bone
#

I thought that, but then it was returning false when I put a false after the foreach

#

hmm- Should I call it twice or implement a way to give it 1 positon, or an array of positions? xP

south swan
#

you're correct, i'm not*, exitWith stops the loop, execution goes to the next line when i fail less at testing*

astral bone
#

Might be useful to do array of positions for the long run- You know "Oh I remember making something that did this, lemme steal that real quick" xD

south swan
#

inb4 inAreaArray then 🙃

astral bone
#

Hmm- I don't think that'd work?

#

basically, I have 2 points. I need to know if point A is in the already handled positions. If no, handle it. Then, if point B, handle that the same way, but with a slight change.

#
private _roadPositions = [];
{
    private _info = getRoadInfo _x;
    Points1 pushBack [(_info select 6),(_info select 7)];
    if(_roadPositions find (_info # 6)< -0.5)then{
        _allObjs pushBack (create3DENEntity ["object","Sign_Sphere10cm_F",_info # 6]);
        _roadPositions pushBackUnique (_info # 6);
    };
    if(_roadPositions find (_info # 7)< -0.5)then{
        _allObjs pushBack (create3DENEntity ["object","Sign_Sphere10cm_F",_info # 7]);
        _roadPositions pushBackUnique (_info # 7);
    };
}forEach _connectedRoads;```
#

This is, currently, so I can see the roads made in terrain builder, but in game. So if I want to modify them, I can get the start to line up properly.
But also- Oirignally, for another reason I forgot- xD

#

Heh- my checks for -0.5 b/c- SOME REASON

#

I think I'll do just 1 test position per call, b/c then I get into having to worry about array index when I look at the results x3
Also wanna get rid of the points thing and maybe swap it out for just syncing in 3den-

astral bone
south swan
#

meme position iirc

astral bone
astral bone
#

position: Array format Position

south swan
frank lynx
astral bone
#

where is it located?

#

Trigger?

frank lynx
broken forge
#

Is there a way to reset the player's torso to being fully upright when creating a camera and having them play an animation?
Reference Image:

#

When I crouch and interact with the object to open the locker it's a lot better looking:

dusk gust
#

Cant remember if it changes torso movement

little raptor
#

It does reset the aim but the unit aims again automatically

#

Maybe try disabling AI aim before switchMove, tho not sure if it works on the player.
If it doesn't, create a temp unit and make him the player until the dialog is closed

astral bone
frank lynx
faint burrow
#

Post a screenshot with trigger's settings.

fleet sand
#

Quick question how would i apply ppEffect on a specific player ?

split ruin
#

What happens with array if we substract all elements. Can empty array exist ? I mean _arr = [];

split ruin
#

obviously I didn't 🤔

little raptor
fleet sand
# little raptor by remoteExec, or better, just doing things locally in the first place

So question would this work on Dedicated Server.
I want a player that enters trough portal to teleport and get applied the effect But only to that player that enterd trough portal.

params ["_trigger"];
private _posToTP = getposASL customPos;
private _trigger = _trigger;
private _playersToTP = allPlayers inAreaArray _trigger;
{
["",["","BLACK FADED"]] remoteExec ["cutText",_x];
//[0] remoteExec ["BIS_fnc_fadeEffect",_x];
} forEach _playersToTP;
uisleep 2;
{
_x setposASL _posToTP;
} forEach _playersToTP;

0 spawn { 
private _handle = ppEffectCreate ["ColorCorrections", 1500]; 
_handle ppEffectEnable true; 
_handle ppEffectAdjust 
[ 
 1, 
 0.4, 
 0, 
 [0, 0, 0, 0], 
 [0.8, 0, 0, 0], 
 [1, 0.587, 0.114, 0] 
]; 
 
_handle ppEffectCommit 5; 
 
private _min = 30*60; 
uiSleep _min; 
_handle ppEffectAdjust [0,0,true]; 
_handle ppEffectCommit 5; 
_handle ppEffectEnable false; 
ppEffectDestroy _handle; 
};
uiSleep 6;
{
[1] remoteExec ["BIS_fnc_fadeEffect",_x];
} forEach _playersToTP;
little raptor
fleet sand
little raptor
#

well just make your triggers local

#

you won't need any remoteExec

#

plus, triggers are activated by the first unit that enters

#

so if player 1 enters, the trigger gets activated

#

and if you remoteExec that, all players will get the effect, even those who are not in the trigger

#

also, while the trigger is active, if other players enter too, the trigger won't get "reactivated"

#

so to sum up, make triggers local. their activation condition should be true && {player in thisList} so that they only trigger when the local player enters the trigger

fleet sand
# little raptor well just make your triggers local

so like this:

/*
Type: None
Activation: AnyPlayer
ActivationType: Present
Repetable: False;
Server Only: False;

Codition: true && {player in thisList}

statment: 
[] execVM "trigger.sqf";
*/

private _posToTP = getposASL customPos;
cutText ["","BLACK FADED"];
uisleep 2;
player setposASL _posToTP;

private _handle = ppEffectCreate ["ColorCorrections", 1500]; 
_handle ppEffectEnable true; 
_handle ppEffectAdjust 
[ 
 1, 
 0.4, 
 0, 
 [0, 0, 0, 0], 
 [0.8, 0, 0, 0], 
 [1, 0.587, 0.114, 0] 
]; 
 
_handle ppEffectCommit 5; 

uiSleep 6;
[1] call BIS_fnc_fadeEffect;
little raptor
#

yeah I guess. give it a try blobdoggoshruggoogly

dusk gust
#

When using addMissionEventHandler with the additional _thisArgs param, if I were to pass it an array, will _thisArgs be a reference to the provided array, or is it copied into a new array?

Edit: Its a reference

tough abyss
#

But missionNamespace setVariable public does trigger PVEH apparently.

#

Also PVEH >>> remoteExec

#

remoteExec is sheduled and therefore dead to me

terse tinsel
#

hey, I have a question for you, I've been looking on the internet and I can't find the answer. how to make the selected object (in this case the column of smoke I made) visible, rendered from a greater distance from the rest of the surroundings, such as trees and houses. I know there's a way to do it because there was something like that in the "panda nuke" addon. my smoke column composition for example is called smoke 1. thank you in advance for your help.

south swan
terse tinsel
#

Thx guys, i will check

tough abyss
#

I have a few scripts to call for reinforcements and supplies, but somehow they are doubled in the mouse wheel menu, anyone know why? this is one the scripts

south swan
#

"i addAction 3 times, why does it show up more than once" blobcloseenjoy

warm hedge
#

What are we supposed to understand from this code and piece of pic

sharp grotto
hallow mortar
#

sleep 0
y tho

bold comet
#

each team i read this channel there's a whole new bunch of refactor tasks that pop in the backlog somehow

#

(had no idea about pveh)

#

if you write a book about best practices in arma scripting i'd buy it

#

and if it already exists as a blog or something i'd be interested to know instead of finding out along the way

tribal crane
#

Do you know who Killzone Kid is?

bold comet
#

yes

#

and i know about his blog

shell kiln
#

Is it possible to use the setSkill script to make the AI’s skill above 100%? If not, is there some other means of doing that?

tribal crane
#

Yeah, that's about it as far as blogs go.

meager granite
#

Teleport bullets into player?

bold comet
#

it's more like a bunch of arma scripting shower thoughts than a comprehensive and organised source for everything about best practices

#

imo

proven charm
#

maybe you could use doTarget . create a script that gives the AI new targets

bold comet
#

if you've followed it every day since the beginning then maybe you've got to read everything

#

but i didn't

tough abyss
#

There are huge disagreements between members of the Arma scripting community as to what the best practices are.

bold comet
#

same as in every other community about anything technical, yet there's a bunch of great books about Java for example

#

(talking about what i know)

#

my favorite is clean code

#

and especially code comments

#

if you want to see endless arguments full of nerd rage you can read about that

tough abyss
#

There are some guides about the basics of SQF, but they are outdated. (no params, private keyword)

bold comet
#

yet there's one great book about the matter

shell kiln
bold comet
#

indeed

shell kiln
#

Although from what I'ved picked up its an odd request.

bold comet
#

wait private is outdated ?

tough abyss
#

They talk about private local variables, but never mention the new private keyword

#

Which is a must and (almost) completely replaces private STRING and private ARRAY imo

bold comet
#

furiously looks for private on the bis wiki

tough abyss
#

private _var = 123;

#

vs.
private "_var";
_var = 123;

#

But then again, there are people that believe the private keyword is bad and private ARRAY should be used.

bold comet
#

well i can add some more refactor to the backlog

tough abyss
#

So a "common guide to SQF" would be nothing more than an explanation of everything

tribal crane
#

What's bad about the private keyword?

tough abyss
#

Nothing

bold comet
#

you don't need to put everything

tribal crane
#

As in, what do they think is bad about it?

tough abyss
#

It's the best.

bold comet
#

tbh with 50 pages you can cover all the most important

#

while vs handlers and all that stuff

pallid palm
#

hello all Merry X-Mass: Soo when my script is called from a radio trigger ,and in my script i put openMap True; How do i have the Map to only open for the player that called the script from the radio trigger Arma 3 ofcorse ?

#

in the radio trigger i have this && (Local Player) oh and its on a DED server

#

the map opnes for everyone ATM

tough abyss
#

X39 for example, said that it's better to use private ARRAY on the top of each script, so you have a better overview of all variables used.

bold comet
#

you don't need to side with one solution for each issue, just explain objectively what it's all about, the good sides of each solution, etc

pallid palm
#

@shell kiln set your game Options to Expert

bold comet
#

that's really all i need

pallid palm
#

or use this in a script

#
if (!isServer) exitwith {};
    {
        _x setSkill ["aimingAccuracy",0.000];
        _x setSkill ["aimingShake",   0.000];
        _x setSkill ["aimingSpeed",   1.000];
        _x setSkill ["commanding",    1.000];
        _x setSkill ["courage",       1.000];
        _x setSkill ["general",       1.000];
        _x setSkill ["reloadSpeed",   1.000];
        _x setSkill ["spotDistance",  0.000];
        _x setSkill ["spotTime",      0.500];
        _x allowFleeing 0;
    } forEach allUnits;
#

change the upper 2 settings to what ever you want

#

and the bottom 2 settings also

#

can just call the script from the initServer.sqf

tough abyss
#

And there are people that still see use in SQS

#

(KK for example)

pallid palm
#

name the script Ai_skill and call it from the initServer.sqf 0 = [] execVM "Ai_skill.sqf";

tough abyss
#

While I think that it should be completely avoided

#

It's not even worth learning the syntax , imo

shell kiln
shell kiln
pallid palm
#

yes it will work on all Ai

tough abyss
#

But I'm biased I guess , I don't know the syntax myself - never bothered.

tulip ridge
pallid palm
#

true dat

#

Dart any help with my ? up there m8

shell kiln
tulip ridge
#

You're seemingly having your trigger run on all machines, so it opens the map for all players

shell kiln
#

I'm curious if scripts can do that.

pallid palm
#

yeah how do i change that

tulip ridge
pallid palm
#

well the trigger is on a DED server

shell kiln
tulip ridge
#

Yes

shell kiln
#

Kk.

#

Thanks.

bold comet
#

i did quite a lot

tulip ridge
bold comet
#

until arma 2 i guess

pallid palm
#

ummm yah i have in the condotion this && (local player)

#

then in the onAtvation i call the script

tulip ridge
#

I mean just like a picture of the menu

#

You'd want the trigger to be set to local only Nevermind that setting is "Server Only"

pallid palm
#

oh i dont know how to do that

bold comet
#

started with ofp so there wasn't really a choice back then

granite sky
pallid palm
#

yeah i want only the player that called the script to have the map open

tough abyss
#

Yea.

pallid palm
#

inside the script i have openMap true;

faint burrow
#

Non-server trigger's statements are local to player.

pallid palm
#

well i mean the player who clicked the radio trigger

#

oh hmmmm

tulip ridge
#

Been a long time since I touched triggers, but apparently thisList is empty when triggered via radio. Which seems odd

#

I would've imagined it'd be an array with just the player that used the radio

pallid palm
#

oh so mayb thistrigger

tulip ridge
#

thisTrigger is just the trigger object itself

pallid palm
#

hmmmm i see hmmm

tough abyss
#

But why explain the past?

tulip ridge
pallid palm
#

right right i get that hmmm

bold comet
#

nostalgia :p

pallid palm
#

maby i should make the player open the map and not make the script open the map

#

that probly would fix it

tulip ridge
#

Yeah I'm not sure if you can detect what unit used a radio activated trigger

pallid palm
#

ahh i see ok

#

let me see what i can come up with as always DART love you m8

#

your my Fav guy in the hole world

#

he he

tough abyss
#

^ this is probably a big reason why there are disputes about best practices

pallid palm
#

ill have the script close the map but ill make the player open the map and the script will detect when the map is opened

#

thx again and again for your help @tulip ridge

tough abyss
#

"I always done it that way"

bold comet
#

again, same as everywhere else

pallid palm
#

WoooWa that worked Awsome WooHoo Arma 3

#

hell yeah

#

now when my friends are flying a chopper the map wont open on them lol

bold comet
#

i've had some great time forcing people to use the new stuff in java 8 for example

pallid palm
#

and the cancel script call, also worked, if the player close the map after opening the map

#

nice nice nice

bold comet
#

because i didn't tell them "it's better" but explained why it was better

#

in turn forcing me to learn more about it

tough abyss
#

You are a wise man, haha.

pallid palm
#

OH i may need to give a (time limit) to how long the script will w8, for the player to open the map

#

say the player never opens the map lol

#

after the radio trigger call

#

i dont want the script to wait very long for the player to open the map

#

ill bb soon my friends, if i may use the term (friends) WooHoo Arma 3

bold comet
#

all i say is that you get better result when you show people why something would work better than something else in certain situations

#

but you have to stay objective about the topic