#arma3_scripting

1 messages ยท Page 364 of 1

cloud thunder
#

you don't need to run that script in unscheduled

queen cargo
#

just added the } apply buildList; in the end without much thinking
forgetting that it is the other way around for apply

cloud thunder
#

its a one time thing right besides the trigger?

tough abyss
#

It has to run once per each large marker

#

building a list of all the roads

tame portal
#

@tough abyss What is your goal

tough abyss
#

Generate IEDs on roadways across the entire map

tame portal
#

go through all your markers and randomly create ieds on those roads?

tough abyss
#

Yes

tame portal
#

ah okay

#

if its across the map, why do you need markers to go from?

cloud thunder
#

debug i think, yeah no need for unscheduled.

tough abyss
#

Well currently the implementation is using square markers...

#

This is that Phronk guys code.

#

It's fucked.

queen cargo
#

as said ..

#

just scrap it

#

and build it again

tough abyss
#

Maybe I should scrap the marker system too.

#

But that is going to generate one big frigging array.

#

It already generates a massive array.

#

2124 elements to be exact.

#

Might have to divide it into smaller pieces.

#

Wait.

#

Hmm.

tame portal
#
tag_getRoads = {
    private _mapSize = worldSize / 2;
    private _allRoads = [_mapSize, _mapSize, 0] nearRoads worldSize;

    // Return
    _allRoads
};
tough abyss
#

What does worldSize actually do?

frail zephyr
tough abyss
#

Okay whats this config size relative to?

#

KM?

tame portal
#

Meter, from [0,0,0]

#

As far as I remember atleast

tough abyss
#

So KM from the origin point [0,0,0]; ?

frail zephyr
#

n

#

no*, meters

tough abyss
#

ah.

#

Might want to add that to the wiki

frail zephyr
#

I mean, its probably the same unit that all the other distance commands return

tame portal
#

^

tough abyss
#

11523

#

Is the amount of roads.

#

:S

tame portal
#
tag_getRoads = {
    private _mapSize = worldSize / 2;
    private _allRoads = [_mapSize, _mapSize, 0] nearRoads worldSize;

    // Return
    _allRoads
};

tag_generateIEDs = {
    params [
        ["_roads", [] , [[]]]
    ];

    private _generatedMines = [];
    private _iedTypes = ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
    private _trashTypes = ["Land_Garbage_square3_F","Land_Garbage_square5_F","Land_Garbage_line_F"];
    private _iedRadius = 8;
    private _chance = 0.95;

    {
        if ((random 1) >= _chance) then {
            private _road = _x;
            private _roadCenterPosition = getPos _road;

            // Create mine
            private _mine = createMine [selectRandom _iedTypes, _roadCenterPosition, [], _iedRadius];
            _mine setDir (random 360);

            // Create junk
            private _junk = createVehicle [selectRandom _trashTypes, _roadCenterPosition, [], 0, "CAN_COLLIDE"];
            _junk setDir (random 360);

            _generatedMines pushBack _mine;
        };
    } forEach _roads;

    // Return
    _generatedMines
};

private _allRoads = call tag_getRoads;
private _allMinesGenerated = [_allRoads] call tag_generateIEDs;
#

whops

frail zephyr
#

Now the real question is; do you reallllyyyyy need to be generating IEDs/Junk for ALL roads? Or can you be smarter about it and generate them as needed?

tame portal
#

@tough abyss something along those lines

#

i dont know what nearroads internally does so it might lag out a bit, but since you run it only once anyway

#

however if thats for mp, the amount of mines might blow things

tough abyss
#
private _mapSize = worldSize / 2;
private _allRoads = [_mapSize, _mapSize, 0] nearRoads worldSize;

for "_i" from 0 to NUMBER_OF_IEDS_TO_CREATE do {

    _mkr = createMarker ["",getPosATL(selectRandom _allRoads)];
    _mkr setMarkerShape "ICON";
    _mkr setMarkerType "mil_dot";
    _mkr setMarkerBrush "Solid";
    _mkr setMarkerAlpha 1;
    _mkr setMarkerColor "ColorEast";

};
#

Creates 1 marker...

tame portal
#

what is NUMBER_OF_IEDS_TO_CREATE

tough abyss
#

30

#
#define NUMBER_OF_IEDS_TO_CREATE 30                                //Number of IEDs per marker, defined in iedMkr    [Default: 5]
#define DETONATE_IED_WITH_WEAPONS true                    //Can the IED be killed with weapons?            [Default: false] TRUE = Yes | FALSE = Can only be disarmed
#define DEBUG_MARKERS true                        //Show IED markers on map?                        [Default: false]



//!!DO NOT EDIT BELOW!!
iedBlast = ["Bo_Mk82","Rocket_03_HE_F","M_Mo_82mm_AT_LG","Bo_GBU12_LGB","Bo_GBU12_LGB_MI10","HelicopterExploSmall"];
iedList = ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
iedAmmo = ["IEDUrbanSmall_Remote_Ammo","IEDLandSmall_Remote_Ammo","IEDUrbanBig_Remote_Ammo","IEDLandBig_Remote_Ammo"];
iedJunk = ["Land_Garbage_square3_F","Land_Garbage_square5_F","Land_Garbage_line_F"];

private _mapSize = worldSize / 2;
private _allRoads = [_mapSize, _mapSize, 0] nearRoads worldSize;

for "_i" from 0 to NUMBER_OF_IEDS_TO_CREATE do {

    _mkr = createMarker ["",getPosATL(selectRandom _allRoads)];
    _mkr setMarkerShape "ICON";
    _mkr setMarkerType "mil_dot";
    _mkr setMarkerBrush "Solid";
    _mkr setMarkerAlpha 1;
    _mkr setMarkerColor "ColorEast";

};
#

Being run in scheduled environment

tame portal
#

all your markers have the same name

#

""

tough abyss
#

I want to generate random marker names

#

format ["%1",random(0,1000)]; ?

tame portal
#

just do

frail zephyr
#

Use the _i var

tough abyss
#

ah right derp.

tame portal
#

format ["ied_marker%1", _i]

tough abyss
#

Yeah

#

Can't say how many times I've worked with other peoples code

#

and spent hours trying to debug it.

#

Code inits perfectly.

#

next stage.

tame portal
#

thats why i always write stuff myself if i need it

#

otherwise you run into issues and noone likes reading through other peoples code to understand it and fix an issue ^^

tough abyss
#
  {
        if ((random 1) >= _chance) then {
            private _road = _x;
            private _roadCenterPosition = getPos _road;

            // Create mine
            private _mine = createMine [selectRandom _iedTypes, _roadCenterPosition, [], _iedRadius];
            _mine setDir (random 360);

            // Create junk
            private _junk = createVehicle [selectRandom _trashTypes, _roadCenterPosition, [], 0, "CAN_COLLIDE"];
            _junk setDir (random 360);

            _generatedMines pushBack _mine;
        };
    } forEach _roads;
#

So much better.

#

Finished

#

mines take a while to initialize thought.

#

Not if you find bushes to hide them in ๐Ÿ˜›

#

SelectBestPlaces.

#

hiding them in bushes next to the road.

#

Thats what I've done in Zeus missions

#

Generating large piles of rubbish hmm it's feasible.

tough abyss
#
private ["_testPlaces","_getRoads"];
_testPlaces = [];
_getRoads = [] call tag_getRoads;
for "_k" from 0 to NUMBER_OF_IEDS_TO_CREATE do {
        {
        _testPlaces = [_getRoads] call tag_findPlaces;
        systemChat format ["_testPlace %1",_testPlaces];
        /*
        _mkr = createMarker [format ["OTHER_%1",_k],(_x select 0)];
        _mkr setMarkerShape "ICON";
        _mkr setMarkerType "mil_dot";
        _mkr setMarkerBrush "Solid";
        _mkr setMarkerAlpha 1;
        _mkr setMarkerColor "ColorEast";
        */
        } forEach _testPlaces;

};
open vigil
#

... a few hours late, but I do have to sleep sometimes...

tough abyss
#

Why does this refuse to run?

#
tag_findPlaces = {
    params [
            ["_getRoads", [] , [[]]]
    ];

    _testPlaces = selectBestPlaces [getPosATL(selectRandom _getRoads), 500, "forest+meadow+trees", 0.9, 10];
    systemChat format ["_testPlace %1",_testPlaces];
    _testPlaces;
};
#

Complains _testPlaces is undefined...

#

How?

#

I run the code in game it isn't undefined but right at mission start it is...

#

This is unbelivably frustrating...

#

ForEach should just work...

#

Something so rudimentry should just work

#

This has got to be a timing issue it can't be anything else.

tough abyss
#

Hazzar

#

We have solution

#

It's working now.

#

Now lets see if it hides stuff in bushes

#

Debugging in A3 is pain...

#

Oh yeah this works really well

#

It's now hiding the stuff in grass and bushes

rocky marsh
robust hollow
#

returns string not array

#

the returned string being the weapon in the units hands, not just any weapon the unit has on them

#
_unitCurrentWeapon = [primaryWeapon player,secondaryWeapon player,handgunWeapon player];``` is what you might be after?
tough abyss
#

Is there a good way to convert 2D space to 3D space?

#

by using extrapolation with an existing object?

#

nvm worked it out

#

Wow this script works too well

#

Yeah this is disturbingly good.

#

Note to self

#

Don't shoot IEDs...

#

@tough abyss It officially works

#

Like it works really well.

#

Hides IEDs in the bushes just off the road and everything.

tulip cloud
#

count allPlayers; the most efficient way to get current server population?

simple solstice
#

don't know a better way

tulip cloud
#

seems like arma would have the variables hardcoded and you would be able to call them.

tough abyss
#

What is with the rpt file randomly stopping working?

dim terrace
#

is there someone brave enough to test if setTerrainBlendPars , setClutterColoringCoef & setClutterColoringInterpolation works in stable in public diag.exe?

astral tendon
#

this setSkill ["aimingAccuracy", 0.1];

#

the lowest value is 0.1?

cedar kindle
#

@tulip cloud there's playersNumber but it wants a side and includes AI if enabled. note that HC is included in allPlayers

little eagle
#

. I think they changed this ^

rancid ruin
#

. that's good to know, thanks commy

tame portal
#

. interesting

astral tendon
#

[this,"STAND_U1-3","ASIS"] call BIS_fnc_ambientAnim;

#

Its saying that its not reconized, but i copy and paste from the function view

scenic shard
#

1-3 is 3 different ones i think? "STAND_U1", "STAND_U2", "STAND_U3"

astral tendon
#

so i am supouse to remove the "-" thing?

#

now that is working

#

how about this one

#

[this,"BRIEFING_POINT_LEFT","ASIS"] call BIS_fnc_ambientAnim;

#

he is actually not pointing at anything

scenic shard
astral tendon
#

well, thanks anyway

#

also i would like to share this code i did

#

[this,(selectRandom ["STAND_U1","STAND_U2","STAND_U3"]),"ASIS"] call BIS_fnc_ambientAnim;

#

this is a code that make a unit have one of those 3 animations

#

it resets after restart

#

really fun thing to explore

vague hull
#

@dim terrace what are the args for the last two

#

they dont have a wiki entry

still forum
#

Why are troll messages always deleted... I'm reading up on two people talking to a invisible being.. https://github.com/dedmen
@rotund cypress There are constants in Arma. Here: 1 that's a constant.

dim terrace
#

@vague hull some scripting commands to tweak islands. If they are not present on diag.exe I might ask to bring it to public light

#

there are few more commands that could be useful

rotund cypress
#

@still forum that is most certainly not his Github.

vague hull
#

alright, will test that on devbranch if thats ok?

still forum
#

I found it... didn't look at that github page yet because my firefox crashes when I open it

rotund cypress
#

Ye, but it's not his.

still forum
#

Now it's mine

inner swallow
#

does setSkill only run where unit is local? wiki doesn't seem to say anything about its locallity

vague hull
#

In devbranch diag, all 3 dont show up

subtle ore
#

@still forum Hobby Programmer mainly focused around the game Armed Assault "Armed assault", wtf is that shit lol

rancid ruin
#

it's what ArmA stands for

#

but nobody calls it that

subtle ore
#

Well...that one is up for debate. Oviously not here ๐Ÿ‘€

grand berry
#

Has anyone got an example of adding a button to the pause menu or screen?

simple solstice
#

CBA does that for Addon Options @grand berry

grand berry
#

Yea, trying to do it without CBA for now.

subtle ore
#

Well. That and onPauseScript in the description.ext

simple solstice
#

I meant looking at their files to see how they added it ;p

grand berry
#

Ohh yea fair enough haha

little eagle
#

Don't think you will be able to do it with just scripts.

grand berry
#

In config is fine it's in an addon... just realised Im in scripting channel not conifg.

subtle ore
#

๐Ÿ˜‚

empty blade
#

@grand berry keepo

little eagle
#

It's more than config too.

grand berry
#

So you can't add a button like ACE's settings button via a script/function/config combination?

little eagle
#

That you can do easily. RHS does it.

#

The CBA ones are more integrated into the actual sub menu etc.

grand berry
#

Ah yea sorry my bad description then. First move into displays/ UI so no idea what I'm doing yet.

little eagle
#

Second half of the script is the main menu additions. No idea why it's in that component.

grand berry
#

Great, that was just what I was looking for. I started looking in the UI and main folders, guess i missed this one.

vagrant badge
#

how to turn on showing id in new editor ??

little eagle
#

map id's are deprecated I think.

#

Because they change with every update to the map or something like that.

astral tendon
#

there is a command to know if a unit have the forceFollowRoad active?

#

i want to put it in watch

frail zephyr
#

Doesn't look like a command is there; but I wonder if it sets a variable on the unit like BIS_fnc_ambientAnim does. You could dump allVariables on the unit and see if something is set.

astral tendon
#

[this,"REPAIR_VEH_KNEEL","ASIS"] call BIS_fnc_ambientAnimCombat;

#

this is saying that there is no animation like that in the list

#

it works if i put BIS_fnc_ambientAnim

#

but how i cancel it?

#

or better say, stop that animation?

#

i find one

#

fixguy call BIS_fnc_ambientAnim__terminate;

frail zephyr
#

BIS_fnc_ambientAnimCombat doesn't have the same animation sets as BIS_fnc_ambientAnim.

subtle ore
#

Does the simul weather scripting commands still work?

still forum
#

afaik yes

subtle ore
#

There was a thread 3 years ago about it. There was some confusion regarding the layers. But it appears when setting the layers it takes a number

astral tendon
#

anything that i put on a init overrides other commands?

#

like _soldier1 disableAI "AUTOTARGET"; but there is also a "Disable autoraget" check box

#

which one will be accepted?

subtle ore
#

Whichever script is executed last is the one to overtake existing values

astral tendon
#

same for bars?

subtle ore
#

It's sort of like a grocery list

delicate lotus
#

Disable Autotarget check box? you mean from eden editor / 3den enhanced? Commands in the init will override that stuff, always.

tough abyss
#

@subtle ore - eggs don't usually override the bacon, but ok.

#

In fact, nothing overrides the bacon.

subtle ore
#

@tough abyss Hey now :(
I like me some good eggs and bacon. No need to make it any more or less

tough abyss
#

Same ๐Ÿ˜„

astral tendon
#

i tink was a mistake bild my mission with 3den enhanced

#

some times i restarted my game and then i am going to acdentaly edit with the 3den enhanced off

#

then i loost allot of configurations

#

that take me a week to figure it out

subtle ore
#

@astral tendon Honestly, if you were doing something quick that would take like a day tops then maybe use 3d eden enhanced. Otherwise, not a good idea in my opinion

#

Better to have your hands in it all and understand what is where and why it's happening

astral tendon
#

definitely not

#

this is going to be my frist and last mission with that thing

thick sage
#

do you know of any way to copy content from arma (e.g. copyToClipboard) in MP without an extension like initDB? copyToClipboard is SP only.

still forum
#

diag_log everything to RPT?

subtle ore
#

Or admin debug ? For the quickest of testing?

still forum
#

why does extension not work?

subtle ore
#

For simply copyToClipboard? Over extending yourself there

tough abyss
#

Best way is to use use a logging extension, afew of them outthere

thick sage
#

I have a string in arma that I want to share accross all clients so that they can save it to a file.

still forum
#

open a UI dialog so they can CTRL+C.. Not sure if that works in MP... but could? I guess

subtle ore
#

Now that, an extension you could just have the client write a file autonatically

tough abyss
#

UI Dialog approach, is prob the best method. Since BE will randomly block extensions at tmes
If the string is just for another mission, consider using profilename to save a variable.

thick sage
#

the string is the (persistent part of the) mission. ๐Ÿ˜ƒ

#

@still forum what a fantastic idea... Will try that strait away

still forum
#

Might be that CTRL+C is also disabled.

#

I remember looking at that but don't remember exactly

little eagle
#

I really doubt that.

subtle ore
#

Any way of deciphering which rtm animations in the CfgMoves entries will work on units? Seems as though some of them just reset the queue and stop playing anything. (switchMove & playMove)

thick sage
#

FYI, it works (dialog, Ctrl+C, dialog, Ctrl+V)

#

thanks guys!

subtle ore
#

:+1:

astral tendon
#

the command "crew" retuns values even if there is dead crew membres

#

is there a version that does not return dead ones or if returs true or false if there is crew?

subtle ore
#

@astral tendon or you know. Don't be lazy.

{
 If(alive _x) then {
    };
} forEach (crew coolHelo)
astral tendon
#

I... actually dont know

subtle ore
#

Slap your code between the if statement brackets

#

Put that in a script or spawn it

#

Then to take a step further, convert it to a function. Return the alive units and call the function

astral tendon
#

if ((!alive driver testcar) AND (!alive gunner testcar)) then (testcar setDamage 1)

#

this one works for me

#

but thanks for the help Midnight

frail zephyr
#

{alive _x} count crew vehicle == 0

#

something like that would be easier

#

Your version will never take into account more than the driver and gunner

astral tendon
#

is supouse to be like this: {alive _x} count crew testcar == 0

#

?

#

it only give me false

thick sage
#

btw, @still forum and @subtle ore, the dialog trick works as long as the string does not contain \r\n

still forum
#

wtf ๐Ÿ˜„

astral tendon
#

either if i change to !alive

thick sage
#

specifically, if you Ctrl+C from a C_EDIT that contains \r\n, it copies correctly. But if you Ctrl+V it back and ctrlText it, the \r\n are converted to spaces.

queen cargo
#

arma also should know rich text editor controls if i remember correclty

still forum
#

@thick sage you just switched carriage return and line feed ๐Ÿ˜„ CR comes first

thick sage
#

yes, that, thanks!

astral tendon
#

if ({!alive _x} count crew testcar == 0) then (testcar setDamage 1)

#

the car still blow up if the crew still alive

#

i did something wrong?

little eagle
#

Maybe there is no crew.

still forum
#

But you would want to compress that data anyway right? so leave out all whitespaces

astral tendon
#

actaully there is

#

a gunner and a driver

still forum
#

@astral tendon did you test in debug console?

astral tendon
#

yes

still forum
#

maybe missing brackets?

little eagle
#

omg

still forum
#

when does that code run? init box?

little eagle
#

You have to put the then code block in curly brackets.

#

then nil
atm

subtle ore
#

๐Ÿคฆ

little eagle
#

if (cond) then {code}

#

parenthesis vs curly brackets.

thick sage
#

why dont you use SQFlint?? That appears immediately as an error. I can no longer code without it because I just expect it to find these for me

subtle ore
#

LAZY

thick sage
#

@still forum, I gave readability over compression, so I kept the spaces. ๐Ÿ˜›

#

(probably until now, where utility trumps readability)

still forum
#

Or you could just.. enable error messages in editor

#

or look into the RPT..

little eagle
#

This doesn't error though.

astral tendon
#

if ({!alive _x} count crew testcar == 0) then {testcar setDamage 1}

little eagle
#

lgtm

astral tendon
#

now this one works

little eagle
#

But still. This means that the car explodes when there's no crew inside. Idk if that is what is needed.

subtle ore
#

Shoot the driver through the glass, boom!

astral tendon
#

i need this because some vehicles when the driver dies the car still runs

#

and gets on the road and the AI dont figure it out how to get out of the way

subtle ore
#

There are alternatives to blowing it up...

thick sage
#

like set speed to 0

astral tendon
#

but i also need the car to move

little eagle
#

Shh. Everyone loves explosions.

thick sage
#

๐Ÿ˜„

little eagle
#

๐Ÿ’ฅ

astral tendon
#

/\ also that ๐Ÿ˜„

subtle ore
#

:boom: :fire:

tough abyss
#

Scripting with Michael Bay.

subtle ore
#

๐Ÿ˜Ž

zenith totem
#

Does anyone know if enableDynamicSimulation is a local or global locality command?

subtle ore
#

@zenith totem likely global and local. Since the system i presume would have to see if the player is waking the simulation

queen cargo
#

hah ... wanted to send you a link to the wiki but ... it rly isnt stated there

#

in case you ever find out @zenith totem
add it to the wiki please

little eagle
#

run on server, cry if you're also using a hc

subtle ore
#

Well it seems like you can run it locally and on the server though

#

Wouldn't see why not

tough abyss
#

possible to spawn a script with its name instead of function?

indigo snow
#

Do you mean a file? ExecVM?

tough abyss
#

works the same way as spawn then?

indigo snow
#

Sure

astral tendon
#

when i put a image on a board it does not apears to other clients, only to me (host), and there is a error saying that could not find picture

indigo snow
#

Image is in mission folder?

astral tendon
#

yes

delicate lotus
#

snipe driver

#

boom

astral tendon
#

any idea?

subtle ore
#

Yeah because you've got the wrong path to the image

#

Or the image isn't in the correct format

#

Ie .paa , .jpg . not sure if .png is applicable

astral tendon
#

is in .paa

tough abyss
#

Now the IEDs initiallize correctly now.

#

Works pretty well now.

#

Now the triggers won't fire.

#

And I am not sure why.

cloud thunder
#

is revealMine JIP and does it continue to reavel to AI units spawned after command used if ran on server?

tough abyss
#

Well this code is run from the init.sqf

#

via execVM

#

So enclose it in the if (isServer) then {} ?

#
 _trig setTriggerStatements [
            "{
                vehicle _x in thisList && speed vehicle _x > 4;
             } count playableUnits > 0",
            "
            {
                systemChat format ['_x is _iedTypes %1',_x];
                if (_x in _iedTypes) then {
                [_x] call tag_detonateIED;
                };
            } forEach nearestObjects [thisTrigger,[],10];",
            "deleteVehicle thisTrigger"];
cloud thunder
#

what, oh your IED script? I'm not talking about that. I've done my own IED script almost done..

tough abyss
#

Does putting spaces between code make a trigger stop working?

cloud thunder
#

shouldn't

tough abyss
#

So what would be preventing the trigger from firing?

cloud thunder
#

where is trigger local to?

tough abyss
#

As far as I know server.

#

Should it be local to server or client ?

#

or global?

cloud thunder
#

depends what your aiming for really. systemChat is local to the machine that executed it

tough abyss
#

This is currently running on a "listen server"

cloud thunder
#

thats a local hosted server right? server is on same machine as your player?

tough abyss
#

Yes

#

isServer should handle that correct?

cloud thunder
#

trigger can be on server but things like sytemchat need to be remote executed if intended to work in MP.

tough abyss
#

So how should I go about remoteExec'ing systemChat?

#

remoteExec ?

#

or PVEH ?

cloud thunder
#

either way will work. youll need to make funtions and or eventhandlers on the respective machines. Good to have anyway if you inteand to make missions as this command is commoly used in MP

tough abyss
#

So I can do either way?

#

Okay.

#

initPlayerLocal.sqf

#

or initPlayerServer.sqf

#

or if (isServer) then {} etc?

#

from init.sqf ?

#

@cloud thunder For your script did you decide to use triggers too?

#

Can local variables be used in a trigger?

#

Also what is the syntax for triggers?

#

The string part I can't work out.

cloud thunder
#

yes, i did use triggers on server. for the statements Local vars can only be used when created in the statements.

tough abyss
#
"{
          vehicle _x in thisList && speed vehicle _x > 4;
  } count playableUnits > 0;"
#

Is that valid in a trigger?

cloud thunder
#

I believe so

tough abyss
#

Odd then why is this not firing....

cloud thunder
#

maybe remove ; after 4. Its not needed there

tough abyss
#

Not needed?

#

Reason?

cloud thunder
#

its a condition. I'm using "{vehicle _x in thisList} count playableUnits > 0"

tough abyss
#

and I take it "hint 'Activated';" doesn't work either?

cloud thunder
#

in fact you should delete ; at end too

tough abyss
#

So what happens when you have multiple statements ?

#

How does the engine determine the beginning and end?

cloud thunder
#

then use; but thats not multiple statements

#

hint is a local command

tough abyss
#

Give me an example of how to use multiple statements

#

I'll need this for later, it doesn't matter if I am on the server and client?

#

Does it?

#

From the "Host Button"

#

?

cloud thunder
#

_actCond="((RedHot <= Max_Act_Gzones) && {{vehicle _x in thisList && isplayer _x && ((getPosATL _x) select 2) < 10} count playableunits > 0})";

tough abyss
#

Ahhhh.

#

at the end of the entire string ?

#

So you do need the ;

cloud thunder
#

yes

#

condition is not a statement but defining the condition is

tough abyss
#

so right now I have this in the condition

#

this;

#

this in the onAct

#
"hint 'Activated'"; 
#

this in the onDeact

#
" hint 'Activated' " ;
#

?

#

What should be the min mid max value be if I want it to go from 1 second to 10 seconds?

queen cargo
#

rly should not be coding ... 4 commits for a blindly simple macro ...

cloud thunder
#

it happens

tough abyss
#

Who?

#

me?

cloud thunder
#

1,5,10

tough abyss
#

Was he referring to me @cloud thunder

#

?

cloud thunder
#

probably not unless you are commiting code to something like github atm and you have a stalker.

tough abyss
#

No.

#

Why is this trigger not firing...

#

Ugh... why...

cloud thunder
#

I don't know but I'm working on mine atm . you might want to use this one instead/

tough abyss
#

I'd rather understand why it won't fire...

#

Other than this the entire code works as it should

#

It searches nearby roads finds a bush

#

and hides IEDS in them.

#

facedesk

#

In EDEN editor

#

It applies the string code to the actual data.

#

facedesk

queen cargo
#

gah.... neeed moar beer

tough abyss
#

I can work out how the string is applied opening the mission.sqm I think

queen cargo
#

may you tell me what would be needed for ya guys until you can use my sqf-vm (@signal peak) ? (help__ <STRING> can be used to test capabilities)

tough abyss
#
            name="Some_trig";
                condition="call{this;}";
                onActivation="call{hint ""Activated"";}";
                onDeactivation="call{hint ""Activated"";}";
#

Thats how EDEN interprets it.

#

facedesk

queen cargo
#

looks ok to me

tough abyss
#

This wasn't working

queen cargo
#

need to read the whole convo though

tough abyss
#
_trig setTriggerStatements [
            "this;",
            "
            {
                systemChat format ['_x is _iedTypes %1',_x];
                if (_x in _iedTypes) then {
                [_x] call tag_detonateIED;
                };
            } forEach nearestObjects [thisTrigger,[],10];",
            "deleteVehicle thisTrigger"];
queen cargo
#

can you give me a TL;DR?

tough abyss
#

Basically my trigger wasn't working.

#

I didn't realise you don't put 'string'

#

around the EDEN versions

#

Then I simply need my code to fire in the _localTrigger

#

Thats it.

#

making IED go boom

#

by setting damage 1;

queen cargo
#

did not understood anything
but ok ๐Ÿ˜ƒ

#

if it is working, then i am happy for ya

tough abyss
#

Not really.

#

The triggers aren't firing.

#

In the code.

queen cargo
#

can you provide whole creation SQF code?

#

at best on pastebin to not clutter

#

mor beter: hastebin

tough abyss
#

No bang.

#

Trigger doesn't even fire.

queen cargo
#

gimme few mins

#

cannot solve this riddle in my head

#

beer has taken over that part

#

and makes a party in there

#

bad beer ...

#

just found what i will do trhe rest of the night

#

playin arma

#

besides deactivation, those triggers work for me

cloud thunder
queen cargo
#

what was the problem?

tough abyss
#

I use SelectBestPlaces

#

combined with "forest + medows + trees"

#

Hides them very well.

#

Makes the script very smart.

#

Near impossible to spot them

#

Makes every NEED a mine detector

#

Spot the IED:

#

Makes the guys in the missions to be very careful.

#

This is the initialization process @cloud thunder

#

I hate to kind of hack a solution around the 2D position returned.

#

Fortunately createVehicle uses getPosATL ?

#

So setting it to 0 snapped them to the ground.

cloud thunder
#

@tough abyss i'm getting error on first line

tough abyss
#

Of which?

cloud thunder
#

yours

#

did you try mine?

tough abyss
#

First line oh yeah the code hasn't been error hardened

cloud thunder
#

running in debug console

tough abyss
#

It hits 89 and occasionally finds an unknown entry.

#

Because SelectBestPlaces returned a any any.

#

It's screwy like that.

#

Don't need this by the way.

#

We use ACE3

#

[thisTrigger] remoteExec ['JIG_IED_FX', _irP, false];

#

Appreciate your code.

#

I'll refine this more later.

#

But selectBestPlaces

#

Is probably one of the coolest A3 commands

#

Along with IsFlatAndEmpty.

cloud thunder
#

๐Ÿ’‹

queen cargo
#

and want to see those triggers

astral tendon
#

i need to make my mission a SP and MP on workshop
but i can only upload two versions of it or i can just put one for the two versions?
ofcouse, is MP and SP ready

robust hollow
#

you can publish it once for both SP and MP...

tulip cloud
#

What the proper way of getting a global variable defined in one sqf in another?

I have a global variable that I make public to send to client

myGlobalVariable = count allPlayers;
publicVariable "myGlobalVariable";

another sqf

_aPrivateVar = myGlobalVariable * 10;

I get the error that myGlobalVariable is undefined.

#

missionNamespace setVariable ["tro","lolol"]; Is this the proper way of doing it?

little eagle
#

Fix the race condition.

still forum
#

If you try to read the variable before you set it.. then it ofcause won't work.
Also it does not magically instantly transfer to all clients

tough abyss
#

@tulip cloud missionNamespace setVariable ["tro","lolol",true];

#

It will be transfered to all clients then

indigo snow
#

thats identical to myGlobalVariable = count allPlayers; publicVariable "myGlobalVariable";

#

the issue is his timing, as commy said

tough abyss
#

Race Conditions ah right.

tough abyss
#

It's good practice to set a variable to something if it's going to be PV'd

#

Even if it's some pointless value like true or false

robust hollow
#

what before you need it, isnt that what the default value in getvariable is for?

#

or does it broadcast faster after the first time or something?

tulip cloud
#

do both methods have a race condition? I'm confused on what exactly is causing the problem so I can identify now and in the future.

robust hollow
#

ur trying to use the variable before it has been broadcast. publicvariable isnt instant

tulip cloud
#

is missionNamespace the same issue?

robust hollow
#

missionNamespace setVariable ["tro","lolol",true];
its the same deal yea, not instant

tulip cloud
#

Is there a way to test the performance or something so I can add a sleep or something to avoid the problem? What is the best practice in this situation? (In my actual code I don't actually have them back to back like this.)

tough abyss
#
tro = true; 
PublivVariable "tro"; 

is the same as

 MissionNameSpace setVariable ["tro",true,true];
#

All global not public variables exist in GLOBAL variables any variable thats not prefixed with an underscore

#
GLOBAL = true;
_LOCAL = true;
tulip cloud
#

I understand the variable scopes.

tough abyss
#

PV's must be initialized.

#

Otherwise you get wrong results.

#

tro = assign me a value

#

then missionNameSpace set it's variable and global it.

cunning nebula
#

or give it a default value when you fetch it

robust hollow
#

^

#

i publicvariable things as they are needed, never had a problem ๐Ÿ˜•

tulip cloud
#

What i best practice? putting variables into the missionNameSpace or setting a Global variable to Public?

robust hollow
#

its the same thing

tough abyss
#
MissionNameSpace getVariable ["tro", true];
#

^ Default value

#

Done.

cunning nebula
#

exactly

tulip cloud
#

Public variables are added to the missoinNameSpace and are handled the exact same way? Why make 2 ways to do the same thing?

cunning nebula
#

always good to do that

tough abyss
#

getVariable setVariable doesn't work with PVEH's

#

They're are linked to PV's being sent and recieved.

cunning nebula
#

because ArmA always has at least 2 different ways of doing stuff

tough abyss
#

PublicVariable will respond to a PVEH

#

setVariable will not.

#

Errr

#

Let me test that.

#

Not absolutely sure thats the case.

cunning nebula
#

dont think so

#

the PVEH should fire no matter what

robust hollow
#

^ dis is correct

still forum
#

@tulip cloud
"What i best practice? putting variables into the missionNameSpace or setting a Global variable to Public?"

myGlobalVariable = count allPlayers;
publicVariable "myGlobalVariable";
and
missionNamespace setVariable ["tro","lolol"];

are both missionNamespace.
You can also use waitUntil till the variable is not nil anymore. If that's applicable for you

#

setVar with public flag or set var and publicVariable doesn't make a difference in the backend. It's just that one command does both things. and the other does them seperatly

tulip cloud
#

missionNameSpace is a lot cleaner looking I think I'll use that.

missionNameSpace setVariable ["tro",120,true]
tro = tro + 10;

client

missionNameSpace getVariable ["tro",true];

client receives: 130

still forum
#

seperatly ofcause being slower

#

no.. client definetly does not

#

a variable is only sent to other clients if you tell it to.

#

there are no "public variables" that self replicate

cunning nebula
#

publicVariable also broadcasts to everyone

#

setVariable allows you to specify

tough abyss
#

^

still forum
#

No.

#

That's not correct

#

how do you specify that with setVariable then?

tough abyss
#

Namespace setVariable Array
Object setVariable Array
Group setVariable Array
Team_Member setVariable Array
Task setVariable Array
Location setVariable Array
Control setVariable Array (since Arma 3 v1.55.133553)
Display setVariable Array (since Arma 3 v1.55.133553)

cunning nebula
#

instead of just true you can use client ids

tough abyss
#

You can specify the name space. As being another neat thing about setVariable.

still forum
#

:u

#

I have never seen that being used anywhere

#

you can also use publicVariableClient.

#

To send only to specific clients

tough abyss
#

player setVariable Unique player var.

cunning nebula
#

well yes

warm gorge
#

Thats pretty neat, never knew it could do that

cunning nebula
#

but setVariable simply does it all ๐Ÿ˜ƒ

#

much neater

tough abyss
#

^

still forum
#

Are you sure that is not broken? I have literally never seen that being used anywhere

tough abyss
#

Unless you want a PVEH

tulip cloud
#

I'm currently using publicVariables and I use it like this:

myPublicVar = 25;
publicVariable "myPublicVar";

Then on the client I just do

diag_log myPublicVar;

and it outputs: 25

tough abyss
#

People might not know how to use it.

cunning nebula
#

there are a lot of things that none or very few people use

tough abyss
#

^

#

BreakOut being one of them.

warm gorge
#

breakOut

#

lol

tough abyss
#

and breakTo

#

xD

#

There is also something about for loops I didn't know.

#

step

cunning nebula
#

oh, yeh

still forum
cunning nebula
#

rarely need that

tough abyss
#
for "_i" from 0 to 50 step 2 do { Some cool stuff };
#

I can think of quite a few uses such as accessing the 2nd element in an array of even number of array elements

#

every step

tulip cloud
#

is there documentation on step or is it new?

tough abyss
#

Old

#

very old

tulip cloud
#

lol

tough abyss
warm gorge
#

Some people even use it with step 0 to replace while loops

tulip cloud
#

used to all results coming up first for wiki on google.

tough abyss
#

Yeah but thats dirty

#

I don't like it.

warm gorge
#

Yeah I agree

tulip cloud
#

back to setVariable. Is this a third method to declare a variable?

#

(in missionNameSpace.)

still forum
#

Third? What is the second?

tough abyss
#

Another command not commonly used

#

Mostly by GUI people

#

Good if you need to dump everything in a new line using \n

tulip cloud
#

I use parseText quite a bit.

tough abyss
#

I use it to debug.

#

I like being able to format it then dump it to the rpt

tulip cloud
#

formats information nicely when you got a lot of variables you are monitoring

tame portal
#

parseText is the most used command used in conjunction with structured text

#

The more you know

tough abyss
#

Unused

#

But you don't want to use it:

#

XD

#

Spaghetti anyone?

cunning nebula
#

SQS yuck

tame portal
#

SQS is my city

warm gorge
#

@tulip cloud What do you mean is it a 3rd method

tame portal
#

It looks like some ancient 1990 language

tulip cloud
#

Dedmen its 1:36am here...lol ignore the comment ๐Ÿ˜›

still forum
#

"It's SQF compatible" "In SQS scripts only" ?

#

You will crash the game if you try to define a label in preprocessed SQF using #

tough abyss
#

Oh?

#

Anyone used this before?

still forum
#

yes.

#

it works as expected.

cunning nebula
#

yup

tulip cloud
#

I haven't, I'll try that out!

tough abyss
#
diag_log parseText format ['_x is _iedTypes %1 \n',_x];
diag_log parseText format ['_iedAmmo was in _x %1 \n',(_x in iedAmmo)];
#

Refuses to dump in a new line in the rpt...

#

?

#

Am I doing it wrong?

still forum
#

wtf @warm gorge ?

#

XML.

tulip cloud
#

lol that isn't how you use diag_log

warm gorge
#

He edited his post, said daig_log before

tough abyss
#

Which one dumps using new line?

still forum
#

why? @tulip cloud

#
diag_log parseText format ['_x is _iedTypes %1 <br />',_x];
tough abyss
#

Ah.

#

So we don't have a \n ?

#

option have to use <br />?

still forum
#

Wiki page says that it expects XML syntax

tulip cloud
#

I dunno,

I would just do

{
     diag_log format ["_x is _iedTypes %1",_x]
}foreach _iedTypes;

or whatever exactly he is trying to send to the log.

still forum
#

that is equally as correct as the parseText one

tough abyss
#

wth is with the rpt randomly stopping working...

#

keeps happening...

tulip cloud
#

never experienced that. What do you to cause that?

#

I notice that nothing is logged if arma isn't doing anything except waiting for something from server.

still forum
#

That would make sense.. How would it log anything if it doesn't do anything

tough abyss
#
systemChat format ["_trig %1",_trig];
#

Thats mostly all thats being dumped

#

It literally stops working

#

I tab out back to the main menu and it stays not working

still forum
#

Your Arma is freezing?

tough abyss
#

Nope

still forum
#

Understood it as windows tells you "Arma stopped working"

tough abyss
#

No no.

#

Arma 3's RPT file

#

stops logging randomly

tulip cloud
#

Dedmen the way GeekGuy884 wrote his diag_log was about 3x slower than how I had it written.

still forum
#

And? You weren't using XML linebreaks.

#

You were doing something different..

tough abyss
#

I've got a lot of data to manage

#

It's for my IED script that is smart enough to hide them in bushes

tulip cloud
#

If you truly think arma is stopping then create a simple while sleep 5 diag_log "Ping"; and you'll know if it is trully stopping

tough abyss
#

So I needed to see the positional data, due to it being 2D

#

I had to convert it to some bastarized 3D version

#

by dropping a 0 in to make it 3D

still forum
#

create map markers?

tough abyss
#

so createMine would work

#

Yeah it does that too

#

It's also to see if any triggers fail to be created.

still forum
#

There is also a script command to give you the height of terrain at a specific XY coord

tough abyss
#

Oh?

#

Well the hack using 0 seems to work alright.

#

Just the normal alignment isn't right.

cunning nebula
tough abyss
#

Won't rotate it on a Z and X Y to align it with the terrain will it?

tulip cloud
#

are you looking for slope? to set object on angle?

tough abyss
#

Yep.

#

Thats one minor issue currently.

cunning nebula
#

wish they would give it some new parameters

tough abyss
#

I use it.

#

Thats what I am using for generating my IEDs

#

I use it to hide them in bushes, trees, and grass

cunning nebula
#

๐Ÿ‘Œ

tough abyss
#

makes them very hard to make out.

tulip cloud
#

I don't have the perfect solution . but I would do something like place the IED then have it check the terrain z height to the 4 corners of the object and calculate the slope and then calculate the right xyz angle for the object. Would slow down the generation process a bit but would do the job dirty.

cunning nebula
#

hmm

#

and why not simply use surfaceNormal then ?

tough abyss
#

Wiki has the answer

#

_obj setVectorUp surfaceNormal position _obj;

cunning nebula
#

^

tulip cloud
#

nice

cunning nebula
#

hey does your script also generate boobytrapped corpses ?

tulip cloud
#

looks like would be 10x faster to do..lol

tough abyss
#

I can make it do that yes.

cunning nebula
#

do it ๐Ÿ˜ƒ

tame portal
#

Still my all-time favorite

cunning nebula
#

oh

#

never used that one

tame portal
#

That or getShotParents

tough abyss
#

Neat script command that one.

cunning nebula
#

sounds interesting

tame portal
#

LOL

#

Absolutely useless and undocumented :D

cunning nebula
#

dang ill have to bookmark that one

tough abyss
#

Lets see how useless it really is.

#

Oh wow.

#

It is kind of useless...

#

@tame portal

#

Actually it's not!

#

[["rain",0],["night",0],["wind",0.161588],...]

#

They're the same expressions SelectBestPlaces uses

#

Interesting.

#

Oh wow.

#

My IED script now works....

#

๐Ÿ˜ฎ

#

yep they definitely now work

cunning nebula
#
addMissionEventHandler ["EntityKilled", 
{
    params ["_killed", "_killer", "_instigator"];

    if ((side _killed isEqualTo west) && { (floor random 10) isEqualTo 0 }) then {
        _mine = "APERSMine_Range_Ammo" createVehicle position _killed;
        _mine attachTo ["_killed",[0,0,0],"Pelvis"];
        _killed setVariable ["mine",_mine,true];
        _killed addEventHandler["ContainerOpened", {
            params["_container","_user"];
            (_container getVariable "mine") setDamage 1;
        }];
    };
}];
#

no idea if that works, give it a try ^^

#

and it may need some adjustments

#

but it should add a 10% chance on any west soldier who dies to boobytrap his corpse with an attached apers mine

#

which (if i remember it correctly) should not trigger by walking over it when it is attached

#

so instead it gets triggered by looting him

delicate lotus
#

The data downloading stuff from endgame, is there a easy method to implement such stuff in your own mission is it hard?

cunning nebula
#

hmm I don't really remember it but there are several ways to do that

#

one of the easiest beeing a trigger with a timeout

delicate lotus
#

I mean with the gui stuff and such

cunning nebula
#

yeh well my memory sucks xD

#

but there are a shitload of ways how you could display download-progress

#

drawIcon3d for example

#

if you feel like making some icons for it

#

you could probably also look into the pbo and see how they did it or just come up with something else

#

but I don't think there is a specific function for it, or I haven't seen it yet

robust hollow
#

end game simple objective modules are a thing in eden, is that what ur after? (i havent played endgame or used the modules so idk)

delicate lotus
#

I dont think the endgame modules work in a non endgame enviroment

#

also im not really a fan of all those modules

astral tendon
#

guys, i need to make a trigger to detect if is a MP or SP game.

#

its a verry especific situation

copper raven
#
//condition
isMultiplayer;
//on activation
hint "multiplayer";
astral tendon
#

Nice! thanks

copper raven
#

np

astral tendon
#

is there a way to give the medic skills to a player if he have the medickit?

#

i want he to revive faster if he have the kit

copper raven
#

you would need a custom script i think

#

you mean in multiplayer?

astral tendon
#

yes

copper raven
#

there is revive system in 3den, check everything there, i think you have option to make it faster if they have kit

astral tendon
#

its says that if i put it to revive only if it have a medic kit

#

but i dont want to limitate that

#

i just what to make it verry slow

astral tendon
#

nice

#

now i need to make a script out of this

#

do you have some in hand?

cunning nebula
#

why not give the skill to all players

#

it is only useful when they have a medikit anyway

#

so it doesnt really require a script I'd say

astral tendon
#

because i want all players to revive, but if you have a medic kit i want you to do faster

#

normal player will take a minute, medics 3 seconds

#

i have this condition

#

'Medikit' in (items player + assignedItems player)

#

what is the reverse to this? if he does not have

still forum
#

medikit cannot be in assignedItems

#

the reverse of true is !true

#

!

astral tendon
#

it actually can

#

the trigger did worked

#

so how i reverse this?

#

'Medikit' in (items player + assignedItems player)

distant egret
#

!( 'Medikit' in (items player + assignedItems player))

astral tendon
#

nice, that did worked

#

now i made two triggers, one that give the medic Trait if he have the medikit and another that if he dont have he got the Trait removed

still forum
#

It can't. You cannot put Medikit into assignedItems

#

it works because they are in items player

astral tendon
#

i may run into problems with this?

still forum
#

well.. performance

#

though items player is the worse part here. It can contain thousands of items with a big and full backpack

astral tendon
#

if i am the host i will not feel it?

simple solstice
#

it's all about code optimization

astral tendon
#

i did not get any lag even by put and remove the item

simple solstice
#

you could throw any command that returns an array

#

and it would still work

#

but why would you want to do that

astral tendon
#

i want players to revie faster if they have a medickit

simple solstice
#

yeah so remove the + part

astral tendon
#

but i dont want to restrict anywone to revive

little eagle
#

the reverse of true is !true
Nu uh. You haven't disproven Dialetheism yet!

simple solstice
#

why have it in there lmao

astral tendon
#

just remove?

simple solstice
#

yes..

astral tendon
#

well, generic error

still forum
#

@astral tendon if it's in a trigger every player will have that code execute

astral tendon
#

well, thats how it is supouse to be right?

still forum
#

show the code you are getting "generic error" with

astral tendon
#

original : 'Medikit' in (items player + assignedItems player)

still forum
#

optimally you would only check once when the player applies a medikit. instead of checking everytime

astral tendon
#

new: 'Medikit' in (items player assignedItems player)

simple solstice
#

XD

still forum
#

Wow.. genius

simple solstice
#

this is beyond me

astral tendon
#

yeah so remove the + part

simple solstice
#

you just need to have items player

#

we said that assigneditems isn't needed because a medkit cannot be assigned

#

why do I even bother eh

astral tendon
#

yell, now it is working

#

'Medikit' in (items player)

#

if you guys says its better, who i am to say otherwise.

simple solstice
#

use logic. read wiki. read more.

astral tendon
#

but, good thing that my mission is done

#

afther a month

astral tendon
#

chosing a tag makes diference?

#

when sending to the workshop?

robust hollow
#

itl let people find ur content by the selected tags

inner swallow
#

so i'm assigning these three event handlers to a player consecutively

f_ehIndex_dynamicViewDistance_0 = player addEventHandler ['GetInMan', 'f_eh_setViewDistance_onGetIn.sqf'];
f_ehIndex_dynamicViewDistance_1 = player addEventHandler ['GetOutMan', 'f_eh_setViewDistance_onGetOut.sqf'];
f_ehIndex_dynamicViewDistance_2 = player addEventHandler ['SeatSwitchedMan', 'f_eh_setViewDistance_onSeatChange.sqf'];```
However, the handler ID for all of them is 0. is that supposed to happen? From what i understood from the wiki, each EH should get its own ID
#

they all do work, however

still forum
#

it is correct

#

each EH has it's own ID

#

The ID consists of type and the number

#

so you have GetInMan0 GetOutMan0 and SeatSwitchedMan0

tough abyss
#

EH's are ordered by when they were created

#

First one is always 0

#

then 1

#

then 2

#

and so on.

inner swallow
#

The ID consists of type and the number
Aha, interesting. When I querried f_ehIndex_dynamicViewDistance_0 etc they all returned 0, hence i got confused

#

thanks for clarifying that

still forum
#

You also have to provide the type of the EH when you remove it again. Arma has a seperate array for each type. Which is why you have multiple eventhandlers at index 0

inner swallow
#

i see. cool, then everything is fine ๐Ÿ˜„

#

thanks again

#

BTW, another "quick" question, would anyone know the locality of setSkill?

#

Wiki doesn't mention it

still forum
#

local

#

generally

tough abyss
#

Local to the server

#

Should be.

inner swallow
#

I see. I was told that it's global when run on server?

still forum
#

no.

#

well... Skill is really only important for the computer that controls the AI. Which means local

tough abyss
#

Global as in you can see them yes, but you use setSkill is ^

#

CreateUnit is global

#

So if you setSkill on a unit

still forum
#

getSkill probably still replicates and returns correct results

inner swallow
#

Okay. Yeah was wondering what happens when some AI are on headless client and some on dedicated server

still forum
#

if you are concerned about that

tough abyss
#

setGroupOwner.

still forum
#

Assume local unless proven otherwise.. and if proven.. add it to biki

tough abyss
#

Is an easy way to transfer AI

inner swallow
#

cool, will do

#

thank you

tough abyss
still forum
inner swallow
#

yeah, that makes sense. cheers!

tough abyss
#

_getHCID = owner "HC1"; eg

#

then use setGroupOwner

inner swallow
#

(and easier than what i was thinking of - setting skill from HC and reading it back via my client ๐Ÿ˜„ )

tough abyss
#

to transfer the group to the HC1

#

Easy way to get the diagnostic info

inner swallow
#

yeah could do that too

tough abyss
#

use diag_log format

#

and use logs of the HC

#

to determine the value.

still forum
#

Btw I prefer diag_log ["name of logged line", value]
far quicker to write

cloud thunder
#

getskill is not a command, however skill is a getter, but skillFinal will return closer to what actual skill is since it accounts for the coefficiant of difficulty settings. Don't know why people have been reporting skills broken since LoW, but from my tests its working as it should. Maybe the broken issue of skill setting might be by editor only wich I cannot comment on. Skill issued by scipt however are fine.

astral tendon
#

do you guys know a way to set the AI rate of fire?

still forum
#

Don't they fire as fast as the weapon can?

young current
#

Ai can have different firemodes in weapons that are hidden from player

tough abyss
#

^

young current
#

no idea how to use those

tough abyss
#

This is the closest you'll get.

#

unit forceWeaponFire [muzzle, firemode]

cunning nebula
#

if that is what ure after

still forum
#

apparently has no idea that getVariable exists.. And apparently knows that setVariable exists... but forgets that it exists a couple lines later

#

CBA waitAndExecute does the same kinda thing btw

waxen tide
#

I think i could design a device to torture dedmen with electric shocks and the first thing he would do is point out bad code in its control software.

cunning nebula
#

he's posted a couple of.. strange things before if I remember correctly

still forum
#

What if it turns out I like electric shocks? But your's are too weak because of bad code?

cunning nebula
#

gotta keep those batteries charged, right ?

waxen tide
#

you guys are silly. i suck at coding, i would never rely on it to torture people.

cedar kindle
#

1- you can write in a oriented object way
makes you think ๐Ÿค”

little eagle
#

It makes everything better automatically.

#

Dedmen, you should check out ca. 2015 CBA_A3.

still forum
#

you mean before you joined?

little eagle
#

Many sleepless nights went into it, yes.

frail zephyr
#

Why would you ever want to waste time trying to write SQF in an OO way? So much effort, so little gain.

tough abyss
#

We appreciate your sacrifice, @little eagle.

rancid ruin
#

dedmen you spelled genius wrong

still forum
#

If you want OOP.. Just do it.. Intercept.. Intercept-Python. I even think Intercept-Lua can OOP

#

Who is sweating so much?

#

Now you're trying to trick me

little eagle
#

Why would you ever want to waste time trying to write SQF in an OO way?
Because it's objectively better. Now clap.

still forum
#

๐Ÿ‘

rancid ruin
#

surely trying to write SQF OO style would involve spamming set/getVariable everywhere

#

that kinda starts to look crazy after a while

little eagle
#

#define

frail zephyr
#

I don't want OOP, it seems like a terrible thing to do in a scripting language.

#

Especially one where it wasn't ever intended to be slightly OO in the first place.

#

:slow_clap: @little eagle

slender halo
jaunty zephyr
#
if (isServer) then {
    _this setVariable ["arsenalInit", {

๐Ÿ‘

little eagle
#

Tabs ๐Ÿคข

jaunty zephyr
#

triggered? ^^

slender halo
#

arsenalInit is actually a method that create a crate and addAction (globally) on it

#

it doesn't actually open arsenal

tough abyss
#

@little eagle tabmasterrace

frail zephyr
#

Yeah, I'm not gonna put functions in a setVariable/getVariable construct. Waste of effort. Little gain.

#

The beauty of scripting languages is that you don't need to do all the BS setup that OO requires. If I want to do OO, I'll do it during my day job.

slender halo
#

what we basically do in arma is playing with objects

#

it makes sens to me to try to handle them as programming objects

frail zephyr
#

True; if it helps with the mental model, then its a positive.

slender halo
#

that was an experiment, i could even "bind" it to custom config to perform inheritance using config inheritance

jaunty zephyr
#

@slender halo ๐Ÿ‘ โ€ฆ you're treating sqf files as classes, which is fine, but it feels weird you're adding methods based on context (server/client) instead of using inheritance

tough abyss
#

sadly sqf does not really comes with native oop, so all the oop we can try, it will stay hacky as hell

slender halo
#

wried as fuck, i agree, but hey, it's sqf ^^

tough abyss
#

word ๐Ÿ˜„

jaunty zephyr
#

and it will look hacky as hellโ€ฆ which is my main gripe with SQF . Somewhere inside the ugly skin there's a beautiful small functional language that'sโ€ฆ well beyond repair. But still. ^^

slender halo
#

^^

jaunty zephyr
#

well, with EnScript we will get OOP , it seems. ยฏ_(ใƒ„)_/ยฏ

frail zephyr
#

Isn't EnScript a DayZ thing? Haven't heard that phrase in a longgg while

jaunty zephyr
#

yes. but it's arguably also the thing that's going to power Arma4

#

๐Ÿš‚ speculation

little eagle
#

You mean Arma 1

tough abyss
#

๐Ÿ˜„

#

i mean in the gameindustry after 3 comes 1 ๐Ÿ˜›

young current
#

Unarma

still forum
#

#InterceptAllTheThings

little eagle
#

Release it.

still forum
#

Intercept? We are already prepping for SW release

jaunty zephyr
#

"SW"?

still forum
#

Steam wurstshop

simple solstice
#

how is this going to work on workshop

austere granite
#

@still forum just convince stack/overffl0 to spend every second he has on the pythonintercept thing and then ill try using it ๐Ÿ˜„

still forum
#

@simple solstice Why wouldn't it? It's a normal addon with extension

#

Intercept-Python is currently waiting on one addition to core. The guy writing that is away till 4.10. I'm expecting it to pick up some pace after that's done

simple solstice
#

@still forum I guess.. but it just sounds weird to release such a thing on SW

still forum
#

We will need very quick updates in case something breaks. SW is just the best way to get the update out quickly to everyone

#

I hate SW.. But.. It's the best solution for this

austere granite
#

SW is absolutely amazing, never has issues and it's very easy to find things on it with it's amazing filters and tagging system

#

/s

simple solstice
#

I don't think people that would use Intercept would get it from Workshop rather than GitHub

still forum
#

That's a good argument

#

But that's only true for the beginning. For people that only use it in closed groups(that don't already use SW for mods) or only serverside

simple solstice
#

Well yeah, that's true.

austere granite
#

having it on workshop is convenient

#

and the visibility it offers might help to get it more known

simple solstice
#

I hope to see it picked up by someone.

#

Releasing a full game mode based on Intercept, or atleast in some way.

austere granite
#

we will try and use intercept-python, although i barely know it

still forum
#

You won't need to know the backend. I hope

austere granite
simple solstice
#

@still forum why am I thinking that Intercept is going to be used for a Life server as one of the first implementations

austere granite
#

sqf just passes unit positions and with the return it updates some markers

#

Life rework extra-new low FPS high lag + INTERCEPT v3.2a Cheesecake

still forum
#

Life servers don't have thaaat much serverside only code I'd say.
Though they will probably use it in connection with their Database quite soon

simple solstice
#

Networking stuff

still forum
#

hm... Intercept-Network would indeed be useful for LIfers...
But Intercept won't get a Battleye whitelist at first anyway.. So there won't be much clientside stuff in the beginning

#

I'm quite sure Lifer's won't be the first. There are already Servers using Intercept.

subtle ore
#

Can intercept be run server side whilst the client is left without a dependency?

still forum
#

yes.

little eagle
#

After that you can release TFAR 1.0

austere granite
#

๐Ÿ”ฅ

still forum
#

Intercept can run server only like any serversided script. You can compare to extDB

subtle ore
#

Sweet! Change of plans here then, that's good news.

rancid ruin
#

@Adanteh#0761 what's wrong with SW though?

#

i mean, can you think of a feasible way to improve it?

austere granite
#

Yes

#

Fix tagging system, allow fancier filters and better searching

#

make better overview pages

little eagle
#

Version control.

austere granite
#

Good one

rancid ruin
#

these are all wishlist features though. as it stands SW is miles ahead of any other solution

little eagle
#

No shitty long ass paths with hex folder names...

austere granite
#

allow controlling what mod you are actually updating

little eagle
#

The whole steam client not sucking ass.

austere granite
#

you can only ever do full workshop updates, instead of updating only a single one

still forum
#

Anyone remember six updater?
Imagine something like that. as tightly integrated as Steam workshop.

little eagle
#

SW is shit and will never improve, because there is no competition.

austere granite
#

Yea i sometimes still have nightmares about it

rancid ruin
#

i'd rather stick with 99.99% uptime and maxed out speeds rather than switch to something else

#

you can't really argue with steam's infrastructure for free

austere granite
#

yep that's good. but it's not perfect

rancid ruin
#

six was a pile of shit anyway, that's not a good role model for anything

austere granite
#

and there's serious room for improvement

tough girder
#

Steam branching mechanism is awful too

rancid ruin
#

if you're talking about bad clients then six wins every time, their UI design was totally fucked lol

little eagle
#

Agreed, but that doesn't make Steam any less shit.

rancid ruin
#

meh....valve moves slowly, but the products they have are at least solid. people use SW cos it's objectively the best solution

still forum
#

Agreed. Six UI design was ugly.. But.. Being able to setup repos. Selecting which version you want each Mod to be on. I hope I remember six updater correctly.
Btw specifically not talking about playWithSix.. that really was a pile of garbage

rancid ruin
#

uptime and reliability is above all else for this kind of thing imo, and valve have that nailed down

#

i'd pick this over the armaholic/six days 100% of the time

#

look at how armaholic's trying to make things work......badly

subtle ore
#

Is playWithSix still active? I thought they lost funding?

still forum
#

As I said.. Remember Six updater as tightly integrated as Steam workshop. As many distributed servers. Uptime.
In addition version control and better server tools.

#

I think they are somewhat there

rancid ruin
#

yeah six died

still forum
#

I have recently seen "Your Mod is no available for download with playWithSix" in BIF

tough girder
#

Speaking of Intercept, so how are you supposed to use it with BE? I assume that host dll is cleared, but how does it work with clients

rancid ruin
#

it was such a weird platform/company/whatever - just an updater for mods but they tried to have this super professional corporate front to it all ๐Ÿ˜„

tough girder
#

does BE not check them when you load them in?

still forum
#

Literally right after a post of a guy sayin "Please don't reupload my Mod anywhere"

#

It won't work.

#

you need whitelist.