#arma3_scripting

1 messages ยท Page 376 of 1

simple solstice
#

and you can use pre/post init

subtle ore
#

multiple times definitely use CfgFunctions

#

pre and post init may not always be the most suitable time to execute scripts

#

I learned a lot of the stuff from the biki examples

simple solstice
#

well of course

#

where is the code executed from?

#

This command only works locally and must be run on all machines to have global affect.

#

try using init.sqf I guess

lyric nacelle
#

hi guys, i have this in my initPlayerlocal.sqf

player addEventhandler ["GetInMan", { eject = player addAction ["Helo Drop", "functions\fnc_eject.sqf"]}];

simple solstice
#

and make sure

lyric nacelle
#

i am trying to remove it with this

player addEventhandler ["GetOutMan", {[player, eject] ExecVM ["removeAction", 0, true];}];

simple solstice
#

that the objects are selected correctly

lyric nacelle
#

but its not working

simple solstice
#

use diag_log typeOf for that

#

what

lyric nacelle
#

me or god^

simple solstice
#

why execvm

#

God

lyric nacelle
#

i dunno, i dont know the proper syntax for it

simple solstice
#

@lyric nacelle i would just use conditions

#

for the addAction

#

instead of removing it and adding

subtle ore
#

player, eject] ExecVM ["removeAction", 0, true]; uhhh...what..

lyric nacelle
#

yea first time trying to do that so i dunno wtf i am doing....

subtle ore
lyric nacelle
#

ah

#

@simple solstice what do you mean use conditions?

simple solstice
subtle ore
#

condition (Optional): String - script code that must return true for the action to be shown.

simple solstice
#

so I would just do

#

!isNull objectparent player

#

for the condition

#

from the code you posted it looks like it's added to every vehicle

lyric nacelle
#

every player

#

Getinman is added to players

simple solstice
#

yes

subtle ore
#

or... !isNull objectParent _target

simple solstice
#

what I meant when entering every vehicles

lyric nacelle
#

yes

simple solstice
#

same thing midnight

subtle ore
#

it is

#

but eh

#

it looks more appealing to my eyes

simple solstice
#

i guess

subtle ore
#

more dynamic

#

if I want to make this script compatible for both vehicles and a local player

simple solstice
#

but anyways, can actions added to a vehicle be selected inside it?

#

forgot it

subtle ore
#

No. LOD View switches once inside a vehicle

#

so the actions would be available outside

lyric nacelle
#

can i just use hideOnUse?

subtle ore
#

but inside the vehicle you could not, you'd have to add it to the player

#

look at what hideOnUse does

lyric nacelle
#

would it reapear when they reenter another veh

subtle ore
#

it doesn't remove the action

lyric nacelle
#

ah the entire action menu

#

oh no, not even that it will just hide it untill you scroll again

subtle ore
#

Yep

simple solstice
#

using the condition and nothing more will be enough

#

but you still need to pass the default parameters

lyric nacelle
#

ok, sorry for being stupid, but how do i do that?

simple solstice
#

before the condition one

#

uhh on mobile @subtle ore will do it faster

subtle ore
#

wat

#

Oh

#

fuck, someone should've pinned my last deal with this

simple solstice
#

it should be on the wik

subtle ore
#

blahblahblah addAction["CoolioDude", { },[],1.5,true,true,"","true",15,false,""];

#

it's not

lyric nacelle
#

addAction [helo dump, myscript.sqf, null, 0, true, true, false, !isNull objectParent _target, -1, flase, ""]

#

this?

subtle ore
#

first param needs to be a string

#

second param the script, also needs to be a string

#

arguments are an array

#

[]

#

can't have a priority of 0

#

the condition needs to be a string

lyric nacelle
#

addAction [helo dump, myscript.sqf, [], 1.5, true, true, false, !isNull objectParent _target, -1, flase, ""]

subtle ore
#
myCoolDude addAction ["helo dump","myscript.sqf", [], 1.5, true, true, false, "!isNull objectParent _target", -1, flase, ""];
diag_log "Cool dudes are cool";
lyric nacelle
#

ah ok

#

thanks a lot dude

#

i needed ""

subtle ore
#

Yep yep

lyric nacelle
#

i should have known, coming from C#

subtle ore
#

well SQF is mainly command based.

lyric nacelle
#

it's taking me a little bit to get my head round it

subtle ore
#

yep, and just when you think you've got it down SQF will throw you a hardball

lyric nacelle
#

ha yeah sounds about right

cloud thunder
#

don't forget to flase

subtle ore
#

yeah flase'ing is very good for your overall health

lyric nacelle
#

17:36:39 Error in expression <player addAction ["Eject", "functions\fnc_eject>
17:36:39 Error position: <addAction ["Eject", "functions\fnc_eject>
17:36:39 Error Type Any, expected Bool

#

๐Ÿ˜ฆ

subtle ore
#

execpted Bool ....uhhh.

#

left parameter for addAction is an object...

#

wtf

gusty flume
#

hey guys so after trying to tel it to call it in init.sqf and later initplayerlocal.sqf it still isnt working

subtle ore
#

where is this being executed @lyric nacelle ?

lyric nacelle
#

initPlayerLocal

subtle ore
#

@gusty flume initPlayerLocal and init.sqf are two totally different things, what are you trying to acomplish?

#

@lyric nacelle Hmmm.. this is odd, can you post the entire code?

cloud thunder
#

flase is not a bool

subtle ore
#

๐Ÿ™„ I thought i changed that

#
myCoolDude addAction ["helo dump","myscript.sqf", [], 1.5, true, true, false, "!isNull objectParent _target", -1, flase, ""];
diag_log "Cool dudes are cool";
gusty flume
#

ive not put it in both at the same time i tried it in each to see if i was putting the ommand line to call it in the wrong file and heres the script

{ 
    addMissionEventHandler ["EachFrame", 
    { 
        { 
        if (_x isKindOf ["Default", configFile >> "CfgAmmo"]) then 
            { 
                       deleteVehicle _x; 
            }; 
        } forEach (([14379.6,16139.4,5.34058e-005]nearObjects 500) + ([14808.6,16574.8,2.67029e-005]nearObjects 500) + ([15245.6,17253.1,3.43323e-005]nearObjects 500) + ([15415.1,17108.5,-0.000137329]nearObjects 500) + ([15248.4,16984.2,0.000112534]nearObjects 500))        ; 
    }]; 
};```
lyric nacelle
#

hahhaha

subtle ore
#

mission event handler needs to be in the init.sqf

lyric nacelle
#

flase

#

false

subtle ore
#

lol, did you seriously put flase in there? lol

lyric nacelle
#

i fucking did !

subtle ore
#

Woohoo! ๐Ÿ‘Œ

gusty flume
#

so i tried it in init.sqf and it didnt work still lol

lyric nacelle
#

haha god dam it

subtle ore
#

@gusty flume

 addMissionEventHandler ["EachFrame", 
    { 
        { 
        if (_x isKindOf ["Default", configFile >> "CfgAmmo"]) then 
            { 
                       deleteVehicle _x; 
            }; 
        } forEach (([14379.6,16139.4,5.34058e-005]nearObjects 500) + ([14808.6,16574.8,2.67029e-005]nearObjects 500) + ([15245.6,17253.1,3.43323e-005]nearObjects 500) + ([15415.1,17108.5,-0.000137329]nearObjects 500) + ([15248.4,16984.2,0.000112534]nearObjects 500))        ; 
    }]; 
#

you needed either a call for those starting brackets, otherwise nothing is executed

#

needs to be in init.sqf

#

@lyric nacelle ๐Ÿ‘

gusty flume
#

what this code needs to be in init.sqf?

subtle ore
#

yes

gusty flume
#

ohh that explains it i was trying to run it as a script lol

#

thanks

subtle ore
#

otherwise, eveyrtime a player joins it'll attempt to add another mission event handler. Yep, sure thing

gusty flume
#

so im getting error generic error in expression in

#
if (_x isKindOf ["Default", configFile >> "CfgAmmo"]) then ```
still forum
#

any other error?

#

it always says generic error in expression...

#

But right next to that it says the real error

gusty flume
#

nope thats thats the only one that comes up

still forum
#

can you copy the full error message?

gusty flume
#

but its still not stopping me from using the tanks to blow stuff up in hq

#

sure 2 secs

still forum
#

my guess is _x is not a string

gusty flume
#

so the error message is

{
if (_x |#|iskindof {["Default", configFile >> "CfgA...'
error generic error in expression```
still forum
#

_x is not a string then

gusty flume
#

so how do i fix that?

still forum
#

@subtle ore

lyric nacelle
#

ok so i must be doing something wrong, when i use this code

player addEventhandler ["GetInMan", {player addAction ["Jump Out", "functions\fnc_eject.sqf", [], 1.5, true, false, "", "!isNull objectParent _target", 5, false, ""]}];

the action doesnt show up at all ๐Ÿ˜ฆ

subtle ore
#

I wasn't the one who wrote it @still forum ๐Ÿคท

gusty flume
#

@little eagle

little eagle
#

What.

gusty flume
#

the script is getting an error code

little eagle
#

reading the manual

#

Apparently isKindOf's alternative syntax needs classnames and doesn't work with objects like the "standard" syntax does.

#

Easy fix.

#

Instead of:

_x isKindOf

do

typeOf _x isKindOf
gusty flume
#

thanks dude

lone glade
#

fucking hell have to move all my includes into one file if I want to use diag_mergeConfig today >;<

subtle ore
#

hahah ๐Ÿ˜‚

little eagle
#

Dedmen should fix this too with his intercept magic.

still forum
#

passing object and array... thinking yeah.. Should be fixable

#

if array on right side and object on left side just call typeOf automatically . done

little eagle
#

I was talking about diag_mergeConfig dying on header files.

still forum
#

๐Ÿ˜ฎ

#

Oh hell no

#

Not touching that mess

little eagle
#

I have an idea for a command that you could make and that this piece of work could benefit greatly from.

still forum
#

listens

little eagle
still forum
#

CfgAmmo can be object?

little eagle
#

Yes.

still forum
#

My magazineGroup fix crashed when initializing the ammo class of the magazine...
Didn't think much about that.

#

Why is ammo a object ๐Ÿ˜ฎ

little eagle
#

The only thing holding me back from using these all the time is their overhead due to being SQF functions and not C++ functions.

#

why
Because someone programmed it this way.

still forum
#
game_value getObjectConfigFromObj(game_value obj) {
    auto type = sqf::type_of(obj);
    if (sqf::is_class(sqf::config_entry() >> "CfgVehicles" >> type)) return "CfgVehicles";
    if (sqf::is_class(sqf::config_entry() >> "CfgAmmo" >> type)) return "CfgAmmo";
    if (sqf::is_class(sqf::config_entry() >> "CfgNonAIVehicles" >> type)) return "CfgNonAIVehicles";
}

Did I miss anything?

#

It's a script command that only accepts OBJECT. so the isEqualType check falls away

little eagle
#

It returns CONFIG, not STRING.

still forum
#

but yours.... Oh.. I see

little eagle
#

All it does is report the CONFIG of a classname or object.

#

Super useful.

#

e.g.

#

getText (getObjectConfig player >> "displayName")

still forum
#
game_value getObjectConfigFromObj(game_value obj) {
    auto type = sqf::type_of(obj);

    for (auto& cls : { "CfgVehicles"sv, "CfgAmmo"sv ,"CfgNonAIVehicles"sv }) {
        auto cfgClass = sqf::config_entry() >> cls >> type;
        if (sqf::is_class(cfgClass)) return cfgClass;
    }
    return sqf::config_null();
}
little eagle
#

I don't see anything obviously wrong with this ^.

still forum
#

That is not most optimal.. But the optimizations would all be in the dozens of nanoseconds.. soo... not really worth it

little eagle
#

Yeah. Good enough.

lone glade
#

ErrorMessage: File D:\github\ace3ganthe\addons\arsenal\ui\RscAttributes.hpp, line 1: /: '(' encountered instead of '{'
using include OFC, no errors in those files either

tough abyss
#

Is that intercept/c++?

still forum
#

yes @tough abyss

little eagle
#

I approve.

still forum
#

Itemconfig also added. exactly the same code with different strings

#

I have Arma open

#

I'll do a perf test

little eagle
#
SCRIPT(turretPath);

params [["_unit", objNull, [objNull]]];

private _vehicle = vehicle _unit;

(allTurrets [_vehicle, true] select {(_vehicle turretUnit _x) isEqualTo _unit}) param [0, []]

This one. I already tried to optimize it as best as possible with all the tricks I have.

still forum
#

do you have that in a CBA fnc?

little eagle
#

Otherwise:

alive _group

Checking if there is at least one alive unit in the group. false for empty group or grpNull.

still forum
#

not too fast ^^ I'm working slowly right now

little eagle
#

It's not like it will get buried today. 2 days ago you were bored and searched for stuff to implement.

#

Those are the things I'd implement day 1 if I'd have access to the source.

still forum
#

allTurrets can return a ton of turrets. And you only want the first that passes the isEqualTo check?

little eagle
#

Well, the unit can only be in one slot, so of course return.

still forum
#

I think I can't do that right now

#

We have inconsistencies in what a turret path is

#

allTurrets returns array of strings. and turretUnit wants array of numbers

little eagle
#

Example?

#

Uhm.

still forum
#

What does allTurrets return?

#

yeah that was probably the problem

little eagle
#

Array of arrays.

still forum
#

array of what

#

ah

#

Okey.. The guy that wrote the Intercept wrapper thought it was an array of strings

#

is there a max length of the turret path array?

hollow lantern
#

is it hard to let the vanilla CIWS target rockets and mortar shells?

little eagle
#

Good question...

hollow lantern
#

I guess you need to attach an fired EH to every shot and check if its a mortar / arty shell or rocket

#

and then do something with it. but not sure about performance

little eagle
#

It doesn't make much sense to shoot at these objects, because they can't take damage and be destroyed.

hollow lantern
#

oh

little eagle
#

I guess I'd have one handler for each CIWS projectile checking for really close mortar etc. shell objects and if there are any, delete both and add some fireworks.

#

each frame handler

#

really dirty.

#

Would suck at low fps.

tough abyss
#

@still forum - how would the following look in intercept? ```sqf
#define NUMBER 500

private _num = 5;

if (NUMBER > _num) then {
vehicle player setFuel 0.4;
hint "Fuel!";
};

nil

little eagle
#

Not a fan.

#

500 is always greater than 5

still forum
#

We were discussing how to implement turretPaths.
The best choice was to have an array of arrays of numbers. Problem with that is the performance impact of that is devastating... Intercept relative ofcause... Ofcuase still better than anything of SQF.. but too bad for my OCD

tough abyss
#

Just an example with no actual use ๐Ÿ˜›

still forum
#

So in the end I just forced everyone to leave it broken for now

#

@tough abyss the #define there doesn't really make sense

tough abyss
#

I know.

still forum
#

the if statement would be completly optimized out at runtime

#

so.. answer is
set_fuel(vehicle(player()),0.4f); hint("Fuel!")

tough abyss
#

Not sqf::set_fuel?

still forum
#

You can move that out if you want

#

I keep it in my projects but it's your choice

#

you can also have intercept::sqf::set_fuel if you want to

tough abyss
#

Also why f after number?

little eagle
#

So it doesn't sink.

tough abyss
#

Eh?

hollow lantern
#

f for float

tough abyss
#

Oh.

little eagle
#

Because fuel is lighter than water.

still forum
#

player call CBA_fnc_getObjectConfig; 0.0338ms 0.0394ms
getObjectConfig player 0.005ms 0.0054ms
Good enough?

tough abyss
#

And why is player a function?

little eagle
#

I want this in sqf D:

still forum
#

player is a function because player is a function.

#

player in SQF is a function without arguments

little eagle
#

player is a nulary function in sqf.

#

Yup

#

shit lag

still forum
#

I honestly didn't expect that much from getObjectConfig because most of that is config lookups but... about 8x improvement is neat

tough abyss
#

I keep forgetting that "commands" in SQF are actually functions... ๐Ÿคฆ

little eagle
#

8x faster, and the best thing it looks better as command.

#

Isn't this beautiful?

getText [getObjectConfig player >> "displayName", "no name"]
still forum
#

How about player getObjectConfig "displayName" XD

little eagle
#

No.

still forum
#

._.

tough abyss
#

Is an actual command?

little eagle
#

With intercept, both are. (getText default and GOC)

#

Intercept can register SQF commands. Because Dedmen wanted it to I guess.

still forum
#

๐Ÿ‘

#

My favorite feature. Besides the allocator access which probably nobody besides me cares about

little eagle
#

It's my fav feature already.

#

Now do alive GROUP. I never understood why they never made that one.

still forum
#

Already started on that XD

#

just as you started writing

#

The question though.. ANY of group or ALL of group

#

you wrote any

#

but what if somebody want's all

little eagle
#

Should report false if:

#

every unit is dead

#

group is empty

#

or group is null

still forum
#
game_value aliveGroup(game_value grp) {
    for (auto& unit : sqf::units(static_cast<group>(grp)))
        if (sqf::alive(unit)) return true;
    return false;
}

sadly not as clean as I'd like.. When helper classes are done it would be this:

game_value aliveGroup(Group grp) {
    for (auto& unit : grp)
        if (unit.alive()) return true;
    return false;
}
little eagle
#

I guess always report false, unless there is one alive unit in the group.

still forum
#

sqf::units will return empty array on grpNull and empty group right?

little eagle
#

Yes.

still forum
#

The helper classes one looks soo friggin nice

little eagle
#
[_this] params [["_entities", [], [objNull, grpNull, []]]];

if (_entities isEqualType objNull) exitWith {
    alive _entities;
};

if (_entities isEqualType grpNull) then {
    _entities = units _entities;
};

_entities select {alive _x} // return
#

This is the CBA version. getAlive.

still forum
#

Ewww

little eagle
#

Array not needed imo.

still forum
#

CBA_fnc_getAlive ?

little eagle
#

I showed you the wrong thing ๐Ÿคฆ

#

getAlive is bs in A3. Remnant of simpler times.

#

OH

#

ONE THING

#

PLEASE IMPLEMENT THIS

#

unary spawn.

still forum
#

That would yield unexpected results though

#

with unary call the _this implicitly carries over

#

unary spawn in intercept would set _this = []

#

or nil..

little eagle
#

Just do nil then.

still forum
#

(group player) call CBA_fnc_isAlive 0.095ms 0.0972ms
alive (group player) 0.0038ms 0.004ms

frank ruin
#

Where does one find the default paths for the textures on the new dlc vans?

little eagle
#

Ingame config viewer?

frank ruin
#

I did but the skin was not correct

#

Was like white doors ish and rest black

#

You could see the texture wasn't the correct one

still forum
#
game_value unarySpawn(game_value code) {
    return sqf::spawn({}, code);
}

There have fun.

little eagle
#

I can't believe this wasn't added 10 years ago.

still forum
#

The main problem is that the developers don't really interact with the community

#

Everything has to go through Dwarden

#

BI really needs a dev that's close to the community. That's the only way to really know what community wants

little eagle
#

People would bug them about silly stuff.

#

I never heard anyone besides me asking for unary spawn.

#

They just think it has to be like that and accept it.

still forum
#

I made that mistake a couple times when coding.

little eagle
#

Same, but instead of realizing that this is stupid in the first place, people seem to just accept it.

#

They don't know what they want.

still forum
#

Because they know they don't really have a chance of getting it changed

#

in times where feedback tracker reports stay open for over 2 years till some hacker comes along and fixes it in a day because he's bored.
Or where people report critical bugs on dev branch. that get ignored all through RC and shipped on release

little eagle
#

Those are at least difficult things and not shit that can be fixed on toilet break.

still forum
#

KK as dev was getting closer.. But.. I never saw KK here on Discord did you?

frank ruin
#

hiddenSelectionsTextures[] = {"\a3\soft_f_orange\van_02\data\van_body_CO.paa","\a3\soft_f_orange\van_02\data\van_wheel_co.paa","\a3\soft_f_orange\van_02\data\van_glass_utility_ca.paa","\a3\soft_f_orange\van_02\data\van_body_CO.paa"};

#

That's not it or is it?

ionic orchid
#

I work at a game studio with a 15 year old scripting language not unlike SQF, and even inhouse it's to get the engine team who write the functions, and the content team who use them, to talk to each other

#

There's over a decade of awful scripting in there because no-one thought to ask the engine team for better functions for what they were doing, so it's all crazy workarounds

frank ruin
#

When I export I get this shit

_veh = createVehicle ["C_Van_02_vehicle_F",position player,[],0,"NONE"];
[
    _veh,
    ["Masked",1], 
    ["rearsteps_hide",0]
] call BIS_fnc_initVehicle;
#

No reference to the actual .paa file

ionic orchid
#

Having someone in-between is essential imo

little eagle
#

Someone hated by both groups.

still forum
#

Someone with a leg in both groups. Good to know that BI is not the only company with that problem

subtle ore
#

@ionic orchid which studio?

ionic orchid
#

I moved from the content team to the engine team, so I've become 'that guy' but you really need to keep on it

#

both sides love to just not listen to the other

#

5 mins work from the engine team can solve 4 weeks to fucking around on the content team

#

to=of

#

BI need someone like that, for sure, their modding community is immense

still forum
#

They are hiring a new Community Manager for Arma 3.. Maybe that's them trying to do that

#

But a community manager doesn't really have one leg in the engine team. He can assign stuff to the engine team on the issue tracker... That's still one step too far off

little eagle
#

I hope it's someone that can use the scripting language.

subtle ore
#

or at least can be taught

little eagle
#

Can you imagine them hanging out in this chat and taking all our insults and super important suggestions that are totally needed right now?

subtle ore
#

noep

still forum
#

Good example is my magazineGroup fix. All I can do is give it to dwarden. He will then put it on the issue tracker and maybe some engine dev will grab it someday and implement it.
If I could give it directly to an engine dev.. And if he also knows what that thing actually means for the community it would probably be on dev branch the next day

little eagle
#

I'd be great.

tough abyss
#

So can we just ask Dedmen for intercept features?

still forum
#

Yep.

subtle ore
#

is that currently out of your depth Dedmen?

still forum
#

explain?

subtle ore
#

I mean I don't see why they wouldn't allow you to present the features directly to the engine devs

still forum
#

I don't have contact to one

ionic orchid
#

you need someone to vet them, to have them clearly stated and have done all the legwork to make sure it can't already be done

still forum
little eagle
#

One of them should become the community guy.

still forum
#

Somewhat like what KK had done.. Just a little more of the community part

#

Actually.. A lot more of the community part...

tough abyss
#

What do I need in SQF ๐Ÿค”

#

Hmm.

#

param [-1]

still forum
#

I'll go to bed now o7 I'll read up tomorraw

little eagle
#

gn8

subtle ore
#

๐Ÿ‘‹

tough abyss
#

Night.

#

@still forum - what about an onLBSelChanged UI EH that doesn't fire onload?

little eagle
#

LBSelChanged is so hosed. Even using lbSetCurSel fires it, which doesn't happen to anything else in this game.

tough abyss
#

We need an alternative.

little eagle
#

Just some if checks.

tough abyss
#

Make onLBSelChanged great again.

#

Quick question. I'm trying to use execVM to run a .sqf script that runs several animations for a model. However, it appears execVM does not want to run the script itself.

#

Anyone have any ideas?

tough abyss
#

Anyone?

tame portal
#

@tough abyss Does not want to run the script?

#

How come you assume that?

tough abyss
#

@tame portal I put in a debug "hint "test"" and it never shows up.

tame portal
#

Wheres the execVM located at?

tough abyss
#

Lets just say, the thing doesn't animate unless I use debug console

#

Useractions

tame portal
#

I mean, physical folder location

tough abyss
#

Ah

tame portal
#

Is it in a mod or a missionfile?

tough abyss
#

In a mod

#

I'm making an asset that I modelled

tame portal
#

Wheres the .sqf file relative from the mod root?

tough abyss
#

I put it through objectbuilder, made the model config, and it works fine

#

Yeah

#

Well

#

it's in \script\ from where the .p3d is

#

If that explains anything

tame portal
#

Okay, whats the full path to the .sqf file

tough abyss
#

\a3l\eric_objects\placeables\items\spikestrip\script

tame portal
#

Is a3l the pbos name?

tough abyss
#

Negative

tame portal
#

Which part of that path is being packed to a pbo?

tough abyss
#

the .pbo's name is "eric_objects", and it goes in a modfolder named "@a3l"

#

Hence the path

tame portal
#

Does eric_objects contain a $PREFIX$ file or do you set a prefix of that pbo somehow?

tough abyss
#

It might have, I have a programmer/scripter that helps me out, he's out... sick today

#

He looked at my code and said it was wrong and that he'll explain more one day when he feels better

#

Basically I just want a simple way to run a number of animations that all need to run at the same time

#

and I've tried every which way to sunday to get this done

#

Had another dev come by and run this as a "fn_" something

#

Still didn't work

#

The conditions in the useractions works fine, but the statements does nothing of what I want them to do

tame portal
#

If the PBO is loaded at @a3l\addons\eric_objects.pbo, your execVM has to be `[] execVM "\eric_objects\placeables\items\spikestrip\script\filename.sqf"

#

Assuming you dont set a pbo prefix

tough abyss
#

I'll try that.

tame portal
#

Is the pbo being loaded at all actually? ๐Ÿ˜„

tough abyss
#

loaded, questionmark. I'll check for a prefix.

tame portal
#

Because when you load a mod via -mod=@mymod

#

the folder @mymod must have an addons folder and inside that the pbos

#

Sounded like the addons directory is missing when seeing this path \a3l\eric_objects\placeables\items\spikestrip\script

tough abyss
#

Could not use the filepath you suggested above, the compiler threw errors at me.

#

The one with the execVM

#

I'll try the latest one again, with the brackets.

tame portal
#

Oh whops

#

I meant to write

#

[] execVM "\eric_objects\placeables\items\spikestrip\script\filename.sqf"

tough abyss
#

Yeah, I corrected that

#

But

#

Without the "a3l", the compiler threw a fit.

tame portal
#

That is?

tough abyss
#

pboproject.

tame portal
#

Where are you placing this line?

tough abyss
#

Ok, I'll show you

tame portal
#

I don't think Im following you correctly, I thought you just wanted to place a .sqf file that does some stuff in your pbo and then execVM it somewhere when needed?

tough abyss
#

This might be better for a private chat.

kindred lance
#

I am having problem with my Zeus interface - I have insufficient resources problem with some objects. Is there way how to solve it?

potent depot
#

Has anyone happened to run into a bug with the BIS Revive system where players can take damage but they cant die/be incapacitated. Essentially it will leave them on 5% health but not let them go lower than that. Anyone happen to know if there is a fix to this?

hollow lantern
#

can someone explain to me global variables? I have a script where I created a unit based on two params and assign an EH to it. Bofore that I add some variables to the e.g. _fridge setVariable ["KI_vehToRemove", _light, true]; Could this cause any trouble if I run the script again with different parameters? In terms of the variable is now broadcasted everywhere

little eagle
#

String of words that made no sense, Aebian.

hollow lantern
#

what? how so? I just wanted to know if it makes any trouble if I run a script with this piece of code in it _fridge setVariable ["KI_vehToRemove", _light, true]; a second or even third time in terms of the variable is broadcasted globally and would a getVariable work then on all three?

indigo snow
#

Why would a command work only once?

#

You can use it a thousand times if you want

still forum
#

@Neviothr#0132 Only way for onLBSelChanged Would be commands to enable/disable the event. So when filling your list and selecting an element you deactivate it. and after that you activate again. But you can do that already by just using a Var and exitWith.

tough abyss
#

:thumbsup:

hollow lantern
#

@indigo snow Its not the case of the command. I just mean if I broadcast a variable gobally and the script will be executed once again but with different params (but the setVariable is the same command with same parameters) will it override the variable that was previously broadcasted or will it be antoher one since the created object is arma internally not the same as the one created before

indigo snow
#

Maybe you misunderstand what OBJECT setVariable ARRAY does? It sets a variable in to the object itself, not to the missionNamespace. These variable names have to be unique with the object itself, but multiple objects can have the same variable "name" setVariable'd on them.

#

e.g. its no problem to do _fridge1 setVariable ['test',0,true]; _fridge2 setVariable ['test',2,true];

#

since to get them you use OBJECT getVariable ARRAY and you specify exactly from which object you wish to get the variable

#

What you wrote is very confusingly worded, though. Maybe try to explain what you want to do? Set a variable with the same name on multiple objects? Thats how I interpreted it.

still forum
#

@tough abyss Intercept can only do what Scripting can already do.. Just alot nicer and faster. With one exception in that it can get a full position Matrix from objects without going through SQF

indigo snow
#

can it access the quaternions?

little eagle
#

I forgot to save how you convert the editor angles to the terrain builder angles. :S

simple solstice
#

@little eagle the pbo was added to mikero tools

still forum
#

If you explain to me what quaternions are @cptnnick#7051

#

@indigo snow

#

\(O_O)/ IT WURKS Hail Discord!

little eagle
#

the pbo was added to mikero tools
What?

#

Quaternions are what Anglos cooked up because they didn't like continental vectors.

still forum
#

@little eagle read #arma3_tools Mikeros stuff now has a Mod included that export stuff from eden to terrain builder

little eagle
#

And that has the formula I guess.

indigo snow
#

@still forum its how games keep track of object orientation

#

Its four numbers basically

still forum
#

vector3 _aside;
vector3 _up;
vector3 _dir;
vector3 _position;

#

is that what you mean?

real vessel
#

Quaternions are just a differnt way of representing pitch, bank and yaw without the singularity. ie. yaw being undefined when pitched is 90. You can think of it as a kind of a compressed version of the 3 direction vectors. (although matheticians will shoot me for that description)

little eagle
#

i*j*k=-1 is what he means.

indigo snow
#

Yea but from the above the engine seems to use some other format internally

little eagle
#

How do you tell? The editor uses angles.

still forum
#

The engine stores the world position and the direction as the 3 vectors dir,up,aside

#

He can tell because I posted that above ^^

compact maple
#

Hello, is there a way to copy and paste some object in 3den with a point of base ?

cunning nebula
#

compositions

little eagle
#

ctrl + c?

solemn mason
#
_dataSegment = ["data1"];
_dataSegment params [["_unit", objNull, [objNull]]];
systemChat str(_unit);

Error Params: Type String, expected Object

Am I doing it wrong, why does arma throw an exception instead of using the default value?

jade abyss
#

_dataSegment = ["data1"]; != Object

#

"data1" == string

#

Something like that would work:

_dataSegment = [player];
_dataSegment params [["_unit", objNull, [objNull]]];```
solemn mason
#

wiki says if the data ("data1") is not the type I expected it should fall back to the default value. isn't that why it's there to simplify the check of the variable whether it is the right data type.

#

expectedDataTypes (Optional): Array of direct Data Types - checks if passed value is one of listed Data Types. If not, default value is used instead. Empty array [] means every data type is accepted.

cunning nebula
#

doesnt work that way

#

default value is only used if the input is undefined

#

wrong input gives an error

#

not sure about the thing with the expectedDataTypes

still forum
#

Are you sure the script really quits? Maybe it just writes the error and continues with default value

cunning nebula
#

could be

solemn mason
#

didn't checked that only saw the error and went "whutt?". well I have build around it now but it is misleading or atleast irretating.

jade abyss
#
Are you sure the script really quits? Maybe it just writes the error and continues with default value```
afair it did that.
solemn mason
#
_dataSegment = ["data1","data2",1]; 
_dataSegment params [["_unit", objNull, [objNull]]]; 
systemChat str(typeName _unit); 

type is "OBJECT" so it works.

jade abyss
#

It was somewhere mentioned, a few weeks later, when params was introduced

solemn mason
#

can't trust no error no more.

jade abyss
#

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

In addition to simple parsing directly into variables, input can be tested in case it is undefined, of the wrong type or of the wrong size (if array) and substituted if necessary with default values. Since Arma 3 v1.53.132691, onscreen errors are displayed for when the input is of the wrong type or size.```
solemn mason
#

welp should have read more carefully then.

still forum
#

carefullarity is the good scripters daily bread

cunning nebula
#

carefullarity apply { [_x,"coffee"] select _x isEqualTo "Bread"};

timber ridge
#

is carefullarity private?

tame portal
#

It better don't be

still forum
#

@little eagle

game_value turretPath(game_value unit) {
    auto vehicle = sqf::vehicle(unit);

    for (auto& turret : sqf::all_turrets(vehicle,true)) {
        if (sqf::turret_unit(vehicle,path) == unit) return turret;
    }
    return auto_array<game_value>(); //empty array
}

I fixed turret paths in Intercept today. Will do perf test when I'm home. What do I need to test that? a vehicle with AI's inside?

thick sage
#

Hey guys, what AI mods exist outthere besides VTOL and UPSMON. Not aimbot things, but e.g. things for usage of buildings, tactics, usage of tanks, etc.

tough abyss
#

VCOM, ASR, bCombat.

thick sage
#

thanks @tough abyss. VCOM is what I meant actually xD. Others did not know. Nice to know.

little eagle
#

@still forum I wonder if it should report [-1] when you are the driver of a vehicle. Some commands use that.

waxen cosmos
#

@little eagle I have just gone back to trying to get display return of the current weapon picture and now I am understanding disableserialisation, it worked. Once again thanks for all your help man!

still forum
#

player call CBA_fnc_turretPath 0.0351ms
turretPath player 0.0013ms

subtle ore
#

Ohhhhhh

tough abyss
#

Having a bit of trouble during addon building. Build failed. Result code=1 CfgConvert task failed. Include file x\nva\addons\nva_main\script_component.hpp not found. Error reading config file 'P:\x\nva\addons\nva_a3_overrides\config.cpp' Yet the path x\nva\addons\nva_main\script_component.hpp is valid for all I can see ๐Ÿ˜•

subtle ore
#

Your prefix correct?

tough abyss
#

Addon prefix in AddonBuilder is \x\nva\addons\nva_a3_overrides

still forum
#

so... not correct?

tough abyss
#

How come?

still forum
#

I don't know.. I just know \x\nva\addons\nva_a3_overrides != x\nva\addons\nva_main

tough abyss
#

nva_a3_overrides's script_component.hppis ```CPP
#define COMPONENT nva_a3_overrides

#include "\x\nva\addons\nva_main\script_component.hpp"

#define VEGETATION_MULTIPLIER 4
#define GEAR_MULTIPLIER 30
``` It includes contents of script_component from another component.

still forum
#

yes...

#

so.. is the prefix of nva_main correct?

tough abyss
#

Wait... does nva_main need a prefix during the building of nva_a3_overrides?

#

Cause as it stands there's no $PBOPREFIX$, I define it in the Addon Builder during building.

#

@jade abyss?

#

He's gonna be pissed...

still forum
#

If you want to have your file at "\x\nva\addons\nva_main\script_component.hpp"
But you put it at "nva_main\script_component.hpp"
Do you expect that to work?

jade abyss
#

Why should i be pissed?

subtle ore
#

He @'d a GOD

tough abyss
#

@jade abyss - the last time I asked about this your weren't happy.

jade abyss
#

If somebody want's to use AddonBuilder -> hf ^^

#

Can't remember.

#

I can't even remember what i ate this morning, so... erm...

subtle ore
#

You might as well be doing @GOD

tough abyss
#

Phew.

jade abyss
#

@subtle ore You on drugs/alcohol or something similar strange?

subtle ore
#

@jade abyss the former may be possible.

tough abyss
#

@still forum - thing is, it's at \x\nva\addons\nva_main\script_component.hpp๐Ÿคท

still forum
#

But you just said the prefix is not there?

subtle ore
#

Depends on what you call dtugs.

tough abyss
#

Doesn't Addon Builder ignore $PBOPREFIX$?

subtle ore
#

No.

#

Shouldn't at least.

still forum
#

yes

subtle ore
#

Does it? Wtf?

tough abyss
#

I'm 99% certain somebody told me that it does. There we go...

subtle ore
#

Why. Wtf.

still forum
#

yes it does

#

Because BI

tough abyss
#

So this method of #includeing will not work?

jade abyss
#

If somebody want's to use AddonBuilder -> hf ๐Ÿ‘ˆ

subtle ore
#

Fuck it. That why i just stick it to pboProject

tough abyss
#

Ok, I'll try that.

jade abyss
#

Test it, fix your bugs/errors when you pack it, never use AddonBuilder again

frank ruin
#

How would one make those Van's be less fucking blowing up when they hit the smallest rock in Arma 3?

subtle ore
#

It doesn't.

#

But sure. Yeah.

frank ruin
#

Did they made the kamikazes by purpose?

subtle ore
#

Did you actually slam into a wall instead of a rock?

#

Because people like to make it less embarrasing and blame it on bi. Funny how that is

frank ruin
#

No like allot of people experience this.

#

They are extremly sensitve ...

subtle ore
#

Because slamming into a wall does initiate a delayed reaction my guess to fuel

#

But into a rock, no.

still forum
#

@tough abyss You just have to set the pboprefix. Then it will work.

subtle ore
tough abyss
#

@still forum - I'll add it.

frank ruin
#

How would one change it so that the car be more durable though?

#

Is it Armor or health fo the vehicle you increase?

tough abyss
#

So it still fails with PboProject, but if I just drag the folder into MakePbo - it works ๐Ÿคท

#

because makepbo just packs whatever you give it

lone glade
#

yep, you have errors and makepbo just ignore them

jade abyss
#

More or less the same with AddonBuilder

subtle ore
#

Check the logs for pboProject

tough abyss
#

This is the only abnormal thing in the logs ```
#uninclude
Warning: rapWarning: missing file(s)*****
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 30: A3\Sounds_F\characters\movements\bush_001
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 31: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley01
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 32: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley02
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 33: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley03
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 34: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley04
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 35: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley05
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 36: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley06
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 37: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley07
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 38: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley08
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 39: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley09
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 40: A3\Sounds_F\characters\movements\bush_002
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 41: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley10
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 42: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley11
Warning: x\nva\addons\nva_a3_overrides\CfgVehicles.hpp Line 43: A3\Sounds_F_Exp\characters\foley\vegetation\vegetation_foley12
[...]

still forum
#

P drive setup

tough abyss
#

Addon Builder (which I did not just use) claims P: is set up.

#

I just remounted it and everything is gone.

#

Nice.

subtle ore
#

Restarted pc and shows up under drives?

tough abyss
#

Yeah the P: drive was there the whole fucking time...

#

P:\x\nva\addons\nva_a3_overrides\CfgVehicles.hpp etc etc.

#

Every time I mess with this shit it only results in problems.

#

Why do I even bother ๐Ÿคฆ

still forum
#

@tough abyss Would you please read the messages

#

It tells you that A3\Sounds_F\characters\movements\bush_002 is missing. And you argument "But P:\x\nva\addons\nva_a3_overrides\CfgVehicles.hpp is there. I don't understand why it doesn't work"

tough abyss
#

I uh...

#

I can explain?

timber ridge
#

from what I'm reading, it's got some great potential to turn SQF into smth that's familiar to most programmers who have touched other langs but won't disturb SQF for various reasons

still forum
#

I don't see why not directly going for Intercept

#

carma also needs a extension battleye whitelisted

timber ridge
#

is Intercept still in dev?

still forum
#

With the difference that Intercept gives you a real performance benefit

#

yes

#

not far from 1.0 release

#

How did you miss that? I talk alot about Intercept in here

timber ridge
#

I must have blacklisted the keyword Intercept ๐Ÿ˜„

#

i remember reading about it a long time ago. but that's very nice... it's really progressing fast.

still forum
#

[MyCBAHash,9999] call CBA_fnc_hashGet 0.349528 ms
MyHashMap find 9999 0.0019 ms (Intercept)
MyCBANS getVariable (str 9999) 0.0049 ms
MyCBANS getVariable "9999" 0.0021 ms

player call CBA_fnc_turretPath 0.0351ms
turretPath player 0.0013ms (Intercept)

(group player) call CBA_fnc_isAlive 0.095ms 0.0972ms
alive (group player) 0.0038ms 0.004ms (Intercept)

player call CBA_fnc_getObjectConfig; 0.0338ms 0.0394ms
getObjectConfig player 0.005ms 0.0054ms (Intercept)

#

These are some examples from what I did the last week

#

If you missed everything since Intercepts development got paused you really missed a lot

timber ridge
#

shit, yeah, that must be the case... i've got very busy with RL and completley lost the edge on any sort of Arma stuff 1.5 years ago

#

@still forum i guess sometimes Arma scripting is taking lots of free time with projects like that, yeah?

still forum
#

Arma is my life lul

timber ridge
#

don't tell me you're making a living out of arma ๐Ÿ˜„

still forum
#

I did for about a month last year

#

but no

subtle ore
#

๐Ÿค”

still forum
#

Scripting is not really fun for me. But optimizing scripts is.. And Intercept is the ultimate optimization

timber ridge
#

hm, i guess you can probably make a proper living out of robbing the kids of their Arma3LifeMod experience 24/7 with premium DLCs (made out of robbed content of community authors lol) and what so not

waxen cosmos
#

Or make youtube videos on how to get more Arma life money? Literally thousands of people make them >.>

#

Can someone help me workout how to add multiple codes in onkeydown in dialog? tryna Close 3 layers but no matter the variation's it rejects them. onKeyDown = 3 cutRSC ["default","PLAIN"]; 4 cutRSC ["default","PLAIN"]; 5 cutRSC ["default","PLAIN"];

agile pumice
little eagle
#

What happens if you syntax error any of these custom commands?

still forum
#

Question to me?

lone glade
#

game crash probably

little eagle
#

e.g. turrretPath 0``

still forum
#

same as normal Arma

#

turretPath only accepts object. So syntax error printed to RPT

#

You can define functions that take anything and crash if they get the wrong stuff... If you really wanted to

#

I tend to not do that though.... ๐Ÿ˜„

thorny monolith
#

I can get the value (0, 1, 2 etc) with BIS_fnc_getParamValue is there a way i can get the text? I'm making a mission with the time/weather etc and I want the briefing to reflect the value chosen.

still forum
#

I don't think so

#

you can use missionConfigFile to get to the array of texts

thorny monolith
#

guess i'll just have to do a bunch of ifs

indigo snow
#

what dedmen said

still forum
#

and then just get the element out of the array using the index

indigo snow
#

find the number index, then use that index to get the array element

still forum
#

OR you just make an array and use select with the index

#

working fine if your index is 0 to number

indigo snow
#

although what if the same number appears more than one time? ๐Ÿ˜›

still forum
#

then it will correspond to the same string wouldn't it?

#

dunno...

thorny monolith
#

hmm, little faff-y for the effect. I'll just go without for this iteration at least

#

thanks though

still forum
#

@little eagle asks question and leaves. Bad commy.
Now I can't sleep because my brain wants your answer to my answer

tough abyss
#

How am I supposed to solve the problem of A3\Sounds_F\characters\movements\bush_002 is missing? For all I know P: doesn't contain all of A3's data in raw form ๐Ÿ˜•

still forum
#

but it can

#

You can disable that file check in mikeros tools

tough abyss
#

In PboProject?

little eagle
#

I was just asking if the error messages appear the same as with native commands.

still forum
#

Yes they do.
The engine can't differentiate between Intercept and native commands. They are both the same

#

Intercept can't trigger a fail inside the function though.
Like some BI commands can trigger an error if you pass an array with 2 elements but 3 were expected. Intercept can't do that. But they could diag_log and write the message themselves

little eagle
#

Can you patch broken commands? Like assignedTeam player or currentMuzzle?

still forum
#

I can theoretically replace commands. But Intercept can only use SQF so if there is no SQF way to fix it Intercept can't really provide a working alternative

#

Normal plugins can't replace or remove commands. But plugins signed with the core key will be able to in the future

little eagle
#

Dunno about assignedTeam. It just reports nil when you remote control instead of the assigned team.

#

And currentMuzzle / currentWeaponMode report 0 instead of "" on vehicles.

#

That should be fixable.

still forum
#

If you can fix it with scripts then yes.

little eagle
#
private _return = currentMuzzle _vehicle;
[_return, ""] select (_return isEqualTo 0)
#

With assignedTeam you could report at least a default value, but the real information about the assigned team is lost I guess.

still forum
#

Yep. Possible. But not for normal developers

little eagle
still forum
#

๐Ÿ˜„
๐Ÿ˜ด ๐Ÿ›

little eagle
#

Cheat.

lyric nacelle
#

does the supply drop module in the editor work on a server?

#

cuz it works when i test in MP in the editor but when i host as a server it doesnt show up

waxen cosmos
#

Anyone know if there is a max limit to CutRsc Layers currently displayed?

little eagle
#

Just ignore this if you think it's dribble, but there is a maximum to everything on computers. Question is if you'll ever reach the limit.

#

drivle* apparently

waxen cosmos
#

Haha

little eagle
#

It's true though. Also, there is only so much space on a screen.

waxen cosmos
#

I understand that - I have three layers and it appears it doesn't want to display a Fourth

little eagle
#

Did you use the layers 0,1,2,3?

waxen cosmos
#

Ahh no I started from 1,2,3,4

little eagle
#

Bad idea. These are probably used by the base game / other mods.

#

Just use the alternative syntax with named layers instead and give the layers an OFPEC tag.

waxen cosmos
#

ok I'll try that

little eagle
#

"tag_myLayer" cutRsc

#

is what I mean.

waxen cosmos
#

You were right Commy - problem resolved

little eagle
#

If there is a limit it's certainly higher than 4.

waxen cosmos
#

As layers 1,2,3 were succseful I would never of thought 5/6 would be an issue, the moment I use bis_fnc_layer bingo

little eagle
#

You probably overwrote some effects from the base game by using 1-3. Maybe diving vignette effects or the bloodstains when getting shot.

grizzled spindle
#

Is it possible to have a if statement in a config

little eagle
#

kinda

little eagle
#
{((!_alt && {!(_settings select 2)}) || {(_alt && {(_settings select 2)})})}) exitWith {

๐Ÿคข

subtle ore
#

ewww

little eagle
#

I think this is just a contrived way of writing;

_alt isEqualTo (_setting select 2)

but this is too hard for me to tell at this hour.

rough heart
#

Somebody here who can help me with a script ?

#

I'm trying to get a smoke grenade around a player, return that object, and depending on how many of those are around the player i want a % of chance returned. Then check if the chance is met and go ahead and push one of the objects to a array.

#

So far i was getting a few variants to work, but none of them how i actually wanted.

subtle ore
rough heart
#

Hold on ๐Ÿ˜›

#

Wasnt finished yet ๐Ÿ˜›

#

Because this one doesnt work:

#

xD

vestal mortar
#

hey guys how would i go about making it so only west people get a notifaction when someone triggers it

#

I.E Someone walks in somewhere where there not alowed to, how do i make it only to send to the west faction

simple solstice
#

remoteexec to west

#

target side

vestal mortar
#

thx Kate

vestal mortar
#

so ive tried something else then remote exec ive tried

if (side player == west) then {hint "Un-Authorized Personal Has Entered Department Of Corrections";};
#

do you think this will work?

#

sorry went out for abit

lone glade
#

check the arguments for hint

#

it's AG EL

vestal mortar
#

ok

#

im pretty sure that should work

lone glade
#

you absolutely need to run it on every machine that you want the hint to pop up on

#

and no it won't

vestal mortar
#

yeah cause itll be placed in a trigger where if a civ walks into it itll send that hint to all cops

#

wont it?

lone glade
#

if you want to place triggers all around the place go for it, ain't gonna stop you

vestal mortar
#

Basicly what i mean is, if a civilian enters the trigger and will send the hint to all current cops

#

Yeah i just relised it wont

#

lol

lone glade
#

if the trigger is global then yes it would work

vestal mortar
#

so why you saying it wont work then?

lone glade
#

because the default behavior for triggers now is "run on server only"

#

and if you're asking this you certainly don't know about it :p

#

remoteExec your code to side west like suggested above with the trigger running on the server only

vestal mortar
#

mk

lone glade
#

also damn the diag exe is unstable as shit these days

#
Wrong color format 
Forced crash: array access out of range: 1 index: 1
``` thanks 3DEN, I really needed that crash today
simple solstice
#

["message"] remoteExec ["hint",west]

#

all you need

#

but I'm guessing you are running altis life

vestal mortar
#

@simple solstice thanks for the help bud :).

tough abyss
#

@still forum - is this what you meant by [10:18 PM] Dedmen: You can disable that file check in mikeros tools ```
Check Externals:

This option is now permanently set due to some authors releasing pbo's that have not been file-checked and causing pain and suffering to the user. If you don't want the power behind a professional tool. Stop using it.

Uses the dll to scan all file references in all files of the pbo to ensure they are valid.

still forum
#

yes

tough abyss
#

So I need to extract game data to P:?

still forum
#

Or get old version of Mikeros tools ^^

tough abyss
#

There's an old version?

still forum
#

or generate fake files by just creating empty text documents at the directory where mikeros tools wants the files

tough abyss
#

That seems very hacky for a "professional tool".

#

There's also no characters folder inside sounds_f ๐Ÿคท

cunning nebula
#
_allAI = allUnits - allPlayers;
_enemyAI = _allAI select { [side player, side _x] call BIS_fnc_sideIsEnemy };
_cnt = count _enemyAI;
{
    [_x,"PATH"] remoteExec ["disableAI",_x];
    _x setDir (_forEachIndex / _cnt * 360); cameraOn setAnimSpeedCoef 0.05; 
    _x setPos (player getPos [10, 180 - (_forEachIndex / _cnt * 360)]); _x spawn {sleep (random 10) max 5;
    [_this] remoteExec ["removeAllWeapons",_this];
    [_this,"AmovPercMstpSnonWnonDnon_exerciseKata"] remoteExec ["playMove",_this];};
} forEach _enemyAI;

how obvious is it ? ๐Ÿ˜‰

#

sadly i cant test it right now

still forum
tough abyss
#

Its prob just another obj to ignore like the other line intersect commands

jade abyss
#

Hm, i could think about: withObj = It starts here, so ignore any hits with it.

still forum
#

Yeah.. I think I read something like that for other ignored objects

cunning nebula
#

@still forum its not really meant to be super clean ^^

#

since it does a bit more than he asked for

hybrid sequoia
#

how do i pass a local vehicle object to init eventhandler, so i can lockTurret in init?
currently tried to pass 'this' to init, and just lockTurret'ing it, but it doesnt make the position locked (no errors either)

cunning nebula
#

init eventhandler ? where are you using that

#

Cannot be used in scripts, only inside class Eventhandlers in config.

hybrid sequoia
#

its in config, and its running the script

cunning nebula
#

ok

#

should still be _this, not this

hybrid sequoia
#

still the script seems to run, but the position is not locked

#

I can lock the turret position when ran on useraction, but thats passing "vehicle player" to the script, so im guessing my problem is something with the locality or something

indigo snow
#

Can you post your config entry?

waxen cosmos
#

From my understanding of the wiki for iskindfod and CfgWeps // _isKindOf = "Rifle" in [(configFile >> "CfgWeapons" >> "BWA3_G36K"),true] call BIS_fnc_returnParents; // Wouldn't that just return CfgWeapons as there isn't a parent class for a base weapon?

indigo snow
#

It will have a baseclass like rifle_base or something

lone glade
#

nope, that's not how you use isKindOf

indigo snow
#

Also yea thats a bit silly since isKindOf now has the alternative syntax

#

But the base question was about weapon inheritance

#

Its snippet from the wiki page for iskindof

lone glade
#

"myCfgClass" isKindOf ["cfgClass2", configPath to one of cfgClass2 parents]

waxen cosmos
#

I wanted to understand how the subcatergories work within CFG Weapons for calling them with an iskindof// isequalto, to break them down into subcatergories with ease. One of the most basic ways appears to be using the cfg >> cursor

indigo snow
#

So the G36 is a subclass of cfgWeapons, but its parent will be another class in cfgWeapons

#

Parents are defined the following way in config:

class cfgWeapons {
    class parent {
        a = 1;
    };
    class child : parent {};
};
#

So the parent of child is parent and theyre both subclasses of cfgWeapons

#

So child isKindOf parent (with correct syntax!), parent is not kindOf child, and theyre not equal to each other.

queen cargo
#

there is no real parent in configs

indigo snow
#

Within the context of what arma calls parents, there is, and its probably best not to confuse people new to them too much.

waxen cosmos
#

Ok Cpt Nick - starting to understand that, in reference to identifying the Parent/Childs could you point me in the right direction in the CFG? When I started playing with this I was thinking isKindOf was going be like vehicles, how wrong I was haha - Also thank you!

indigo snow
#

You cant identify them by eye in the config browser, you either need to look at the source config or use the appropriate functions/commands

#

Actually i think the config viewer displays parents

#

Very small at the bottom

lone glade
#

yep it does

indigo snow
#

Itll be an array ["all","rifle","riflebase",...] Etc

lone glade
#

you can also use configProperties to get child and sub-children classes of a class that match a condition

little eagle
#

@still forum New idea. player hasItem "firstaidkit". You should be able to figure out how to implement this. Case insensitive please.

still forum
#

getUnitLoadout.. But that's slow right?

#

I have an idea one sec

little eagle
#

I thought just items player Maybe also assignedItems.

jade abyss
#
  • magazines player (so 1 command for both checks)
indigo snow
#

Magazines arent items, items are weapons, and arma is arma

still forum
#

Yeah probably.. I can just iterate over that array which would probably be 100x faster than in sqf.. But still iterating over tons of duplicates is crap

#

I had something nice in TFAR.. I'm searching for it

indigo snow
#

Arrayintersect?

lone glade
#

getUnitLoadout doesn't have duplicates

indigo snow
#

Case sensitive tho

lone glade
#

it's [item, amount]

little eagle
#

It doesn't have to be perfect. 100 times faster than sqf is enough.

still forum
#

@indigo snow Intercept

indigo snow
#

I thought you said to patch it you need to use sqf the other day?

still forum
#

getUnitLoadout is really slow internally though. Would need to compare against iterating over items

indigo snow
#

Maybe i misunderstood

still forum
#

Yes. Everything in Intercept that interacts with the engine has to go through SQF

little eagle
#

items + magazines + assginedItems + maybe headgear

still forum
#

for an array of strings i don't need to go in engine though

little eagle
#

and googles

indigo snow
#

Ah i get the difference

#

Yea

#

hmd

little eagle
#

hmd was reported by assignedItems no?

indigo snow
#

Ooh, maybe

still forum
#

getItemCargo returns array of unique classnames. So that's all containers already solved.
And then just +assignedItems and done

indigo snow
#

weapon attachments

little eagle
#

Double check hmd, headgear and goggles and do what you think makes the most sense.

jade abyss
#

weren't HMD/Goggles also in Items Player?

still forum
#

primaryWeaponItems is quite slow afaik

#

assignedItems doesn't contain headgear and goggles according to biki

little eagle
#

Dedmen, what do you think about player events loop in C++? Worth it?

jade abyss
#

but items player ?

#

+assigned Item was Toolbelt only, or?

#

Or was it also nvg (can't remember anymore, too long ago^^)

still forum
#

I never saw that event loop in profiling

jade abyss
#

I just know, some stuff was duplicated

still forum
#

But! C++ makes it easier to only check the events that you need.
If no one bound an EH to weaponChanged then you don't need to check that

little eagle
#

I never saw that event loop in profiling
What do you mean? Is it optimal enough already?

still forum
#

I think so. But I also never looked for it. That's PFH 0 delay right?

little eagle
#

I think EachFrame mission eh.

#

If PFH then 0 delay.

still forum
#

would have to check the perf... It has a lot of if statements so it would benefit alot.
but optimizing 0.1ms per frame to 0.001ms not sure if worth ๐Ÿ˜„

little eagle
#

The if's only come into play when actually something changes, so it's not that important.

still forum
#

well the if's check every frame if something changed so.. They always come into play don't they?

little eagle
#

True.

still forum
#

and the else always executes and creates the Array of code

little eagle
#

I mean the nested if's that do checks if the event was valid. E.g. don't report loadout when the ammo count changed and nothing else.

still forum
#

Can you check Arma right now?
can you do a perf test with the player event function from debug console

#

that's the easiest way to tell performance

little eagle
#

You mean dummy run the EachFrame event via debug?

#

I can do that later.

still forum
#

no just profile it in debug console

#

just call it and press the profile button

#

With the hasItem check. I'd like to exit early. What's the most likely thing that will contain the item? Probably inventory right?

jade abyss
#

Uniform, Backpack then Vest

#

(if you mean that)

still forum
#

yeah.
and after that assigned Items and googles,headgear,hmd

jade abyss
#

Yeah

still forum
#

I'm thinking about specialized functions. That check assignedItems first.. But.. It's probably not worth the effort.. Intercept will probably be atleast 20x as fast

little eagle
#

not worth it

gusty flume
#

hey guys is it possible to put a bit of code in a vehicles init so that if its deserted it respawns

still forum
#

yes

gusty flume
#

is there anywere i can find an example so i know roughly what to do

cunning nebula
#

hmm I remember writing an sqs script for that, ages ago

#

do you only care about players in that regard ?

#
this addEventHandler ["GetOut",{
    params ["_veh"]:
    while { (alive _veh) && { [] isEqualTo ((crew _veh) select {alive _x}) } } do {
        if ( { 
            if ( (_veh distance2D _x) < 1000 ) exitWith { true }
        } forEach allUnits ) then {
            _des = _veh getVariable ["deserted",0] + 1;
            if ( _des > 6 ) then {
                deleteVehicle _veh;
            } else {
                sleep 10;
            };
        };
    };
}];
#

that might work

#

removes it when there is noone left inside the vehicle and noone within 1000m for a minute

gusty flume
#

does that go in Init.sqf or Initserver.sqf?

#

also anyone able to help me with a dynamic loadout script so people can change the loadouts oun the jets and attack helos

earnest ore
#

@cunning nebula Wouldn't that fire for every unit that gets out of the vehicle?

cunning nebula
#

it runs once the last unit has left the vehicle

#

but youre right, i should cancel it when someone new gets inside

#

there

#

or change "allUnits" to "allPlayers" if you just want to make sure no players are nearby (which is probably better)

gusty flume
#

hey @cunning nebula i dont suppose you know anything about spawn point errors?

cunning nebula
#

what are these ? / not sure what you mean exactly...

gusty flume
#

multiplayer respawn points

cunning nebula
#

yeh but what about them ?

lone glade
#

so, any idea what ["B_Bergen_mcamo_F",[["V_RebreatherB",false]]] that bool is for ? it's from getUnitLoadout

cunning nebula
#

maybe because it has no inventory

lone glade
#

nope

cunning nebula
#

you sure? it is a vest-item after all

lone glade
#

you can't place container with items inside them inside other containers

cunning nebula
#

hmm not inside units atleast

#

otherwise you can

hollow lantern
#

is execVM capable of doing something like execVM "D:\Aebian\Documents\Arma 3\missions\[A]_Angel.kobbvatn\itsAebian\FM\\fm_hit.sqf" ? Doesn't work for me. I guess because of the brackets

lone glade
#

it's a terrible terrible idea,

#

it was possible at some point and disabled because it was ripe for abuse

hollow lantern
#

wel I just want to do it for testing some stuff but not for an actual mission

lone glade
#

use relative paths?

hollow lantern
#

do you got an arma example? the script I'm trying to run is not in the same folder as the mission i'm on atm

lone glade
#

well guess what, you can't do that

still forum
#

@hollow lantern enable filePatching

#

Not sure if full paths work then.. but stuff like \userconfig\script.sqfwill

hollow lantern
#

kk

lone glade
#

full paths are disabled

still forum
#

@little eagle
{if (_x == "G_combat") exitWith {true}} forEach ((items player) + (assignedItems player) + [headgear player, goggles player, hmd player])
2.517ms (Vanilla unoptimized case insensitive)

"G_combat" in ((items player) + (assignedItems player) + [headgear player, goggles player, hmd player])
0.2128ms (Vanilla unoptimized case sensitive)

private _allItems = (assignedItems player);
_allItems append ((getItemCargo (uniformContainer player)) select 0);
_allItems append ((getItemCargo (vestContainer player)) select 0);
_allItems append ((getItemCargo (backpackContainer player)) select 0);
_allItems append  [headgear player, goggles player, hmd player];
_allItems = _allItems arrayIntersect _allItems;//Remove duplicates
{if (_x == "G_combat") exitWith {true}} forEach _allItems;
false

0.1069ms (Vanilla optimized case insensitive)

("G_combat" in _allItems)
0.0728ms (Vanilla optimized case sensitive)

("G_combat" inCI _allItems)
0.0723ms (Vanilla optimized + Intercept case insensitive in)

player hasItem "G_combat"
0.0582ms (Intercept complete case insensitive)

((getItemCargo (backpackContainer player)) select 0)
0.0366ms (This is probably the biggest problem for Intercept.)

The goggle is in the goggle slot which gets checked after all the containers. Considering backpack is the heaviest one.
Let's check backpack last.

player hasItem "G_combat"
0.021ms (Intercept complete case insensitive Checking Backpack last)

little eagle
#

Looks reasonable. When do we get this in vanilla?

subtle ore
#

๐Ÿคฃ

tough abyss
#

Memes

subtle ore
#

:alien: :smoking:

still forum
#

What is that "Vanilla" you are talking about?

jade abyss
#

It's tasty, but gets boring after a while. Some more flavours were added to it

subtle ore
#

Caramel and vanilla taste good

still forum
#

Btw that 2.517ms variant.. Literally the worst out of all of them was/is used by TFAR 0.9.x

subtle ore
#

TBD 1.0?

still forum
#

YES. 17!

subtle ore
#

Lol

little eagle
#

Dedmen, you can use the case sensitive in by converting the input case of the item to the config case by using configName.

still forum
#

Cool. Good to know

little eagle
#
private _selectionPosition = _unit worldToModel (ASLtoAGL getPosWorld _carriedItem);
#

๐Ÿค”

still forum
#

? What u thinkin bout?

#

It seems to now know worldToModel

#

I also never heard of that

lone glade
#

let me introduce you to it's brother "modelToWorldWorldVisual"

subtle ore
#

That's a mouthfull.

still forum
#

modelToWorldVisualWorld?

lone glade
#

you wished

#

or anything else, modelToWorldWorldVisual is the best command name ever

#

right next to setDammage

indigo snow
#

what about setposasl2

lone glade
#

strong contender

still forum
tough abyss
#

getShotParents :3

still forum
#

๐Ÿ˜‚

jade abyss
#

Rename it to: batman

subtle ore
#

Definitely confuse people with that

still forum
#

Who asked again if we can integrate the Achilles Modules in ACE?
From Achilles
private _fire = [] spawn {waituntil {false}};
Ask again.

tough abyss
#

๐Ÿคข

indigo snow
#

achilles is in that awkward spot of offering some good stuff but having ... not the best code

#

still no MCC, though

lone glade
#

ohgod no

#

bring out the holy water

indigo snow
#

_a = call compileFinal format ["%1",2];

lone glade
#

_a = call compile _a ๐Ÿ˜„

indigo snow
#

bzzt

little eagle
#
private _fire = [] spawn {waituntil {false}};

So this is what the scheduler is for.

indigo snow
#

im just

#

what would you even ever use that for

#

whats the thought process behind it

#

what did they try to communicate

still forum
#

Only thing I can guess is that they check if the script is still running. and at some point kill it using the script command that can kill scripts that I never used

little eagle
#

He did it because he could.

still forum
#

But.. Just use a bool for that.. WTF

lone glade
#

because reasons

still forum
#

yep. They call terminate behind some if conditions that could very well be false

#

and then they assign a new spawned script to that that actually does stuff

indigo snow
#

i have so many questions

little eagle
#

I blame Obama.

still forum
#

I think they just didn't know how to scriptNull and they though they need to put a value of same type into there if they predefine the variable with private

little eagle
#

scriptDone scriptNull reports true though.

indigo snow
#

omg

#

its solved then

still forum
#

Also the 5th private _fillEvenly = if (_unitCount >= 8) then {true} else {false}; I found

indigo snow
#

they missed a huge chance there

#

8=> _unitCount

little eagle
#

benis

still forum
#

If I see if true then true else false I'm just thinking how that retarted mess of braingoo is able to breathe and why nobody stopped him from breathing yet

indigo snow
#

what about if true then false else true

little eagle
#

Let's fix it...

still forum
#

I honestly never saw that I think

little eagle
#
private _fillEvenly = call compileFinal str if (_unitCount >= 8);
gusty flume
#

that got me thinking about logic gates

if a not A and B then B

indigo snow
#

can str make a compilable string from an IF type?

little eagle
#

Yes.

indigo snow
#

oh, didnt it just look like a bool?

little eagle
#

Yes, because that is more important than doing the same with resistance.

indigo snow
#

i mean they just didnt match the command names with the internal string names

little eagle
#

Question is, why?

lone glade
#

because nobody bothered to look and they thought "woops too late" once it was done

indigo snow
#

the fun thing is they added the new alias commands

#

but still didnt align them

little eagle
#

Same for <null> vs. objNull etc.

cerulean whale
#

is it possbile to detect a mouse click with the KeyDown eventhandleR?

little eagle
#

You don't.

subtle ore
#

Mousebutton down

indigo snow
#

you use the mouse button events

cerulean whale
#

okay

little eagle
#

MouseButtonDown
But those can't overwrite inputs. Don't even ask.

cerulean whale
#

I've never doneit before lol and website is down xD

subtle ore
#

@little eagle CBA now or else

little eagle
#

I can't change that.

#

No API.

subtle ore
#

Arent you guys super cool haxors that can do anything? Xd

indigo snow
#

@cerulean whale ((findDisplay 313) displayAddEventHandler ["mouseButtonDown",{ ... , 313 is the 3den display, main one is 46 iirc

subtle ore
#

46 is main yeah

indigo snow
#

the other ones are "mouseButtonUp" and "mouseZchanged"

little eagle
#

46 is the mission display, not the main display (main menu)

cerulean whale
#

yeah ik

subtle ore
#

POW

cerulean whale
#

cheers guys

indigo snow
#

teamwork

cerulean whale
#

thank ๐Ÿ˜ƒ

subtle ore
#

That one hurt commy

little eagle
#

Is the truth.

subtle ore
#

Dont hurt my feelings like that commy

#

You bully

#

I am sensitive commy, you have to give me the indirect truth ๐Ÿ˜‰

little eagle
#

You were not right.

indigo snow
#

you couldve been more correct

subtle ore
#

But, you have to make me feel better commy

indigo snow
#

โญ for effort

subtle ore
#

Gold stars are the greatest

lone glade
#

main display is 0

little eagle
#

Correct.

lone glade
#

and for some reasons BIS also take display 332 or 312 into account for arsenal

subtle ore
#

Nonsense, it's 69.

lone glade
#

yep, 312

indigo snow
#

one for left hand side, one for right hand side?

lone glade
#

i'm pretty sure that is the cargo camera, it's weird

indigo snow
#

ah

subtle ore
#

๐Ÿ˜‰

#

Anybody having problems using serverCommand with nicknames?

#

Can't even really get it to work with player uids

#

(#ban , #kick)

little eagle
#

These are disabled or something, right?

subtle ore
#

Uhhh...nope. Server command password is required

cloud thunder
#

ServerAdminPassword serverCommand ("#kick " + "PlayerName")
not working?

subtle ore
#

Nope, not working @cloud thunder

#

Unless you are able to see otherwise

cerulean whale
#

Anyone know the DIK heycode for '1' in KeyDown?

distant egret
#

@cloud thunder serverCommandPassword serverCommand format["#kick %1", name _player] works for me

#

but it's the serverCommandPassword not Admin

#

ow is for @subtle ore xD

subtle ore
#

@distant egret yep

#

Lol

distant egret
#

Does it work or not?

subtle ore
#

@cerulean whale use the dik codes inclusion

#

No idea, i am on mobile atn

distant egret
#

ah

subtle ore
#

I have tried something similar. Even in the debug, didn't seem to do anything

cerulean whale
#

@subtle ore Website is down for maintenance lol

#

cheers

subtle ore
#

Commy has you covered

little eagle
#

You can just add this include line 1:

#include "\a3\ui_f\hpp\defineDIKCodes.inc"
#

And then use DIK_1.

cerulean whale
#

k

little eagle
#

etc.

agile pumice
#

can someone share with me an example of a single mouse click displayeventhnalder? BI wki is down

little eagle
#

((findDisplay 313) displayAddEventHandler ["mouseButtonDown",{ ..., 313 is the 3den display, main one is 46 iirc

lone glade
#

yep

#

and 312 is something else, I think arsenal mission for some reason

subtle ore
#

main one is 46 iirc

little eagle
#

mission*

subtle ore
#

main

lone glade
#

mission

agile pumice
#

thanks

subtle ore
#

main mission

lone glade
#

just mission