#arma3_scripting

1 messages · Page 542 of 1

hearty plover
#

Hey folks.

#

Using ACE, I am reading the events documentation.

#

I am wanting to see what capture state a unit is in

#

I know how to set the state, but what do I need to get the state.

#

IE, is unit surrendered, handcuffed, etc.

hearty plover
#

Wait

#

I got it

#

Need to pass the event handler a function and make a new one.

#
    params ["_unit", "_state"];

    if (_state) then {
        systemChat format ["%1 was handcuffed.", name _unit];
    } else {
        systemChat format ["%1 was released.", name _unit];
    };
}] call CBA_fnc_addEventHandler;```
still forum
#

no

#

you are adding a handler

#

the function IS the handler

hearty plover
#

ooo.

still forum
#

you don't pass a function to a handler

#

you are adding a handler

#

just like the function name says

hearty plover
#

Well shit.

#

If that wasn't an aha moment.

#

Thanks.

#

So, if I wanted this eventHandler to only be added to a unit.

#

set unit*

still forum
#

if (_unit == X) then

hearty plover
#

In the handler? So there is no way to isolate it to the unit at the creation point, I have to deduce if the event firing is from the intened unit.

still forum
#

yes

hearty plover
#

Okay

#

So, if I plan to make a few of these

#

Is it wise to group them in one place, and set them all up at once.

#

some sort of jay_setupEventHandlers.sqf

#

As I am sure my little coop framework will have more.

still forum
#

when you add eventhandlers makes no difference

hearty plover
#

I was mainly thinking about the best way to keep my project organized.

#

Don't know if you have any best practices tips for that.

tough abyss
#

There is any way to associate a projectile to a unit making the HandleDamage EH have this unit as source?

harsh perch
#

Hi so im looking to implement a script which allows people to carry/drag wounded to safety and drag dead bodies out of sight and was wondering if some script like that was in arma 3 like a lost feature or do i have to port the a2 dragging/carry scripts to arma 3?

high marsh
#

There are still dragging, carrying, and unconscious state (while being dragged and not) anins.

#

So just attach the body to the dragger

tough abyss
#

@high marsh you can use those animations in dead units (ragdoll)?

high marsh
#

Not ragdoll

#

Manipulation of dead bodies I believe was a no go.

thorn saffron
#

Is there a way to control the sun light intensity via scripts? I want to experiment with creating an EDF like explosion effect where the sun essentially gets turned off and the lighting comes mostly from the explosion. It's not realistic in any way, but I really like that effect.

spark turret
#

Taro maybe check out colour corrections? they are used in the A bombs to get that "burning sky" effect

thorn saffron
#

actually I want the opposite, I want the sky to turn black

#

burning sky is most likely just an aperture tweak to blow out the light

plain urchin
#

did anyone figure out how BI made the sky so bright in the arma 3 contact campaign? or was it purely just the engine doing work

thorn saffron
#

@plain urchin aparture, you can experiment with it in splendid camera

#

sadly aperture tweaks don't work when NVGs are on

plain urchin
#

ohhh

#

that explains why no NVGs in the mission huh

#

interesting, thank you! i'll check that out

thorn saffron
#

there are NVG scopes though

astral tendon
#

How can I get all ACE itens in the CFG so I can put it available in the arsenal?

ornate sky
#

You want all the classnames?

real moat
#

Hey guys, how can I check to see if a certain function is running?
I feel like I saw some code for this somewhere, using waitUntil {}.

spark turret
#

@astral tendon
https://ace3mod.com/wiki/framework/arsenal-framework.html

I. Spawn the same amount of units as you have loadouts, give each unit one of them
II. Start the mission then press ESC once loaded
III. Clear the debug console then enter the following:

private _items = allUnits apply {getUnitLoadout _x};
_items = str _items splitString "[]," joinString ",";
_items = parseSimpleArray ("[" + _items + "]");
_items = _items arrayIntersect _items select {_x isEqualType "" && {_x != ""}};
copyToClipboard str _items;

IV. Paste the created array from your clipboard into the space where the items are listed CTRL+V. The array is created with brackets.

astral tendon
#

Thats not what I want, I want to get all class names from ACE so in case the player plays my mission with ACE it adds all items of ACE so he can use it.

hearty plover
#

^ Go to ace documentation

#

Class names are there.

#

@astral tendon

#

This is what you want.

astral tendon
#

That is anoying dificult to get, also its going to be a problem if ACE adds new stuff and my mission is outdated, so I would like to get a array of their class names in game.

hearty plover
#

Yeah, you can't just parse the class names of a mod in game via script.

astral tendon
#

How does the arsenal get those arrays?

hearty plover
#

Arsenal is engine built in

#

It reads mod config files.

#

Which is all or nothing.

#

Your two options are. Setup limited arsenal for ace, and limited arsenal without ace, if running ace spawn ace aresenal, if not spawn other.

#

Or, use that page to set it up.

#

I have not found a way to exclude a mod from arsenal yet.

#

Although that would be very useful, I am gonna look into it more.

#

Can you ping me if you find a solution on your end?

astral tendon
#

Fine, I will.

hearty plover
#

Sorry we are not all wizards who know the engine. Not like we built it. We all read the same docs you do man.

ivory lake
#

only way i know of would be to scan each class name and look for 'ace' etc and that may not work + will probably be laggy and slow

astral tendon
#

Unless if is a one time scan since there is no other reasion to keep checking.

ivory lake
#

ofcoursei ts ao ne time scan but its a lot of config operations and will probably lock the game up

#

atleast for a moment

#

and it might not even work, and might not even get everything

astral tendon
#

@hearty plover There is a DLC = "Something" in the configs, that may help filter stuff.

ivory lake
#

dont think ace use it

#

but you can also check if the author is the ace team string

#

otherwise it'll be configName + find

astral tendon
#
_arr = []; 
{ 
_Configname = configName _x; 
if (getText (_x >> "author") == "Red Hammer Studios") then { 
_arr append [_Configname]; 
}; 
} forEach ("true" configClasses (configfile >> "CfgWeapons")); 
_arr;

@hearty plover looks like thats it, I get a array of all RHS itens here, so we can use this kind of filter for ACE too.

hearty plover
#

Super useful!

#

Thanks!

still forum
#

ace classnames start with ACE_

jagged elbow
#

Anyone know of a way to control access to zeus slots? Currently using a whitelist but it seems to be causing some adeverse effects for some players, namely having to respawn to be able to access zeus. Whitelist:
``params [
["_player", objNull, [objNull]],
["_jip", false, [false]]
];

_uid = getPlayerUID _player;
_slot = vehiclevarname _player;

_whitelistedSlots = ["zeus1", "zeus2", "zeus3", "zeus4"];

if ((_slot in _whitelistedSlots) && {!(_uid in whitelistedUIDs)}) then {
["End1"] remoteExec ["endMission", _player];
};``

#

this is in initPlayerServer

#

with the uid's defined in initServer

ornate sky
astral tendon
#

What is the diference in initPlayerServer and initPlayerLocal?

ornate sky
jagged elbow
#

how would you recomend i initialize them?

ornate sky
#

try to put both the list and code into initPlayerLocal

jagged elbow
#

ill give it a go

ornate sky
#

I'm not sure, but it could work.

astral tendon
#

if the uid is defined in initServer you can use init.sqf since is the last to be cheked, or make a waituntil the variable is set.

ornate sky
jagged elbow
#

Awesome thanks for the help

sturdy cape
#

which eh can i use if a player leaves to the lobby and comes back into game? MPRespawn or onPlayerConnected?

ornate sky
#

what do you want to do @sturdy cape

#

I find onPlayerRespawn.sqf file very useful

sturdy cape
#

i want to check if a player is relogging and add a script to him,if

ornate sky
#

as in changing the role without leaving server?

still forum
#

do it serverside. with respawn EH

sturdy cape
#

for example.or combat logging during an event,thats my purpose

still forum
#

store players UID in an array, if UID is already in array on his spawn. then he went back to lobby. or legit respawned

#

for legit respawn detection you could use killed eh

sturdy cape
#

its for relogging only

#

i have mpkilled eh already made up and working

#

will respawn fire on relog?

still forum
#

mpkilled fires globally, probably not a good idea for this

#

respawn will fire if players respawn on start

#

instead of spawning into existent AI

sturdy cape
#

what the whole thing does is: on an event that happens on the server and lasts 2 minutes the server will set a pubvar containing the ticktime and setvariable this in a DB var on the player.if a player will relog before the event it stores when he did it that way.now i want the players to relog,getvariable and if var < var + 3 minutes itll know the player has logged out a minute before the event to avoid it.so punishment will follow.

still forum
#

Or HandleDisconnect might also be interesting

sturdy cape
#

playerconnected: Executes assigned code when client joins the mission in MP.

#

"joins the mission"

#

oh bughemia^^

ornate sky
#

Dialog question from me: You wouldn't happen to know how I can scale a UI so text size and pictures scale proportionately. Currently using SafeZone in UI editor at 1080p results in skewed Pictures, and text size seems constant when testing a 4:3 resolution.

quartz coyote
#

Hello, if one is leaning left or right, is there a way to force him upright via script ?

ornate sky
#

leaning?

#

as in Object not being upright or as in player control leaning?

quartz coyote
#

player control

sturdy cape
#

@still forum well playerconnected doesnt fire when just relogging it seems

ornate sky
#

Dialog question from me: You wouldn't happen to know how I can scale a UI so text size and pictures scale proportionately. Currently using SafeZone in UI editor at 1080p results in skewed Pictures, and text size seems constant when testing a 4:3 resolution.

Solved my problem by deducing element sizes from SafeZoneH.

ruby breach
#

@sturdy cape Could set a server variable with playerDisconnected, and have the client call a serverside function to check against that variable on initPlayer.

sturdy cape
#

interesting idea

#

nah,the event itself sets the var already and its written to db on disconnect

#

the problem IS the actual function on connection

#

but you brought me to something

#

initclient file in the addon will most probably run on join

spark turret
#

yo ho ho anyone know of a script that:
creates dynamic garbage on streets in front of players and deletes it behind them? kind of like the engima civilian traffic but not civ untis but trash.
i always struggle with laying roadside IEDs in missions bc i cant fill the streets with enough trash to make it not look obvious. i want trash on the street to be the normal thing.

hearty plover
#

Yo, does alive have a discord or slack?

chilly wigeon
hallow mortar
#

Question. I have an event handler that replaces every bullet a player fires with a given object.
I want to have an event handler that replaces every submunition spawned by every bullet a player fires with a given object. (Specifically shotgun pellets).
Is this possible?

tough abyss
#

Can i avoid agents to opens doors?

upper cliff
#

so how would i go about having four boats, one of which the player is in, start moving before the mission starts so that the player doesnt hear the squad lead telling the driver where to move to?

#

actually come to think about it, is there any way to just supress the squad leader move commands?

hallow mortar
#

There's a command to turn off AI radio protocol on dev branch (sadly not stable yet)

#

I think there's another way but I'll need to look it up

#

this setSpeaker "NoVoice" will make them silent but I think the text still appears

upper cliff
#

that'll work, any ideas for the boats?

hallow mortar
#

Waypoints will make the boats move. Just be careful with their placement so the AI doesn't have to take corners too tight (they will ground themselves). There's not really a reliable way to make them move before the mission starts because...well, the mission hasn't started.

#

If AI are set to move straight away they can sometimes move while the player still sees a loading screen, but I don't think that can be reliably reproduced (and the player still gets audio)

upper cliff
#

alright ill just have the audio fade in so the player cant hear the engine start

slender geyser
#

Is there a way how to spawn an animal in editor ? I know that zeus can do that but i need it in editor for animations

hearty plover
#

@upper cliff add a mission fade in effect and you will get the cnematic feel you want too.

brave jungle
#

@slender geyser use the module

#

To see it's animations, open debug, click animations, filter the faction the the animal and view it's animations

surreal peak
#

@slender geyser if you dont want to use the editor module, you can spawn one in with createAgent or createUnit

tough abyss
#

@sturdy cape what does relogging mean? If you leave mission and connect back without leaving server it should fire

upper cliff
#

Yeah I’ve already got that covered, my problem is more what to do with the 7 or 8 seconds of black

ivory jetty
#

Okay, anyone got any idea what the deal is with the Wildcat's camera turret? I've tried using lookAt on the gunner with the aimPos of another object, but I can't actually get the gunner to turn the camera at all.

#

it doesn't even work if I try and just look at the object either.

#

I'm trying to get the camera (and its searchlight) to follow a location I can set with another script, but so far it only occasionally looks at hostiles when it feels like it

hearty plover
#

Anyone here know anything about alive.

#

Trying to add some eden units as cas

#

setup the syncing, put the cas lines in the init

#

chopper shows up in the intel thing, but it says unit is combatineffective.

#

Its a crew MH60

ivory jetty
#

does it have any forward-facing guns?

hallow mortar
#

@upper cliff Use BIS_fnc_EXP_camp_SITREP or BIS_fnc_typeText (or a couple of other similar functions) to show a mission title or a time/location over the black screen

hallow mortar
#

Right. I'm trying to make a temporary speed buff that refreshes its timer every time you fire. I've got the "temporary speed buff" part working, and I think I've cracked the "refreshes its timer" part.

#

I just need a quick sanity check on what I've got so I can go to sleep happy and implement it in the morning.



// in a "FIRED" EH

// Start the buff
(_this select 0) setAnimSpeedCoef 1.5;

// Increment the buff stack counter
(_this select 0) setVariable ["speedBoost",(_speedBoost + 1),false];

// Spawn a thing so I can use sleep
(this select 0) spawn {

        sleep 20;

        // Decrement the buff counter
        _this setVariable ["speedBoost",(_speedBoost - 1),false];

        // If the buff counter runs out, turn off the buff
        if ((_this getVariable "speedBoost") <= 0) then {
            _this setAnimSpeedCoef 1
            };
    };
slim oyster
#

Is there a counting function that emulates the unique varname renaming in the editor? VarName -> VarName_1 -> VarName_2, etc?

prisma lagoon
#

Loadout contains non-arsenal item 'novoice' so players must have a voice now if they want to save/load loadouts to arsenal?

manic bane
#

Enemy vehicles without any sensor(passive or active) are too sensitive with missile.
When I shoot missile, enemy vehicles just pop smoke after second.
How can I change this? I want to make them to evade missile with random chance.
I'm not familer with AI so please give me a hint.

hearty plover
#

@hallow mortar What is this for? Speedhacking?

#

/.s

plain current
#

@hallow mortar the private var _speedBoost won't be defined inside the spawn scope, you need to pass it as an argument

hearty plover
#

Hey ACE folks.

#

How could I add a ACE Arsenal Interaction in an area.

#

Not in an object.

#

If in area, can ace arsenal.

#

Tried setting up a trigger, or something.

#

Didn't work cause the add action didn't seem to work.

still forum
#

@hallow mortar

I want to have an event handler that replaces every submunition spawned by every bullet

There is a mod config only ammo eventhandler which fires on submunition deploy. That might be able to do it.

#

@hearty plover

If in area, can ace arsenal.
addAction onto player himself, and add a distance check in condition. The distance check will run every frame tho, so perf and such. Or you add/remove the action on trigger enter/leave

hearty plover
#

Is the trigger any better?

#

On perf?

#

I can delete the trigger, which is nice.

#

Ment to be a sort of gear up phase after a breifing, so once that phase is done it can go away.

ivory lake
#

you can remove the action too

#

I think it'd be roughly the same...

#

maybe the trigger would check less often than the addaction condition would

real tartan
#

Can anyone post function code of BIN_fnc_attachChemlight ? apparently it is in new DLC according to @pierremgi. I don't have Contact DLC yet.

exotic tinsel
#

can someone point me in the direction of how to disable action to treat AI wounded? I want to add my own custom one.

ornate sky
#

ACE probably does that somehow, you might look into their medical or ask on their Slack.

hollow thistle
#

They don't, AFAIK you cant disable this action, they just replace FAKs and Medikits with another items that are not treated as medical items by engine.

spark turret
#

hey, i got myself a marker and made it tell me the objects of all trees in it (on takistan) but i cant read the trees classnames. why is that?

[169053: b_pinusm1s_ep1.p3d,169031: t_populusf2s_ep1.p3d,169047: t_populusb2s_ep1.p3d,169026: t_populusb2s_ep1.p3d,169090: t_populusf2s_ep1.p3d,169089: t_populusf2s_ep1.p3d,169029: t_populusf2s_ep1.p3d,169054: b_pinusm1s_ep1.p3d,169044: t_populusb2s_ep1.p3d,169046: t_populusb2s_ep1.p3d,169030: t_populusf2s_ep1.p3d,169045: t_populusb2s_ep1.p3d,169087: t_populusf2s_ep1.p3d,169088: t_populusf2s_ep1.p3d,169057: b_pinusm1s_ep1.p3d,169027: t_populusf2s_ep1.p3d,169043: t_populusb2s_ep1.p3d,169086: t_populusf2s_ep1.p3d,169015: t_amygdalusc2s_ep1.p3d,169092: t_ficusb2s_ep1.p3d,169058: b_pinusm1s_ep1.p3d,169028: t_populusf2s_ep1.p3d,169093: t_ficusb2s_ep1.p3d,169055: b_pinusm1s_ep1.p3d,169056: b_pinusm1s_ep1.p3d,168990: t_ficusb2s_ep1.p3d,168987: t_populusb2s_ep1.p3d,169091: t_ficusb2s_ep1.p3d] //array of _trees = nearestTerrainObjects [_MarkerPos, ["tree"], 150] select {_x inArea _MarkerName};
//typeOf _x returns: ""
hollow thistle
#

They are simple objects and have models only.

spark turret
#

does that mean i can not spawn them via script?

hollow thistle
#

createSimpleObject

#

Or you need to find the class that uses same model.

still forum
#

they are terrain objects, they don't have classes

spark turret
#

eh the whole point is im to lazy to place small forests in editor so im gonna fill a marker with said trees.
finding each models classname defeats the purposes of being lazy.
Will try createsimpleobject

spark turret
#

okay it works, uh but my trees spawn buried in the ground. Assume model center is somewhere up in the tree. suggestions how to read and fix this offset?

spark turret
#

solved it. will post how to soon

#

How to get trees on an arma map and spawn them with correct z offset via script:

//place a marker on the map over the forest you want to get the tree types from
//---------------Get all trees and their respective model paths in this marker:
    _MarkerName = "marker_27";
    _MarkerPos = getMarkerPos _MarkerName;
    _classList = [];
    _pathandPos = [];
    _trees = nearestTerrainObjects [_MarkerPos, ["tree","bush"], 150] select {_x inArea _MarkerName};

    {
        _info = getmodelinfo _x;
        _zOffset = getPos _x select 2;
        if !(_info in _classList) then {
        _classList pushBack _info;
        _pathAndPos pushback [_info select 1,_zOffset];
        };
    } forEach _trees;
    copyToClipboard str _pathandPos;
//returns something like this:
[["ca\plants_e\bush\b_pistacial1s_ep1.p3d",2.31839],["ca\plants_e\bush\b_pinusm1s_ep1.p3d",0.960999],["ca\plants_e\tree\t_populusf2s_ep1.p3d",13.7293],["ca\plants_e\tree\t_ficusb2s_ep1.p3d",9.57343],["ca\plants_e\bush\b_amygdalusn1s_ep1.p3d",0.966705]]


//-----------------------------------spawn these trees (in a line just for demo purpose)
_treeArray = [["ca\plants_e\bush\b_pistacial1s_ep1.p3d",2.31839],["ca\plants_e\bush\b_pinusm1s_ep1.p3d",0.960999],["ca\plants_e\tree\t_populusf2s_ep1.p3d",13.7293],["ca\plants_e\tree\t_ficusb2s_ep1.p3d",9.57343],["ca\plants_e\bush\b_amygdalusn1s_ep1.p3d",0.966705]]; 
for "_i" from 0 to 20 do {
_pos = getPosASL player;
_treeInfo = selectRandom _treeArray;
_tree = createSimpleObject [_treeInfo select 0, _pos];
_treePos = getPos _tree;
_tree setpos [(_treePos select 0) + _i*5,_treepos select 1,_treeInfo select 1];
};

hope someone can make use of it on future 😃

dull drum
#

Guys, for my health system I'm showing amount of Health while player is alive and "You died" if they are dead. UI part is controlled by while do loop. The thing is I'm using exitWith {//code that changes "health: nnn" for "you died"}. But on player Respawn the exitWith scope stays and Health UI is not getting reset, stuck with you died for some time. If I'm using while { alive player } the UI resets OK, but it never shows "you die" string as it is shown on if (_health <=0) so it's just don't work because while loop exits immediately on player death. Any recommendations? Thanks!

#

Ok, fixed it trivially.

if (_health <=0) then {// show "you died"};
if (!alive player) exitWith {};```
hallow mortar
#

Returning to the refreshing speed buff I was trying to make last night. I'm now (I think) passing variables to the spawned script correctly. But, the buff isn't being removed when the timer runs out. No script errors, just...not slowing down again.

_unit addEventHandler ["Fired",{
    
        // Define variables
        _shooter = (_this select 0);

        // Start the buff
        _shooter setAnimSpeedCoef 1.5;

        // Increment the buff stack counter
        _shooter setVariable ["speedBoost",((_shooter getVariable "speedBoost") + 1),true];

        // Spawn a thing so I can use sleep
        _buff = [_shooter] spawn {

            // Define variables for inside the spawn
            _shooterS = (_this select 0);

                sleep 10;

                // Decrement the buff counter
                _shooterS setVariable ["speedBoost",((_shooterS getVariable "speedBoost") - 1),true];

                // If the buff counter runs out, turn off the buff
                if ((_shooterS getVariable "speedBoost") <= 0) then {
                    _shooterS setAnimSpeedCoef 1
                    };
            };
        }];```
still forum
#

have you tried adding diag_log's everywhere so you can see what's going on?

hallow mortar
#

that'll be the next step, I guess

#

I don't do a lot of this

#

well, I put in a couple of diag_logs to get the value of speedBoost at key points, but...there are no corresponding lines in the rpt after testing

still forum
#

meaning your script doesn't run

#

search RPT for errors

hallow mortar
#

the only relevant error I see is some "Client: Nonnetwork object" stuff, but I can't tell if that's actually relevant

#

I know the script must be running up to the point where speedBoost is first defined, because the line before that is the one that turns the speed boost on, and I do go faster

still forum
#

not relevant

#

maybe your changes adding the diag_logs didn't get into the game

#

maybe still running old code

hallow mortar
#

I reloaded the scenario, still nothing

still forum
#

well something has to be logged ¯_(ツ)_/¯

hallow mortar
#
14:40:01 Starting mission:
14:40:01  Mission file: fa3_a28_the_crucible_v2
14:40:01  Mission world: Enoch
14:40:01  Mission directory: C:\Users\Lawrence\Documents\Arma 3 - Other Profiles\NikkoJT\mpmissions\fa3_a28_the_crucible_v2.Enoch\
14:40:03 soldier[B_W_Soldier_AR_F]:Some of magazines weren't stored in soldier Vest or Uniform?
14:40:03 soldier[B_W_Soldier_LAT_F]:Some of magazines weren't stored in soldier Vest or Uniform?
14:40:03 soldier[B_W_Soldier_LAT_F]:Some of magazines weren't stored in soldier Vest or Uniform?
14:40:03 soldier[B_W_Soldier_AR_F]:Some of magazines weren't stored in soldier Vest or Uniform?
14:40:03 soldier[B_W_Soldier_LAT_F]:Some of magazines weren't stored in soldier Vest or Uniform?
14:40:03 soldier[B_W_Soldier_LAT_F]:Some of magazines weren't stored in soldier Vest or Uniform?
14:40:04 c:\bis\source\stable\futura\lib\network\networkserver.cpp NetworkServer::OnClientStateChanged:NOT IMPLEMENTED - briefing!
14:40:07 Sound: Error: File: a3\sounds_f\vehicles2\armor\shared\add_layers\rattling_03_ext.wss not found !!!
14:40:07  Mission id: b17562108f04eca3609b5d6618c4b10bcbc28553```
and then a one minute gap until I end the mission and return to the editor.
still forum
#

then you eventhandler doesn't run

#

if it would run, it would log

#

if it doesn't log, it doesn't run

#

I trust a machine's doings more than a human stating what he's doing

winter rose
#

Skynet thanks you

hallow mortar
#

I can tell you straight up it runs. The first thing it does after I fire is increase my movement speed by 1.5. I can tell I'm running faster.

#

Hell just for you I'll make it a multiplier of 5 and take a video

winter rose
#

@hallow mortar disable EH, retry, check

spark turret
#

maybe you re looking into the wrong rpt

hallow mortar
#

There's only the one from today

spark turret
#

add more diag_log stuff

#

to know what exactly runs and what doesnt

hallow mortar
#

@still forum https://streamable.com/oji7f

Things I'm logging:

  • the AnimSpeedCoef immediately after I set it
  • the speed boost counter immediately after I set it the first time
  • the speed boost counter immediately after I set it the second time
  • the AnimSpeedCoef immediately after I reset it to 1

Things that are being printed:

  • the AnimSpeedCoef immediately after I set it
winter rose
#
_unit addEventHandler ["Fired", {
    params ["_shooter"];

    // Start the buff
    _shooter setAnimSpeedCoef 1.5;

    // Increment the buff stack counter
    _shooter setVariable ["speedBoost",(_shooter getVariable ["speedBoost", 0]) + 1, true];

    // Spawn a thing so I can use sleep
    private _buff = [_shooter] spawn {
        params ["_shooter"];
        sleep 10;

        private _speedBoost = _shooter getVariable ["speedBoost", 0];
        _speedBoost = _speedBoost - 1;

        // Decrement the buff counter
        _shooter setVariable ["speedBoost", _speedBoost, true];

        // If the buff counter runs out, turn off the buff
        if (_speedBoost  <= 0) then {
            _shooter setAnimSpeedCoef 1;
        };
    };
}];``` corrected and formatted
spark turret
#

dont log the effects, directly put ```sqf

diag_log "Hello this is script x im at line 5"; ```" soemwhere

hallow mortar
#

I'll try that corrected version

#

what's the purpose of the change to the getVariable bits?

winter rose
#

(fixed)

#

just in case a setVariable was never set before, the right value defines the default value that should be returned

spark turret
#

its a failsafe

#

so you dont have undefine variables that kill your script

proper sail
#

Does terminate work on an execfsmed script as well?

winter rose
#

what does the biki say?

proper sail
#
Terminates (aborts) spawned or execVMed script.```
winter rose
#

execFSM returns a number, so no

hallow mortar
#

Are you sure about this part?

 if (_speedBoost - 1) <= 0) then {```
i.e. shouldn't it be just `if _speedBoost <=0`
or does `_speedBoost` just not get automatically updated when the variable is decremented?
winter rose
#

not updated

hallow mortar
#

Right, makes sense then

winter rose
#

also, missing a (

#

re refixed 😄

hallow mortar
#

That seems to all be working now

#

Thanks for the help!

winter rose
#

ta-da, unset variables yep
with pleasure!

#

also, try prefixing your global variables (like NIK_speedBoost or something)

hallow mortar
#

...when you say the variable is "global", you mean "globally visible but still tracked uniquely to the unit it's set on", right? Because this is supposed to work in multiplayer and not cause everyone to go faster when one guy fires

winter rose
#

yeah no the prefix is made in order for your code not to interfere with someone else's script potentially using the same var name

#

for example, if I publish a script with SUCCESS = true for my operations, it may trigger your scripts if you do the same. if we have LMS_SUCCESS vs NIK_SUCCESS it's all fine 👌

ivory jetty
#

Anyone got any idea how to control where a turret gunner is looking? lookAt doesn't work, and they don't seem to respond to doTarget or doWatch either.

digital hollow
#

doWatch works fine, it is arg Local, though, so you may not be running it correctly.

ivory jetty
#

How would I run it correctly?

digital hollow
#

How are you running it now? in what environment?

ivory jetty
#

locally hosted MP server on LAN.

#

using _copilot lookAt target1 doesn't do anything.

digital hollow
#

Where is this running? _copilot is a local (scope, not locality) variable. If you just run it in debug console it means nothing.

ivory jetty
#

_copilot being _helicopter turretUnit [0].

#

Just as an example.

digital hollow
#

I use this

//look here
private _u = (curatorSelected select 0 select 0);
private _p = screenToWorld [0.5, 0.5];
[_u, _p] remoteExec ["doWatch", _u];

Zeus select a unit (eg gun truck), and run local.

#

Oh copilot camera turret might be a different thing. setPilotCameraTarget ?

ivory jetty
#

No, tried that. That affects the Pilot Camera, which in the Wildcat (in this instance) is a downward-facing camera for sling-loading.

#

crew _helicopter outputs the copilot as [Turret, [0]]

#

So I'm getting the _copilot using _copilot = searchHelo turretUnit [0];

#

It's outputting his information correctly using systemChat (name _copilot) so I have the right guy.

#

But he doesn't respond to lookAt, doTarget or doWatch for actually changing where the turret faces.

digital hollow
#

try running doWatch on the vehicle, not the copilot unit.

ivory jetty
#

Only seems to affect the pilot.

#

Works fine on a Mora, but not with the Wildcat.

#

I know said turret is armed with a laser designator, could I 'force' the AI to look where I want it to by getting it to lase a specific location?

#

Okay; I get a twitch out of the camera using the commandTarget function. Is there a disableAI argument to control where an AI looks?

#

I think the AI is currently overriding any watch commands.

digital hollow
#

I think you might have to work around making it point the camera and just script the end result.

ivory jetty
#

Possibly. Interestingly enough, the AI seems happy to track targets on its own; the only way I've found to get it to change targets is by simply removing its current target from LOS for long enough.

digital hollow
#

Maybe try reportRemoteTarget and then doTarget? on the vehicle so the pilot/group leader isn't ordering copilot to look at original target.

ivory jetty
#

He shouldn't with doTarget anyway.

#

Interestingly, you can't even control where he's looking in-game by being his group leader and using the "watch there" commands.

#

Okay, I can't get a gunship to adjust its turret to 'look' at a specific target either, be it by doTarget or lookAt.

winter rose
#

@ivory jetty sqf myTank animateSource ["MainTurret", rad 90];

#

?

ivory jetty
#

Doesn't work for the helo. I don't know if the turret is named "MainTurret" though, is there a way to identify them?

#

I've only got the path at the moment ([0])

winter rose
#

Check it out by finding animation source names

#

@ivory jetty also, glanceAt maybe?

ivory jetty
#

glanceAt also does nothing.

sturdy cape
#

quick one: code for creating a groundweaponholder containing X items?

#

sounds strange but couldnt find that quickly

#

nvm found it now^^

winter rose
#

@ivory jetty I am in front of my PC now. Which helicopter are you trying to turret-turn?

ivory jetty
#

Hellcat.

winter rose
#

the cam turret I suppose?

#

@ivory jetty "obsturret" / "obsgun" I suppose (from animationNames)
trying right now

#

nope.

ivory jetty
#

Yeah, was looking at the co-pilot's observer camera with the spotlight and laser designator.

winter rose
#

well IDK, but even with a tank it doesn't seem to work. I might be missing something

#

seems you can't this way, only with the UGV so far

#

@ivory jetty …doTarget works

ivory jetty
#

I didn't get it working when I tried.

#

If the copilot already has a target, he won't switch.

ornate sky
#

does init.sqf run locally once on all machines?

#

ie. is the difference to initPlayerLocal.sqf is that init.sqf will be run on the server as well?

still forum
#

ye

#

ofc the order is also different

#

one runs before the other, if that matters to you

dusk badger
#

Quick question the HMG on the offroad is a separate turret from the vehicle if so does it have a classname?

exotic tinsel
#

PLZ HELP, players are getting this message all the time now. "loadout contains non arsenal item 'novoice'". This started happening after i allowed all items in the arsenal to fix loadouts being grayed out. players no dont get grayed out loadouts but some get this error message instead. plz plz help.

still forum
#

helps

#

known bug. Wait for hotfix

#

/helps

dusky pier
#

hello, is possible to change model and model.cfg and load it with diag_mergeConfigFile?

still forum
#

in diag binary models can be live reloaded yes

#

only dev branch diag binary

exotic tinsel
#

@still forum they are saying that they can load their load out that is producing the error on other servers. Does that rule out an arma bug?

still forum
#

no

#

that is the bug

#

wait

#

well maybe

#

It depends on an item, that you cannot add to a limited arsenal

#

but might be included in a full arsenal

exotic tinsel
#

anythoughts on common cuases for why some loadouts dont work

still forum
#

whatever, that "novoice" thing is part of the bug. Definitely.

exotic tinsel
#

ok

still forum
#

ACE arsenal works if you happen to have that

exotic tinsel
#

no i dont use ACE. i just put this in the init of my ammo box.

["AmmoboxInit",[this,true]] spawn BIS_fnc_arsenal;
#

@still forum is that good or bad method?

still forum
#

that should be full arsenal

#

definitely correct method

exotic tinsel
#

hmm

exotic flax
#

besides the fact that sometimes items are not allowed in Arsenal at a specific server (parameters of BIS_fnc_arsenal, mods, etc), there's currently also a bug with the Arsenal and certain items (most known are the TFAR radios)

exotic tinsel
#

i got players with basic simple loadouts and owning all dlc and getting the error.

still forum
#

there is a script to fix tfar radios in saved loadouts

exotic tinsel
#

i got to be doing something wrong. cuz its a lot of players aleast a dozen or so

#

and 4 of them are on right now and use the loadouts on other servers with no problem

#

what dumb things do scripters like me do to cause problems with arsenal, and ill go see if im doing them. really i dont do anything at directly with arsenals except put that code in the init. maybe something in the descriptions file or something???

still forum
#

as I said, Arma bug.

exotic tinsel
#

ok

austere silo
#

hi partyppl. i need a script were the AI mans the statics automaticly when build. who can help me?

devout wolf
#

Hello there, guys i've run into some problem, let's start with litlle backstory here: we had problems with desync on our server, after few weeks we removed broken mods but realized it was only half of the issue. There seems to be some clunky fired eventhandler added to player. Basicly when player shoots on his side it's perfectly fine, but on the other he is teleporting, and firing with like 1 sec cooldown betwen shoots. He is still shootin even if he lowered his weapon and empty his mag. We used simple russian enginering techology and added " player removeAllEventHandlers "fired"; " in our init.sqf for mission yea it fixes 90% of problems but we don't want ot break ACRE or ACE functionality so is there a way that will show me what eventahandlers and from where they came from on unit?

exotic flax
#

@austere silo well, either place the statics with a crew (in editor or Zeus), or use moveInTurret to make AI man a static.
If it's for some custom game-mode with building, you might need to handle some kind of build event and make a script around that

austere silo
#

ok thx for the quick answer

#

i want to place it manned with a crew but not working. idk why

#

doesnt matter i will try it out

#

not a big deal

#

i thought there is a ultimate script for that

exotic flax
#

@devout wolf perhaps better to first identify which mod is causing the issue, or if it's the mission or even server causing the issue.
Normally mods like CBA, ACE and ACRE/TFAR won't cause such issues

devout wolf
#

i know, idk which mod we got like 500· PBO files to check

#

i think it's local eventhandler because as soon as player stops shooting everything is back to normal

#

removed some supress and shit pbos and still no difference

exotic flax
#
  1. disable all mods, check server
  2. add 1 mod, check server
  3. add another mod, check server
  4. repeat 3 till issue found
  5. remove/fix mod, continue with 3
devout wolf
#

easy to say

#

we got one big pack on A3Sync

hearty plover
#

Yeah I have done that once with a 20 mod modpacj

#

Took two days about 16 hours total.

devout wolf
#

damn

dusk badger
#

Quick question the HMG on the offroad is a separate turret from the vehicle if so does it have a classname?

devout wolf
#

every eventhandler has added it's own id?

#

as i remeber

#

like if i spam some eventhandlers it will be id like 1,2,3,4,5 etc?

#

or something?

exotic flax
#

@dusk badger no, it's a different vehicle (eg. B_G_Offroad_01_F vs B_G_Offroad_01_armed_F)

dusk badger
#

Ok thank you @exotic flax

exotic flax
#

@devout wolf as far as I know there is no function to retrieve all (active) event handlers in vanilla arma.
For CBA you could try:
_events = allVariables cba_events_eventNamespace; // this should contain all CBA events

drowsy axle
#

Hey guys, I'm looking to create scripting tutorials. First thing I'd like to go over is "External Engine Files" init.sqf / initserver.sqf / onplayerrespawn.sqf etc
Where can I find a comprehensive list of all the accepted file names?

errant jasper
drowsy axle
#

Thank toy

hearty plover
#

Any ace devs in here who can send me a slack invite.

#

@still forum

young current
torpid pike
#

What's the ALiVE classname respawn for civ? ALiVE_SUP_MULTISPAWN_INSERTION_CIVILIAN_F ? no idea how to call it (yet)

plain urchin
#

does anyone know the exact setAperture and time of the missions in arma 3 contact?

winter rose
#

Nope, as the missions are ebo'd

spark turret
#

dePBO them?

winter rose
#

ebo = encrypted pbo

#

no can do

hollow thistle
#

You can extract them with loadFile. 😬

ivory jetty
#

I know we have createSimpleObject to create objects dynamically, but is there a command to delete objects? Or to create dynamic objects?

sleek token
#

deletevehicle doesnt work?

still forum
#

deleteVehicle does work

sleek token
#

That was an answer for @ivory jetty question

still forum
#

yes. And me answered your questionmark

sleek token
#

Perfect zoidberg

ivory jetty
#

Could I use that to create something like a huron container?

cosmic lichen
#

@granite falcon During Contract campaign: daytime: 22.4004, date: [2039,7,3,22,24] Trying to get aperture right now

plain urchin
#

R3vo you’re a legend appreciate you bud

cosmic lichen
#

Aperture should be 4.5.

#

Setting aperture to -1 is significantly darker.

winter rose
#

you proved me wrong you dirty— congratulations guys! :D
@cosmic lichen @hollow thistle

cosmic lichen
#

It's quite easy

#

Just use a mod which enables debug console everywhere 😃

#

As it happens, I made such a mod years ago

#

Viewdistance seems to be limited to 2000 on the lower end.

winter rose
#

yet 30 FPS top, here

cosmic lichen
#

||There are 163 units placed in the second mission||

#

Disabling simulation and hiding them give me +10 - 15 fps

granite falcon
#

@cosmic lichen why you tag me?

cosmic lichen
#

Sorry, there are two Dans

#

See above.

#

Tagged the wrong one.

coral wraith
#

Hi I use BIS_fnc_establishingShot as mission intro works like charm for years now but I'm missing one thing different vissions like NVG or thermal, does anyone know a way to add that or do I need to make my own establishingShot to add that feature?

cosmic lichen
#

You can excuted true setCamUseTI 1; directly after you spawn BIS_fnc_establishingShot and see if that works.

coral wraith
#

will try that, thanks

coral wraith
#

setCamUseTI and camUseNVG
seams to work, it's a little bit darker then I expected but much better then nothing. thank you

dull drum
#

Hi guys! What is the best way to attach icon to the player model relatively?

This way works semi-excellent but, when I sit up or jump the vertical align stays the same 2 meters, which looks awkward


onEachFrame {

_pos = player modelToWorldVisual [0, 0, 2];
drawIcon3D ["", [1,1,.5,1], _pos , 0, 0, 0, name player, 1, 0.05, "PuristaMedium"];

};
copper raven
dull drum
#

That set the icon text far away from me

#

Oh, got it fixed with _pos = _x modelToWorld (_x selectionPosition "camera");
Thanks @copper raven!

tough abyss
#

@still forum what did arsenal break in ace?

still forum
#

dogtags

#

are items with ID

#

with scope=1

tough abyss
#

What tab they are in?

still forum
#

none

#

scope=1

#

they are hidden

#

Also the switched weapon laser attachment

#

is also scope=1

tough abyss
#

So you could not load loadout with them in?

still forum
#

yes

tough abyss
#

How do you add one

still forum
#

find a dead player

#

and use ace interaction to grab dogtag

tough abyss
#

Player or AI

still forum
#

AI should work too I think

#

Or use the visible laser light attachment on weapon.
Then switch it over to visible mode, that will replace it with the scope=1 version

tough abyss
#

Is there a cfgdogtags or something?

still forum
#

no

#

cfg weapons

#

its just an item

tough abyss
#

Derived from?

still forum
#

cba item core, which is a bipod

plain urchin
#

@cosmic lichen did they actually just not use enabledynamicsimulation or just disable sim? is that one of the reasons why the performance is so bad?

hearty plover
#

Hmmm, unsure if this is a scripting thing or not. But what would one need to display diary records on a screen in cTab's android.

#

Is the cTab author still active enough to ask?

cosmic lichen
#

@plain urchin I don't think AI is the main issue, even after disabling and hiding all of them, performance isn't great

winter rose
#

radio frequency scripts maybe

hollow thistle
#

There is a lot of stuff going on scripting wise in the campaing for sure.

#

They've created 3 DLLs/Extensions just for it. (take a look in Contact folder)

#

They would not need them for simple scripts 😉

plain urchin
#

has anyone figured out how to disable the electromagnetic spectrum map/other mapmode on the Arma 3 contact map screen? :L

plain urchin
#

also its such a bummer that theres so much content and stuff that mission makers could use in MP (animations, the cool new map/task system) and its all locked in singleplayer and only accessible if you have the DLC loaded 😦

plain urchin
#

figured out how to hide certain maps, it's the BIN_fnc_showMapOptions function

hearty plover
#

Question. With sqf how can I somehow maybe write a book that can call to a node.js server with some text payload or maybe a request.

#

Hook*

winter rose
#

@hearty plover extension

hearty plover
#

I saw it. I about came in my pants.

#

Bless you arma community you beautiful bastards.

winter rose
#

All together, our pants are stronger

ornate sky
#

What's a good place to put the CBA add setting function when making an addon?

still forum
#

preInit

#

that's not a good place, that's THE place.

ornate sky
#

Just found it, thanks

exotic tinsel
#

Is there way to get side of uniform? no side is not working.

still forum
#

yes

#

CfgVehicles >> uniformclass >> modelSides
array of sides that the uniform supports

winter rose
#

isn't there a BIS fnc that does it already?

dull drum
#

Guys, is there any list of AI features in Biki or smwhr else? Like the ones that go with checkAIFeature. Thanks.

ivory jetty
manic bane
#
//Measure text box size and put array to text box. And resize with text height and width.
private _text_box_size = ctrlPosition _preset_contents_text;
_preset_contents_text ctrlSetStructuredText composeText _preset_contents;
private _text_input_width = (ctrlTextWidth _preset_contents_text) + 0.01;
private _text_input_height = (ctrlTextHeight _preset_contents_text) + 0.01;
_text_box_size set [2, _text_input_width];
_text_box_size set [3, _text_input_height];
systemChat str _text_box_size;
_preset_contents_text ctrlSetPosition _text_box_size;
_preset_contents_text ctrlCommit 0;

https://www.youtube.com/watch?v=6cAqDmZdmCw
This code doesn't work reliably...
I really don't know why. Please help...

dull drum
#

@ivory jetty this list looks unfinished, because if you'll go to the checkAiFeature there are things like AwareFormationSoft which are not in the list

winter rose
#

@dull drum ah that's the only ones

manic bane
#

Returns the current position of 2D control as [x, y, w, h] array

dull drum
#

@winter rose Oh. Thanks.

manic bane
#

I really confused.

dull drum
#

Did anyone have a good mess with AI tweaking? FSM and stuff? I'm trying to create a unit that will be controlled RTS style and it should be dumb simple, like go and kill, no smart ass covering, evading fire, lying down and shit 😃

winter rose
#

@dull drum you should use agents then 😉

cosmic lichen
hallow mortar
#

@manic bane [x,y,w,h] - position x, position y, size width, size height

dull drum
#

@cosmic lichen Okayface.jpg

manic bane
#

That code gets original [x,y,w,h] and modifies that with text width and height.

#

so it sets w into text width and h with text height.

hallow mortar
#

Unrelatedly, can a switch case have multiple conditions? i.e.

...
case ("condition_one" OR "condition 2") : {thing}```
winter rose
#

yes

hallow mortar
#

thanks

winter rose
#

@manic bane why use

private _text_input_width = (ctrlTextWidth _preset_contents_text) + 0.01;
private _text_input_height = (ctrlTextHeight _preset_contents_text) + 0.01;```
if you want `_preset_contents_text` dimensions… use `ctrlPosition`?
manic bane
#

😕

#

I think I need another approach. Thx

#

But width and height from ctrlTextWidth and ctrlTextHeight is diffrent between ctrlPostion result. They gives me 'text' width and height.
So I can adjust RscStructuredText size properly so RscControlsGroup makes scroll bar properly.

winter rose
#

do you want width from the control's text or from the control itself?

manic bane
#

text

#

width is fine but height is problem

#

Please watch this test video. ctrlTextHeight doesn't give reliable results.

tough abyss
#

Then you are doing something wrong

#

It should go like this
ctrlSetText
ctrlTextHeight
ctrlSetPositionH <acquired new height>
ctrlCommit

manic bane
#

Okay I gonna try that.

tough abyss
#

Even better ctrlSetPositionH

#

New command

manic bane
#

ctrlSetPositionH this looks good

tough abyss
#

Still need ctrlCommit

manic bane
#
//Measure text box size and put array to text box. And resize with text height and width.
_preset_contents_text ctrlSetStructuredText composeText _preset_contents;
private _text_input_width = (ctrlTextWidth _preset_contents_text) + 0.01;
private _text_input_height = (ctrlTextHeight _preset_contents_text) + 0.01;
_preset_contents_text ctrlSetPositionH _text_input_width;
_preset_contents_text ctrlCommit 0;
_preset_contents_text ctrlSetPositionH _text_input_height;
_preset_contents_text ctrlCommit 0;

Like this?

winter rose
#

ctrlSetPositionW for width

tough abyss
#

I don’t know why you need width

#

The text wraps around

manic bane
#

oops

tough abyss
#

It only makes control taller

manic bane
#

Because when text is long, I want horizontal scroll bar

tough abyss
#

You need to put it in controls group maybe, or use different type of control, there are options but some may not be available to scripts only config

manic bane
#

like this picture

#

it is already in controls group

tough abyss
#

You can use non break space to stop wrapping too I think

cosmic lichen
#

What control type is that?

manic bane
#

it is StructuredText

cosmic lichen
#

The question is, why not simply increase the whole width of the dialog, instead of fiddling around with workarounds

manic bane
#

I don't know why but when I remove width things in code, height works fine

#

why?

cosmic lichen
#

and that structured text is within a controlGroup?

manic bane
#

yes

cosmic lichen
#

Is your width of the structuredText larger then you width of the controls group?

manic bane
#

sometimes

#

without modifying, it is same size as controls group

cosmic lichen
#

make it smaller and you have your scrollbars

manic bane
#

I'm trying NBSP now

plain current
#

Performance warning: SimpleSerialization::Read 'qgzgufeognklzi' is using type of ,'CONTROL' which is not optimized by simple serialization, falling back to generic serialization, use generic type or ask for optimizations for these types
can we have optimizations for controls and displays? 😃

still forum
#

don't think so

#

as serializing controls rarely makes any sense

#

No sense in transferring over network because other clients won't have same controls ever.
No sense in storing into savegames as displays aren't kept open afaik

minor lance
#

Emmm

#

i have a weird bug

#

Hello by the way!

winter rose
#

@minor lance

(…) getVariable ["tag_varName", defaultValue]; // in case it was never set```
minor lance
#

hmm

still forum
#

You are mixing up isNull and isNil I think

hearty plover
#

isNil is for checking undefined right.

minor lance
#

i use isNil for dialogs

still forum
#

if your variable is not defined, the getVariable returns nil. Which will make isNull error and also return nil, which will make ! error and also return nil, which will make waitUntil error and exit

hearty plover
#

null is a value, nil is undefined.

minor lance
#

But it says error expected bool got bool

#

:S

still forum
#

yes

hearty plover
#

That's how I tried to rember it.

still forum
#

it expected bool, but it got Nil of type bool

#

Yes i know, confusing error

minor lance
#

🤔

still forum
#

! can only ever return bool.
So when you give it nil and it errors, it returns a nil of type bool

hearty plover
#

wish it just said error expected bool got undefined type bool

#

or even better nil type bool

minor lance
#

so... !isnil {(uiNamespace getVariable "ada_hud")}

still forum
#

I wish BI would print expected bool got nil(bool) or something like that

#

yes

minor lance
#

perfect

#

thans!

hearty plover
#

Dedmen, are you in the ACE slack?

still forum
#

yu

hearty plover
#

Can ya get me a invite please.

still forum
#

already told them about broke slackin

hearty plover
#

Oh, okay.

#

Thank you.

still forum
#

yesterday actually. responsible guy was notified

#

I think only he can also manual invite, not sure

hearty plover
#

That would be great.

#

I had some questions about adding actions to civ's, as well as I am working on a idea I think may be okay for ACEX, I would like to see the diary used more, and wanted to move it to a item you hold, and then via self interaction you get a dialog / gui of a basic diary you can read.

#

Making obtaining intel a bit more immersive.

#

Flow would be something like... has diaryObj, ace self interact -> checkNotes -> renders diary and task info.

#

This would make tasks / diary entries more useful for milsim mission makers who disable those kinds of hud / gui elements like waypoints / markers etc.

#

I know it's probably a bit niche however.

still forum
#

I'd love more immersive intel stuff. But then please also add zeus module to place such intel 😄

#

and you need to think about how you make "has intel" because if you make ever "note" so to say an item, you'll need unique items that you can identify

#

like the dogtags you'd have a thousand items probably

hearty plover
#

I think I could do that.

#

Yeah speaking of that.

#

What is the purpose of dogtags?

still forum
#

So you know who just died

#

same as in RL

hearty plover
#

I have not seen a use for them and am wondering if I can disable that feature, as I imagine it generating all that is heavy.

#

Oh, okay.

#

To id a body.

still forum
#

no generating them is not heavy at all

#

they are actually only generated when you grab the dogtag from a body

hearty plover
#

Ooo, smart.

#

But yeah, I just feel intel is not used very well.

#

I would like the notebook to be private to the player, and leave it up to them to share intel.

#

Creating a new reason to communicate up / down the comms pipeline.

#

Conducting AAR's would be a bit more involved.

still forum
#

In the intel zeus thingy that my group uses (I guess it might be from Ares) only the guy who finds the intel can see the text

hearty plover
#

I like that idea allot.

still forum
#

But needs some way to share your intel with the team/squadlead

#

like, you walk up to him and use ace interaction to "give intel"

#

which then get's added to his diary

hearty plover
#

I am going to write up a overall design spec, and then make sure nothing I am doing is too out of scope to be considered for acex

tough abyss
#

is ace menu not included in basic ace?

still forum
#

yes

tough abyss
#

by yes you mean no, not included?

still forum
#

Oh

#

it is in basic ace

#

Maybe not have items for intel afterall. Just have an item for a diary that you need to have to be able to open it and add entries to it.

The intel things are objects on ground that have a "Take Intel" ace action on them. That way you don't have the intel items in inventory you just virtually add it to your diary

tough abyss
#

how do you bring it up because I couldn't and it said somehwere that it is dependend on ace advanced menu or something

#

is it win key based?

still forum
#

yes

tough abyss
#

oh I use that key already

still forum
#

windows or ctrl+windows (or shift? dunno, I just do it I don't think about what key :D) for other remote menu

#

you can just rebind in addon key settings

manic bane
#

How can I remove part of string?
I tried splitString but since each characters are used as a separate delimiter,
I cannot solve problem like this,

"PYLONBAYRIGHT1" splitString "PYLON";

What I wanted :
["BAYRIGHT1"] or "BAYRIGHT1"
Result :
["BA","RIGHT1"]
Is there any solution for this?

ruby breach
#

Syntax 3 (You can couple with things like find to locate whatever you want to split)

manic bane
#

If I make it to select everything after N, it will return "BAYRIGHT1".
But what if same script encounter string like "BAYRIGHT1PYLON"?

ruby breach
#
"PYLONBAYRIGHT1" select[("PYLONBAYRIGHT1" find "BAYRIGHT1"),count("BAYRIGHT1")];
manic bane
#

Thx!

upper cliff
#

alright so here's my problem, I have two ai doing an executionvictim_loop animation

#

in the editor the z rotation value is 48

#

but in game they end up at like 273 or something

edgy dune
#

So I understand when CBA Extended_PostInit_EventHandlers and Extended_PreInit_EventHandlers are ran, but what kinds of scripts should I put in a PreInit versus a PostInit?

errant jasper
#

Well I have sometimes used the initialization line of objects to "tag" them for particular purposes... For example: this setVariable ["MF_HasIntel", true]; ... Then a post-init or some other script reads that an apply appropriate processing to those objects. This would not work in pre-init.

edgy dune
#

so for example with pre init I would do stuff like add a CBA key bind or do stuff that doesnt depend on any object, and post init would be for say adding a Event Handler to a vehicle

errant jasper
#

I generally use pre- unless I have a particular need for post-.. But I think most (all?) of my usage of preinit postinit that is not "attached" to a particular vehicle class got replaced when CfgFunctions got preInit and postInit.

still forum
#

yes. Generally use preInit, unless you need post for some reason

errant jasper
#

Though looking over the BIKI one advantage of XEH PostInit might be that it is unscheduled (if I recall correctly) where as CfgFunctions's postInit is scheduled.

still forum
#

all XEH is unscheduled yes

#

but postInit still makes the game wait till you're done

#

so if you need unscheduled you have to spawn manually anyway

edgy dune
#

ah thats nice

hearty plover
#

@still forum Yeah, I didn't want a "Take Intel" action at all, I wanted it to be a bit more natural.

#

There is a "9line & notebook" mod. I am gonna reach out to them.

#

See what advice they have

upper cliff
#

alright i think my problem comes not from the animation like I thought, but rather that the AI are somehow rotating around a certain point

tall mural
#

Is scripting using the "Extended Debug Console"?
Anyway, I asked this in #arma3_config yesterday, and was directed here.
Is there a way to equip/add the Guided/Laser Guided munitions to the Mk6 Mortar? I know it already has them as possible magazines, but the loadout does not use them.

young current
tall mural
#

And that would be using the "Extended Debug Console"?

young current
#

if you cant edit the mission itself then that proably is a good way to do it

tall mural
#

Well, that took an hour to figure out...

vehicle player addMagazine ["8Rnd_82mm_Mo_LG",8];

Is what I ended up using, which gives the mortar I am currently in 8 rounds of the Laser Guided munitions.

Is there any way to set it to give all mortars, even those I'm not in, the rounds?

young current
#

put it in the init field of the mortar and replace vehicle player with this

tall mural
#

How/what is the init field of the mortar?
I tried this (and _this) several times, and never seemed to get it to work.

harsh sphinx
#

Anyone know the setHit string for hull?

young current
#

hull of what?

harsh sphinx
#

helicopter

young current
#

you should be able to find it with this

#

@tall mural perhaps you need to start over and explain what you are doing. are you making a new mission, are you spawing the mortars on the fly with some method?

tall mural
#

In a mission (well, various ones), mostly from LAN/self hosted stuff solo.
Mortars are ones I find (loot)/buy/build (from backpacks) and place myself as the mission goes on.
Just interested in giving the mortars the ability to launch Laser Guided munitions. I'd prefer if I could have all mortars spawn with them, or somehow have them "update" with the appropriate ammunition as I got working for the one mortar I was in, but I'm good with this.

cosmic lichen
#

@tall mural How/what is the init field of the mortar? What's the problem? This returns the mortar. Just checked with hint typeOf this;

tall mural
#

So, if I get the various inits of the mortars, I can loop through them to give them the ammunition?

hallow mortar
#

@tall mural the init field is a text entry field in the object's attributes window in the Editor. (If you cannot or do not want to open the mission in the Editor, you are going to have a bad time with this.)

#

Trying to execute code on an arbitrary unit using only the debug console, without knowing the unit's variable name, is...possible, with some limitations, but complicated. If you can open the mission in the Editor you will find it much easier.

tall mural
#

Well, the missions aren't exactly ones I can open (other people host them and such), so... 🤷
But I got it working for the mortar I get into, so it's simple enough for me to do now. Not like I spawn dozens of mortars...

#

Thanks to all of you who helped me out on this!

hallow mortar
#
{_x addMagazine ["8Rnd_82mm_Mo_LG",8];} forEach (vehicles select {(_x hasWeapon "mortar_82mm")});```
This _should_ (someone else may point out an error) add ammunition to all mortars in the mission.
If you are playing a mission hosted by someone else, make sure you have their permission before executing console commands.
tough abyss
#

ok, I'm trying to get into the eden editor a bit

#

how can I give assignments to a tank platoon in the eden editor for them to execute on launch

hallow mortar
#

Select the group and place an appropriate waypoint

#

Waypoints are in the footprint tab on the right, or you can do some combo of shift or ctrl + click/rightclick (I forget which, it should be displayed in the bottom right) to place a basic move waypoint

tough abyss
#

thank you

tall mural
#

@hallow mortar That works! Thanks a bunch!
(And yea, I always check about doing this stuff in other servers.)

spark turret
#

hey need some assistance in locailty of EH. I have a "firednear" Eh that i add to civilians which checks a bunch of stuff and writes down times when a shot is detected. from that it decides if it was a warnig shot or if its an "actual shooting" going on so the Civ flees. Now problem is i add the EH to all clients bc EH need to be local and bc each client detects each shot, 1 shot is always read as "multiple shots" -> panic is initiated.
if i only add the EH serverside do i run into problems (all other Civ scritps also run server side)?
what exactly is the reason for EH need to be local?

#

just trying to understand "EH locality needs" here bc technically i only need to detect the shot on the server, not the players client.

#

and the civs themselves are also local to the server since they are spawned by script or editor placed

winter rose
#

@spark turret you want to use "firedNear" on the civilian? Therefore on the server, yes.

spark turret
#

so the only thing that decides the locality of the EH is which machine wants to read it?

winter rose
#

well, it will fire on the machine it has been added to yes

spark turret
#

i cant remeber why i added the EH to all clients in the first place. it used to be all serverside

winter rose
#

"effect local" doesn't mean "it has to be executed on client", "effect local" means "it will fire where it has been added"

spark turret
#

kk

still forum
#

"it will fire where it has been added"
Or it will fire where the event happens, usually that.
Though that is usually also/maybe written as arg local. Though you can add it to remote units too, just doesn't do much.
wiki stuff be confusing

spark turret
#

ah now thats where i could run into a problem

#

a non-server-local unit firing next to the server-local civilian with the server-local "firednear EH " wont make the EH fire?

#

where is the "firing" event local if a player fires?

#

according to biki:
General information about locality
about player:
a player's unit is always local to the (human) player's machine

#

does that mean the serverside civilian eh can detect a players shots?

still forum
#

"civilian server eh"?

#

if the player is not the server, then the server won't see players fired stuff

spark turret
#

so can the server detect a player shooting with an EH "firednear" added serverside?

#

i guess thats the reason i added the EH to all clients.

#

will need to run some tests bc my problem should not exist in the first place. if the EH can only detect shots fired by machine local units than multi-detection of a single shot shouldnt exist

tough abyss
#

how do i tell what scripts need to be run server side and what ones can be local

spark turret
#

@tough abyss depends on what you want to do with them. 95% should be serverside and only EH stuff that needs to be local to players should be

#

okay tested the EH stuff on dedicated. FiredNear event has to have a client local EH to be detected BUT the problem is the event is deteced twice. i have no idea why, the EH is only added once but it fires 2 times for each shot

tough abyss
#

is basicly anything related to the players should be client side and anything the ai has command of should be serverside

spark turret
#

not really. except for really specific stuff that requires client locality everything should be serverside

#

changing a players loadout f.e. should be serverside

#

well it doesnt really matter, just make sure it only runs on one machine when you add stuff to an inventory otherwise you end up with 4 grenades * 20 clients in your backpack

#

and the easiest way to only run on one machine is the server by putting: if !(isServer) exitwith {}; in your script

tough abyss
#

just im new to the whole mp scene i can do some basic scripts but i have no clue how to work them into mp

spark turret
#

eventhandlers, animations and sounds need client locality also ace damage

#

other than that, all can be serverside afaik

#

what kind of scripts do you run?

tough abyss
#

and esiest way to do that is wtih the code you pasted right

spark turret
#

yes i have that on top of each script:

//SAFTEY FUNCTION TO ONLY RUN AFTER GLOBAL VARIABLES ARE INITIALIZED===========================
if (!isServer) exitWith {};
_GlobalVarsInitialized = missionNamespace getVariable ["IRON_globalVars", false];
waitUntil {
    sleep 1; _GlobalVarsInitialized = missionNamespace getVariable ["IRON_globalVars", false];
    _GlobalVarsInitialized
};                                                                                //BY IRONSIGHT
//=============================================================================================
#

you can scrap the global vars stuff, thats personal shit but the If is server thing will exit the script if its not local to the server

#

so the script can run in a. singleplayer b. computer hosted multiplayer and c. on dedicated

tough abyss
#

know any good tutorials for scripting i can do some basic stuff but not the overly complex stuff

spark turret
#

its important to have such failsafe stuff. scripts that run multiple times can kill a server. George floros bloodsplatter script did once bc it ran on each client and we had 5000+ blood splatters spawned after a truck exploded and killed only 5 dudes

tough abyss
#

lol

spark turret
#

well i dont have any tutorials but i guess you can set a goal and then use the Biki and this discord to get help

tough abyss
#

ah true

spark turret
#

but you can use youtube to get into it for real basic stuff like "what is a variable"

tough abyss
spark turret
#

ah also make yourself familiar with the sqf missionnamespace setvariable ["variablename",value,publicboolean];function for more failsafes

#

well thats all you need to know already. only that "player" doesnt work in MP except when run locally on the players machine

tough abyss
#

in which case id just name the guy in the editor and use that instead of player right

spark turret
#

you need to get the players unit through other means like

#

yeah that should work

#

or use something like allplayers select {_x inarea "thatmarkerForPickup"}

tough abyss
#

yeah im still wraping my head around _x command it gets me confused sometimes

spark turret
#

or you run the script from a trigger and pass the list of players in the trigger to the script

tough abyss
#

sorry _x variable

spark turret
#

_x is a dynamic varialble in a function that checks an array. so f.e.

{_x globalchat "Hi"} foreach allPlayers;

will make each player say hi. the function runs once "for each" position in the array, in this case for each player and _x changes every time to that specific value of the position

#

so every time it runs _x is the unit of the specific player

tough abyss
#

also another thing that confuses me is when i have to call a group in a command

spark turret
#

{_x globalchat "Hi"} foreach [1,2,3,4,5,];
_x will be 1 and make 1 say hi, then will be 2 and make 2 say hi etc etc etc

tough abyss
#

where do i find a groups name

#

is it based off of who is leading the group so

spark turret
#

group names are ID numbers for groups just like the unit names

you get the name by running

_groupName = group _unit;
#

_unit needs to be any member of that group

tough abyss
#

ahh ok

spark turret
tough abyss
#

so as long as i change _unit to the name of one of the guys in the group il get the code

spark turret
#

yeah or you somehow get the guys name / ID in your script

#

like running the script from the guys Init in editor, _this will be his ID

tough abyss
#

im assuming by your color coding anything in green can be whatever i like yes

spark turret
#

yeah the orange stuff are variables

tough abyss
#

so _groupName can be _groupOne

spark turret
#

yeah you can name it whatever you like

tough abyss
#

ah orange sorry partialy colour blind

spark turret
#

lol

tough abyss
#

whelp thats another colour i can add to the list i get mixed up

spark turret
tough abyss
#

like _x

spark turret
#

yes

#

_this, _x and _forEachIndex are the most important once

#

is the Biki down?

tough abyss
#

nah

#

not for me anyway

spark turret
#

502 bad gateway 😦

tough abyss
#

huh

#

actualy just refreshed yes it is

spark turret
#

nice

#

btw darklight, you might want to name your markers differently than "marker2". bc if you have more than that 1 script you run into problems fast. name them with timestamps:

_MarkerName = "marker2_" + str round time; //returns "marker2_694"```
tough abyss
#

yeah i would have that was just a practice script to see if i could get it wroking

spark turret
#

alright bud lol

tough abyss
#

fat fingered the dam cps lock

spark turret
#

IM NOT YELLING

tough abyss
#

is

if (triggerActivated "trigger2" = true ) then insert code here

the corrrect way to check a trigger activation via script

spark turret
#

booleans dont need = true.
if (triggeractivated "trigger2") then {} checks for true

winter rose
#

See also Multiplayer Scripting on the wiki

spark turret
#

given that triggeractivated "trigger2" is the correct way to get true

tough abyss
#

ah ok

spark turret
#
if !(triggeractivated "trigger2") then {} ```// will check for false
tough abyss
#

for mp

if(!isServer) exit with {};

wait until
{
if (triggerActivated "trigger2") then {unit1 joinSilent unit2}
}

spark turret
#

yeah thats basically 90% of what you need to know
whats up with the waituntil?

winter rose
#

not isNull player most probably

spark turret
#

to this day i do not know how to check for undefined varialbes 😃

winter rose
#

isNil

tough abyss
#

isNil?

winter rose
#

isNil.

tough abyss
#

yes wher does it go

#

in the exit with{isNil}

winter rose
#

isNil "myVar"

spark turret
#
if(!isServer) exitwith {};

waituntil
{
    if (triggerActivated "trigger2") then {unit1 joinSilent unit2};    //code run every waitunlil loop
    sleep 5;    //sleep 5 for spam avoid
    (triggerActivated "trigger2")    //boolean value for exiting loop, no ;
};
winter rose
#
if (isNil "myVar") then { hint "myVar is not declared"; };```
spark turret
#

noticed and noted lou. will add to my Howto

tough abyss
#

@spark turret so the second (trigger activated) exits the loop

spark turret
#

it a boolean. it it = true then the script will exit, yes

#

last line of the waituntil needs to be a boolean. took me like a week to figure that out lol

tough abyss
#

do i need the wait until though could i not just run

if(!isServer) exit with {};

if (triggerActivated "trigger2") then {unit1 joinSilent unit2};
spark turret
#

yeah you can but then it will only check once

tough abyss
#

thats fine for the script i was running

spark turret
#

if you want to constantly check you need a loop. either a while {} loop or a waituntil loop

tough abyss
#

the trigger only needs to flip once

spark turret
#

from where do you initialiste the "if trigger" script?

tough abyss
#

the init no?

#

this is just me being theoretical mind you i currently have it set up in the actual triggers on activation box in the editor

#

the unit joinsilent bit i mean

spark turret
#

which init

#

remeber your code will check only once when it runs for the trigger. if the trigger is not active at that time, nothing will happen

tough abyss
#

the mission init

spark turret
#

but trigger on activation sounds good for it.

mission init wont work bc it will run on mission start

tough abyss
#

ah ok id have to run it through execVM right

#

i havnt a clue

#

can i have a hint

#

Do i run it from the triggers on activation box via execVM

spark turret
#

yes

#

execVM "yourfolderinmissionfolder\scriptname.sqf";

tough abyss
#

so in the trigger on Activation box id put

Null =[] execVm "scriptFolder\joinscript.sqf";

tough abyss
#

hey im getting an error with the

if(!isServer) exit with {};

its saying im missing an ; after (!isServer)

still forum
#

yep

#

exit with is syntax error

tough abyss
#

how should it be then

still forum
tough abyss
#

oh i was using it how Iron sight put it ok

spark turret
#

whoops

dull drum
#

Hi guys. Any help for getting a right-click event in the 3d world? I've tried this

waitUntil { !isNull findDisplay 312 };
    systemChat str findDisplay 312;
    (findDisplay 312) displayAddEventHandler ["MouseButtonUp", 
    {
        params ["_control", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"];
        systemChat format [_control, _button];
    }];

but apparently it's only for Controls, not for Displays (on the contrary to what Biki says)

#

Well, to be fair at the end of the UI EH page Biki says also

Since Arma 2, most control-specific events now work for both displays and controls

But why it doesn't work though.

cosmic lichen
#

Wrong display?

#

Whats display 312?

dull drum
#

Nope, it's ok. It worked with a systemChat str "PRESSED" there is something wrong with logging the param to the chat.

#

It's a Zeus display.

#
waitUntil { !isNull findDisplay 312 };
    (findDisplay 312) displayAddEventHandler ["MouseButtonUp", 
    {
        params ["_control", "_button", "_xPos", "_yPos", "_shift", "_ctrl", "_alt"];
        systemChat str (_this select 1);
    }];    

did work well actually

cosmic lichen
#

systemChat format [_control, _button]; is incorrect

#

systemChat format ["%1 %2",_control,_button]; is correct

tough abyss
#

hey question

do things like flyInheight, limitSpeed or ambient combat animation scripts that are written into a units init box or waypoints ok for MP or do they need to really be in a script with (!isServer)

hearty plover
#

To be safe, I advise you limit the use of init boxes.

#

You have to check on all the calls really to understand if something is MP safe or not.

tough abyss
#

its all on ai controled stuff

hearty plover
#

Ohh

#

afaik, init boxes on AI units are local to the server.

#

As they are owned by the server. Unless that unit is in a players group, or that unit is spawned later via a script called from a remote machine.

#

I could be wrong about the second part. I really should test that when I get home.

tough abyss
#

would a chopper the player is in the cargo of count as in the players group

#

the choper is a seperate unit not controled by the player

hearty plover
#

I don't think cargo counts.

#

Also something worth testing.

#

KK Had a blog about this.

#

I am gonna see if I can find it for you.

tough abyss
#

thanks

hearty plover
#

This is a must read if you are doing any MP stuff.

#

This one too.

#

Both explain locality, and how to look at a call and see if it's MP safe, understand where it happens / etc.

winter rose
#

too 😉

hearty plover
#

Yeah, another good one.

#

Thank you Lou.

#

Unwise of me to assume people read the wiki haha.

winter rose
#

I mean I wrote it, I may as well advertise it :p

hearty plover
#

Ohh, shameless plug.

#

Thank you for your contributions @winter rose

crisp cairn
#

Hey guys, I am trying to make functions for zeus? Is this the right place to ask for help?

hearty plover
#

You mean Modules?

crisp cairn
#

I have made the module it appears, trying to make the function to execute for example when it is placed on the unit/object

winter rose
#

I try to make the wiki a central nexus for all the needed info, ideally without external links
Thank you Jay ❤

hearty plover
#

Hey, if you ever need help with that let me know. I have been wanting to expand on the wiki for a long time, but have never really known how / didn't want to do a shitty job.

crisp cairn
#

Is this the right area @hearty plover or?

hearty plover
#

Yeah, I just want to be sure. You want to add a draggable module

#

For the zues meno

#

That does some function correct.

crisp cairn
#

Yes correct mate

hearty plover
#

We can help with that.

#

What have you gotten so far.

crisp cairn
#

So I've created the addon and created a module which can be seen by zeus. I have then tried to make CfgFunctions and it is telling me the "misc" function can not be found

#

Before anything, I've created a few fncs in the misc sqf

hearty plover
#

I see.

#

You followed this one I am guessing.

crisp cairn
#

Yes mate

hearty plover
#

I know this is a pain in the ass.

#

But can you upload what you got to github or something

#

Send me a link, so I can get a look at it.

crisp cairn
#

Of course mate give me 2 secs

winter rose
#

@hearty plover you can ask for an account in #community_wiki to Dwarden 🙂 thanks!

earnest goblet
#

Hey everyone, How can i make a cutscene that is in first person view, and the player character is moving forward but isn't controllable? I am new to scripting so i need a hand :)

astral tendon
winter rose
#

what goes wrong?

astral tendon
#

everything

#
BIS_fnc_garage_data = [ 
 //CARS 
 [ 
  //model 
  "\a3\soft_f\offroad_01\offroad_01_unarmed_f", 
  //config paths of classes that use above model 
  [ 
   config.bin/CfgVehicles/C_Offroad_01_F, 
   config.bin/CfgVehicles/B_G_Offroad_01_F 
  ], 
  "\a3\soft_f\mrap_02\mrap_02_gmg_f", 
  [ 
   config.bin/CfgVehicles/O_MRAP_02_gmg_F 
  ] 
 ], 
 [],  //ARMOR 
 [],  //HELIS 
 [],  //PLANES 
 [],  //NAVAL 
 []  //STATICS 
];

Paste that into the debug console and it does not work.

tough abyss
#

obviously

#

config.bin/CfgVehicles/C_Offroad_01_F
should be
configFile >> "CfgVehicles" >> "C_Offroad_01_F"
etc.

astral tendon
#
BIS_fnc_garage_data = [  
 //CARS  
 [  
  //model  
  "\a3\soft_f\offroad_01\offroad_01_unarmed_f",  
  //config paths of classes that use above model  
  [  
   configFile >> "CfgVehicles" >> "C_Offroad_01_F",  
   configFile >> "CfgVehicles" >> "B_G_Offroad_01_F" 
  ],  
  "\a3\soft_f\mrap_02\mrap_02_gmg_f",  
  [  
   configFile >> "CfgVehicles" >> "O_MRAP_02_gmg_F" 
  ]  
 ],  
 [],  //ARMOR  
 [],  //HELIS  
 [],  //PLANES  
 [],  //NAVAL  
 []  //STATICS  
];
["Open",true] call BIS_fnc_garage;

yet, still show all vehicles.

tough abyss
#

["Open",true]
what does true mean?

astral tendon
#

good question.

tough abyss
#

it is not a question

astral tendon
#

its params, but the page never says what params can be changed.

winter rose
#

0 (Optional): BOOL - true to open full Arsenal, with all categories and items available (default: false)

tough abyss
#

anyone help with this script im getting an error sayin im missing a ]

BootsOnTheGround setTriggerStatements [ [insert1] in thisList,
                            //Activation
 insert1 animateDoor ["DoorL1_Open",1]; insert1 animateDoor ["DoorR1_Open",1];,
                            //Deactivation 
 insert1 animateDoor ["DoorL1_Close",1];insert1 animateDoor ["DoorR1_Close",1];];```
winter rose
#

@astral tendon
params: BOOL - (Optional) true to open full Arsenal, with all categories and items available (default: false)I will make the page more readable.

astral tendon
#

But change it to false does not do anything.

winter rose
#

@tough abyss use
```sqf
your code
```

exotic tinsel
#

Im having an issue with the loadouts where players get this message when trying to load their saved loadouts. loadout contains non arsenal item 'novoice'
We also have an issue where players faces dont load. are these issues linked and if do is there something i dont wrong in my server configuration?

winter rose
#

@tough abyss also, BootsOnTheGround setTriggerStatements [ [insert1] in thisList, is missing something yes

tough abyss
#

Yep, looks like it is always full

#

could be a bug

#

report

#

@winter rose can you point it out

#

Im having an issue with the loadouts where players get this message when trying to load their saved loadouts. loadout contains non arsenal item 'novoice'
should be fixed in hot fix

exotic tinsel
#

hot fix that is coming or already released?

tough abyss
#

coming

#

soon(TM)

exotic tinsel
#

i know that arsenal loading saved loadouts issues have been around, can someone give me a list of fixes or issues from the past so i can rule out that this is not something ive done.

tough abyss
#

wait for the update

winter rose
#

you open two, you close only one @tough abyss

hearty plover
#

OKay boys and gals.

// Argument 0 is module logic.
_logic = param [0,objNull,[objNull]];
// Argument 1 is list of affected units (affected by value selected in the 'class Units' argument))
_units = param [1,[],[[]]];
// True when the module was activated, false when it's deactivated (i.e., synced triggers are no longer active)
_activated = param [2,true,[true]];
// Module specific behavior. Function can extract arguments from logic and use them.
if (_activated) then {
     // Attribute values are saved in module's object space under their class names
     _bombYield = _logic getVariable ["Yield",-1]; //(as per the previous example, but you can define your own.) 
     hint format ["Bomb yield is: %1", _bombYield ]; // will display the bomb yield, once the game is started 
};
// Module function is executed by spawn command, so returned value is not necessary, but it's good practice.
true
#

For example, dropping a module from zues on a unit, inputing via the diag.

tough abyss
#

@winter rose it only looks that way cause i splitt it apart to add the notes to what is what

winter rose
#

@tough abyss conditions are STRING, too

tough abyss
#

yeah the bwiki says i can use string

astral tendon
#

@winter rose Any idea on how to limit the Garage?

winter rose
#

@tough abyss without comments, and with ```sqf , what are you actually trying?

#

@astral tendon I am not in front of my PC right now, sorry

tough abyss
#

ok i cleaned up the script a bit think im still doing somthing wrong


_doorClose = insert1 animateDoor ["DoorL1_Close",1];insert1 animateDoor ["DoorR1_Close",1];
                                        
BootsOnTheGround setTriggerStatements [ "[insert1 in thisList];", "_doorOpen;", "_doorClose;"]```

im trying to have the doors on my ghost hawk open when they reach the lz and close when they leave
astral tendon
#

Can you ping me latter?

winter rose
#

@astral tendon will look into it tonight, yep

astral tendon
#

Thanks.

winter rose
#

@tough abyss can't use private vars in trigger statements

tough abyss
#

so make em public then

#

doorOpen = insert1 animateDoor ["DoorL1_Open",1]; insert1 animateDoor ["DoorR1_Open",1];

doorClose = insert1 animateDoor ["DoorL1_Close",1];insert1 animateDoor ["DoorR1_Close",1];
                                        
BootsOnTheGround setTriggerStatements [ "[insert1 in thisList];", "doorOpen;", "doorClose;"]```
#

this look right to you @winter rose

winter rose
#

not the first statement "[insert1 in thisList];"
should simply be "insert1 in thislist"

tough abyss
#

ahh ok i got that from a tut must be old code

#

cause it worked in the vid i watched

winter rose
#

also, your code won't run. you define code such:

doorOpen = {
    insert1 animateDoor ["DoorL1_Open",1];
    insert1 animateDoor ["DoorR1_Open",1];
};```
```sqf
doorClose = {
    insert1 animateDoor ["DoorL1_Close",1];
    insert1 animateDoor ["DoorR1_Close",1];
};```

and `"call doorOpen"` / `"call doorClose"`
tough abyss
#

doorOpen = insert1 animateDoor ["DoorL1_Open",1]; insert1 animateDoor ["DoorR1_Open",1];

doorClose = insert1 animateDoor ["DoorL1_Close",1];insert1 animateDoor ["DoorR1_Close",1];

BootsOnTheGround setTriggerStatements [ "insert1 in thisList;", "call doorOpen;", "call doorClose;"];```
#

im assuming the trigger in game has to be set to activate on bluefor

#

aswell

winter rose
#

I would say so, yes

#

that or link the trigger to the vehicle

#

but why not creating a trigger itself?

tough abyss
#

dont know how

#

XD

winter rose
#

Eden > F3 > double-click > ??? > profit

tough abyss
#

oh in game i thought you meant via script i have one

#

in eden im just trying to limit my scripting in game to activating external scripts

winter rose
#

then don't use triggers

#

creating a trigger via script is rarely a good thing unless you know what you are doing

tough abyss
#

im not creating a trigger via script

#

im setting the peramiters of a trigger in the mission via script

winter rose
#

THEN, set the values in Eden! do you recycle this trigger?

private _helicopter = insert1;
waitUntil { not alive _helicopter || _helicopter distance myHelipad < 30 };
_helicopter animateDoor ["DoorL1_Open", 1];
_helicopter animateDoor ["DoorR1_Open", 1];

waitUntil {  not alive _helicopter || _helicopter distance myHelipad > 30 };
_helicopter animateDoor ["DoorL1_Close", 1];
_helicopter animateDoor ["DoorR1_Close", 1];```
tough abyss
#

no the trigger will be used once

#

the reason im hesitant to do it in eden is i dont know what codes will mess up mp

winter rose
#

then right what is needed into it, or don't use it at all
don't make it half here, half there

as long as you make the trigger Server-only, it's fine

tough abyss
#

so most triggers should be srver only ?

winter rose
#

yep

tough abyss
#

Also that code above is that put into the on act and on deact respectively

#

of the trigger

#

or is that a script run from init

winter rose
#

the code block above could be spawned from init yes, getting rid of the trigger entirely

#

but you need a myHelipad reference (or anything else)

tough abyss
#

question wouldnt the not alive part mean the script wont fire unless the helicopter is dead

winter rose
#

it's an or, meaning if it's dead it won't stay in the waitUntil

#

(and fire the instructions but the heli is dead, sooo…)

hearty plover
#

Haha, no one likes modules.

tough abyss
#

uh prob stupid question but should init script have if (!isServer) exitWith {};

#

im going to assume no

winter rose
#

nope. but you can add this to the script I gave you

tough abyss
#

yeah already did that

hmmmmm the doors still arnt opening

#

would it be because im testing in sp

#

yeah i just tried it in MP via lan the doors still dont open

winter rose
#

do you have a myHelipad reference, aka the landing H?

tough abyss
#

yeah

winter rose
#

did you set my code in a spawn block in init.sqf?

tough abyss
#

is Null=[]execVM the right way to execute the script from the init

winter rose
#

…no.

tough abyss
#

ok how do i do this

#

playMusic "Music1";
   cutText ["", "BLACK FADED", 999];
 
    [] Spawn { 

    cutText ["“I learned that courage was not the absence of fear, but the triumph over it. The brave man is not he who does not feel afraid, but he who conquers that fear.”― Nelson Mandela","BLACK FADED"]; 
    titleFadeOut 20;
    sleep 5;    

    // Info text 
    ["Operation White Knight",
    "UXO Site Bravo, Borek ",
    "Time 10:00, Date 16, Sep, 2024"] spawn BIS_fnc_infoText; 

    sleep 3; 
    "dynamicBlur" ppEffectEnable true;    
    "dynamicBlur" ppEffectAdjust [6];    
    "dynamicBlur" ppEffectCommit 0;      
    "dynamicBlur" ppEffectAdjust [0.0];   
    "dynamicBlur" ppEffectCommit 5;   

    cutText ["", "BLACK IN", 5];
    sleep 40;
 playMusic ""    
    };``` this is my init script
winter rose
#

in init.sqf:

if (isServer) then {
    [insert1, myHelipad, 30] spawn {
        params ["_helicopter", "_helipad", "_distance"];
        waitUntil { not canMove _helicopter || _helicopter distance _helipad < _distance };
        _helicopter animateDoor ["DoorL1_Open", 1];
        _helicopter animateDoor ["DoorR1_Open", 1];

        waitUntil {  not canMove _helicopter || _helicopter distance _helipad > _distance };
        _helicopter animateDoor ["DoorL1_Close", 1];
        _helicopter animateDoor ["DoorR1_Close", 1];
    };
};```
tough abyss
#

@winter rose thats a big negotory good sir the doors dont open I say again the doors dont open how copy

#

and yes i have the my helipad reference

#

no errors just doors wont open

winter rose
#

@tough abyss do you have the -showScriptErrors flag?

tough abyss
#

no probably help wouldnt it

winter rose
#

yyyup, every time you create content

tough abyss
#

where do put that in the arma 3 launcher perameters

winter rose
#

Creators > Show Script Errors iirc

#

is your heli named insert1, too?

tough abyss
#

yes

winter rose
#

heli, not pilot or group or anything

tough abyss
#

only difrence between your code and mine is the name of helipad and i changed that in the script

#

and distance

#

oh its under authors not creators

winter rose
#

my bad then

tough abyss
#
    [insert1, BootsOnTheGround, 5] spawn {
        params ["_helicopter", "_helipad", "_distance"];
        waitUntil { not canMove _helicopter || _helicopter distance _helipad < _distance };
        _helicopter animateDoor ["DoorL1_Open", 1];
        _helicopter animateDoor ["DoorR1_Open", 1];

        waitUntil {  not canMove _helicopter || _helicopter distance _helipad > _distance };
        _helicopter animateDoor ["DoorL1_Close", 1];
        _helicopter animateDoor ["DoorR1_Close", 1];
    };
};

playMusic "Music1";
   cutText ["", "BLACK FADED", 999];
 
    [] Spawn { 

    cutText ["“I learned that courage was not the absence of fear, but the triumph over it. The brave man is not he who does not feel afraid, but he who conquers that fear.”― Nelson Mandela","BLACK FADED"]; 
    titleFadeOut 20;
    sleep 5;    

    // Info text 
    ["Operation White Knight",
    "UXO Site Bravo, Borek ",
    "Time 10:00, Date 16, Sep, 2024"] spawn BIS_fnc_infoText; 

    sleep 3; 
    "dynamicBlur" ppEffectEnable true;    
    "dynamicBlur" ppEffectAdjust [6];    
    "dynamicBlur" ppEffectCommit 0;      
    "dynamicBlur" ppEffectAdjust [0.0];   
    "dynamicBlur" ppEffectCommit 5;   

    cutText ["", "BLACK IN", 5];
    sleep 40;
 playMusic ""    
    };```
winter rose
#

are you sure these are the proper door animation names though 😄

tough abyss
#

yup

winter rose
#

(which heli btw?)

tough abyss
#

ctrg tropic ghost hawk

#

the one with the camo

young current
#

how have you established those animate commands?

tough abyss
#

??? there the ones in the config files

#

ive used these commands before with a pelican from the halo mod

#

obviously with difrent codes for the doors that i got from the config

#

difrence was i had the commands attached to an add action

young current
#

just that it makes not sense that theres diffrerent animation to open and to close the doors

#

it should be same animation just 0 or 1 phase

winter rose
#

door_l or door_r

#

ta-daaa , that's "door_L" and "door_R". should work

#

1 to open, 0 to close

#

@tough abyss ?

young current
#

indeed just looke up the model.cfg for it

tough abyss
#

hang on games a loading

young current
#

also it would be better to use the animateSource command

winter rose
#

hmm no? I think animateDoor is specifically made for doors (buildings & vehicles)

#

to play all the anims like door handle etc.

tough abyss
#

nope doors still dont open

young current
#

source does the same if all the door animations are configured for same source

winter rose
#

@tough abyss not "Door_L_Close", "Door_L"

tough abyss
#

itsunder user actions Your finding this right

#

?

#

yeah no im a fuckin idiot

#

you right

#

huzzzah now how do i dissable the landing gear from lowering

winter rose
#

you tell the helicopter to hover, not land

white sky
#

Any tips on improving pip quality. Like having the object in the sky with less to render in background ect?

winter rose
#

"unload" waypoint should do iirc

tough abyss
#

what 5ft off the ground thou

#

nah unload he still drops his gear

#

hang on let me check somthin

real tartan
#

I am trying to make it easier to fire from gunner from VTOL, but when you are flying the bullets/projectiles are flying way off. To ease this I tried to slow down VTOL on loiter, but even with 10-15 km/h you need some offset. Is there a "fire where you are shooting" idea that can help me?

winter rose
#

even with ranging?