#arma3_scripting

1 messages ยท Page 280 of 1

wispy patio
#

Regardless of position.

#

But in doesn't do it automatically

little eagle
#

That was not the point of it

#

ok

wispy patio
#

It needs me to rerun it each time.

little eagle
#

I'll fire up Arma I guess

wispy patio
#

Ah man, thanks for your help but it's 5:15 and I'm gonna hit the sack.

#

If you find out anything please let me know.

little eagle
#

Are you trying this with zeus or something?

#

CfgMarkerColors I think

#

Yeah, only CfgMarkerColors

leaden summit
#

if I use this addEventHandler ["Hit", {sniper = true}] in MP the value of "sniper" is local only to the player who hit the target correct?

tough abyss
#

Locality of global variable is local to the code that executed it.

#

Or environment e.g if a player ran that.

#

It's "GLOBAL" to that players machine

#

if you use _sniper = true;

#

it's local to both that script, and the client it runs on.

#

if the variable is public it is known to everyone including the server.

leaden summit
#

ok so what I'm trying to do is make it so if a player wants to take a sniper rifle, they have to "make the shot" first. Otherwise when they leave the triggered area the rifle is taken away.
So you're saying if one person makes the shot the variable sniper becomes true for everyone

tough abyss
#

If it's public yes.

#

if it's not.

#

It's local globally to that client

#

As in any code that runs on the client

#

Which is that "Individual" machine

#

It's global.

#

There is 3 localities in arma 3.

#

Local

#

Which is _local to a script

#

Global which is global to a client or whoever executed the code

#

and there is public

#

code or variables that are known to everyone.

#

Use the player namespace

peak plover
tough abyss
#
player addEventHandler ["Hit", {
   params ["_playerObj"]; 
   _playerObject setVariable ["hasSniper",true,false]; 
    }];
#

^ Should work

leaden summit
#

Ok so my trigger condition is
'player hasWeapon "rhs_weap_m40a5_d" && !(player in thislist) && !sniper;

#

so if the player leaves the trigger and hasn't made the shot the weapon is taken away

peak plover
#

Aah

#

Yeah, you want to use "fired" instead of "hit"

leaden summit
#

The trigger isn't set to server only so sniper should be true only on the players machine? Which would mean if someone else grabs the rifle and leaves the building they will lose it?

peak plover
#

All you want to happen is for the player to lose the sniper if he has taken the shot and left the building?

#

Or any players to lose the sniper, when leaving the building, if somone has taken the shot

leaden summit
#

If they haven't made the shot they lose it. Basically I'm trying to stop every man and his dog from grabbing the sniper rifle.

#

So we don't end up with a squad of snipers ๐Ÿ˜›

peak plover
#

Only the player who opens fire first with the sniper will be able to leave the building with the sniper? Everyone else who tries to leave with the building with a sniper will lose it?

leaden summit
#

No, anyone who makes the shot can take it

peak plover
#

Making the shot is what exactly?

#

Hitting a target?

leaden summit
#

Hitting the target 700m away. It's not a restriction as such because everyone can do it, it's just to make the players jump through some hoops if they want a sniper rifle

tough abyss
#

Who likes screwed groups missions?

#
Error in expression <_drawArr set [2, _obj call _posCode] };
drawIcon3D _drawArr;
} forEach drawPlaye>
#

Over and over in my console

#

Thanks shitty AU server

#

facepalm

#

People not checking someones dead before using certain commands

#

WARNING: Function 'name' - Transparent is dead

#

name(onDeadplayer) == WARNING: Function 'name' - Transparent is dead

tough abyss
#

who wants to help me dev a tonao life server?

tough abyss
#

No.

#

Takes altis life and sets it on ๐Ÿ”ฅ

peak plover
#

@tough abyss Why? Why do you wish to develop a tonao life server?

thin pine
#

@peak plover $$$

peak plover
#

That's a bad reason to do anything. How about "Who wants me to help dev bleach into arma, so I can just drink it whenever someone brings up life servers?" instead?

tough abyss
#

@peak plover people in my country want it badly, also i dont make money out of it, im just doing it for our arma 3 community

peak plover
#

Well, why are you making it then? People in your country want food and healthcare, does this mean you will have to provide them with it?

halcyon crypt
#

@peak plover are you the nigel from 2017mod?

peak plover
#

I enjoy playing arma, so I make missions for arma. Spend hours on scripts, because it's fun. Don't bother making a tonao life server if you wouldn't enjoy making it. There are plenty of life assets available for life servers and roleplaying on armaholic and the bohemia forums. No I'm not from any mod. I'm just a script junkie.

thin pine
#

@tough abyss what country is that btw?

tough abyss
#

@thin pine South Africa

thin pine
#

Well...debates about life servers tend to be expansive around here. So all I'll say is that developing a life server, assuming from scratch, is very time consuming, hosting one is expensive. On top of that, life servers have a very bad reputation among many 'arma veterans'. Finding a decent scripter around here who's just willing to set it all up for you is going to be very difficult

#

Just as friendly advies, I wouldn't get your hopes up

nocturne bluff
#

@tough abyss more that the command should just return name of the dead unit anyway.

jade abyss
#

@halcyon crypt the one you mean is called: @barren fable

halcyon crypt
#

ah yes ๐Ÿ˜ƒ

wispy patio
#

@little eagle No, I was just spawning the tank with me in it in the editor.

round trout
#

curiosity, is it better to use FSM for like AI Behavior during combat. So lets say event Hit or FiredNearby occurs

#

And I task the ai to call for support by nearby friendlies in radius of 800 in that event handler.

#

They get tasked to attack (CBA_FNC_TASK_ATTACK)

#

When there's no enemies left or enemy left the area they go back to their original patrol route.

#

Or what do yous say?

little eagle
#

I think they're compileFinal'd either way.

peak plover
#

Can I used exitWith in a PFH to skip this loop and get into the next one reel quick ?

little eagle
#

yes

little eagle
#

@wispy patio I can't get TurnIn or TurnOut to fire either. Looks like it's broken.

wispy patio
#

That makes me sad ๐Ÿ˜ฆ

little eagle
#

Same. Maybe try on dev branch?

wispy patio
#

I actually had to switch back from dev branch yesterday because when I loaded it with mods it crashed on startup. No idea what was causing that.

little eagle
#

marc_book confirms that the config version doesn't work either

#

1.66 both

#

Which is sad, because Eagle :/

wispy patio
#

Yeah the Eagle sounds pretty cool.

little eagle
#

I'll probably write a polling loop in the meantime until they fix it.

#

So you are saying that it's broken on dev too?

wispy patio
#

No, I'm saying I couldn't even get my dev branch to launch but that is probably an issue on my side.

little eagle
#

OK. ironie isn't online, but my best guess is that he's on dev and it's fixed / correctly implemented there

#

wiki says 1.66

#

And addEventHandler does report a correct incrementing index

#

otherwise it would report -1 if the event handler name wasn't recognized

#

We had that for ages with GetIn/OutMan too, so just returning a valid index doesn't mean it's implemented

cerulean whale
#

@thin pine Very true statement. I don't run a life server but I enjoy them and develop for them, primarily because that's what I enjoy in ArmA. But because I do actually care about my rep I try to make all my stuff from scratch. It's AMAZING how fast life developers accuse of script threft. I haven't even released all my content and it's apparently already stolen, even though I have spent over 100 hours putting it together

#

To be fair though, life communities are stupid. Noone can cooperate or be friendly with each other. Life Developers tend to never help others which is really a surprise I have found... People ask me for help and I'm not even that experienced, but noone else helps them, it's really a shame, especially when you compare it to the cooperation on this discord

little eagle
#

Great speech.

#

clap clap clap

dusk sage
#

๐Ÿ‘

little eagle
#

BoGuu is a nice guy.

peak plover
#

Life devs are just not friendly with each other because they are competing businesses. Money changes everything

nocturne basalt
#

Are anybody here interested in helping me out with a scripting problem? I'm having trouble with one of my init scripts. It's not working as expected when in multiplayer games. In single player it works just fine.

I will pay by the hour if someone would like to help me out over teamviewer

jade abyss
#

@cerulean whale
To be fair though, life communities are stupid. Noone can cooperate or be friendly with each other.
Everyone is special!!!!1111oneoneone

Life Developers tend to never help others which is really a surprise I have found...
Hi (btw.: I made my whole stuff public on Github - But yeah, about 90% are selfish bast***s)

People ask me for help and I'm not even that experienced, but noone else helps them, it's really a shame, especially when you compare it to the cooperation on this discord
Welcome to the World of LIFE

peak plover
#

No teamviewer. Put your init line on pastebin. I can look at it

nocturne basalt
#

the walking sequence is not really commented out, its just looks like it in pastebin

#

the walking animations dont work at all in multiplayer. I did try to see how gmwo does it in his wap mod

#

I tried to replicate his method

#

but then offcouse the legs wont move. dont understand why it works in his mod at all

indigo snow
#

you need to show "walking_sequence.inc.sqf" too

nocturne basalt
#

the start walking and stop walking scripts are just activation of animations

indigo snow
#

what youve posted so far doesnt actually do anything. whats in "start_walking" and "stop_walking"? If it works in SP, but not on hosted MP, its a locality issue.

nocturne basalt
#

yeah thats what I've been thinking

cerulean whale
#

@jade abyss Yup

nocturne basalt
#

the problem lies within these lines somehow

#

the comments is what I dont understand from the WAP mod

#

when your a client in a multiplayer game, he doesn't activate the animations from the client side

#

but I just dont get how he gets them to move at all

indigo snow
#

animations themselves are global so you dont need to do it on all clients

nocturne basalt
#

even if the variable activating them is private

#

?

#

and I dont want all the mech to move their legs when I move the ones on the one Im in

indigo snow
#

if i use the animate command to animate one object from one client, all clients would see that animation

#

the way it gets activated on the client itself doesnt matter to the other clients

nocturne basalt
#

so the command is sent to the server, and the server sends it out to all clients?

#

makes sense

#

but its not working ๐Ÿ˜ฎ

#

this code should work then, but the legs only move on the server machine

#

if(isMultiplayer)then {
if(isServer) then {
#include "walking_sequence.inc.sqf";
} else {
//something that is not walking animations
//activating sounds on different distances
};
} else {
#include "walking_sequence.inc.sqf";
};

indigo snow
#

we need to know whats in those files youre including man

#

that bit works fine

nocturne basalt
#

kk

peak plover
#

I don't get this script, select sqf next time you upload. There is not context to this. So it's hard to understand

nocturne basalt
#

init_walk.sqf

#

walking_sequence.inc.sqf

#

start_walking.inc.sqf

#

stop_walking.inc.sqf

#

die_anim.inc.sqf

#

playsound_walk.inc.sqf

#

oh god sorry... I still chose c++ highlighting

#

and now I've reached my limit T-T

indigo snow
#

its still readable

#

might be that #include fails on your server

#

did you allow .sqf as allowed file types?

cerulean whale
#

Hey, I'm using the inventoryOpened EVH and I've trying to get it to return the classname of the item when I double click on it. However lbData [IDC,INDEX] (taken from EVH _this) just returns "". How would I get it to return the classname?

little eagle
#

@wispy patio ironie says he's on 1.67 dev

nocturne basalt
#

yeah @indigo snow I am

#

allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; // only allow files with those extensions to be loaded via loadFile command (since Arma 3 v1.19.124216)

jade abyss
#

Instead of animate -> animateSource
And combine one Anim into 1 SourceAnim

indigo snow
#

might be better practice, but would that be a reason for it working in SP but not on MP?

jade abyss
#

Could be

#

No wait

#

animate should be broadcasted

#

Are you sure, the others load the same model/same File?

nocturne basalt
#

yeah its done the same way in the WAP mod. its works there

#

oh yeah. Im actually just running a local dedicated server that I joined myself

#

and Im using the exact same mod on both

jade abyss
#

hmm

#

Odd

nocturne basalt
#

but I first discovered the problem when a friend joined my game

#

I installed the local server for troubleshooting

jade abyss
#

Check the bottom

#
It is recommended that animateSource command is used instead of animate whenever is possible, as it is more efficient and optimised for MP```
nocturne basalt
#

oh, mkay. I'll try that. I'll switch them

indigo snow
#

better practice, yea, but it shouldnt stop it from working in MP vs SP surely?

jade abyss
#

Never seen it before :D
Anyway: AnimateSource gives you a way better option to play with Anims, since you can trigger 4-5-6-7-8-xxxx Animations at once, in one anim.

#

Just the startingtimes suspend

nocturne basalt
#

yeah but I like that the new multiplier option has come to the animate function

#

so that I can override animPeriod

jade abyss
#

erm... wasn't there something for Source also?

nocturne basalt
#

my animation Speed are based on vehicle speed

#

Iรฆll check

jade abyss
#

hmm, can't find it. Maybe i mixed those two

indigo snow
#

ah @nocturne basalt arma might interpret the file extension as .inc.sqf and not .sqf

#

maybe

nocturne basalt
#

oh

jade abyss
#

nah

nocturne basalt
#

that could be it

#

no?

jade abyss
#

I remember having a file named Name.BK.sqf, still worked as usual

indigo snow
#

Other than checking if this is actually even executing on the server with some kind of debug message, I cant see any obvious (locality) mistakes

nocturne basalt
#

here is something interesting. When I switched 'animate' with animateSource, I got the problem even in SP

indigo snow
#

did you change the animation names? animateSource uses a different input

#

you feed the name of a class in the animationSources, not in the animations class in the model.cfg

cerulean whale
#

Hey, I'm using the inventoryOpened EVH and I've trying to get it to return the classname of the item when I double click on it. However lbData [IDC,INDEX] (taken from EVH _this) just returns "". How would I get it to return the classname?

nocturne basalt
#

ah, I forgot the 3rd boolean parameter

#

No! I didnt. I still have the multiplier present

#

it should be a valid parameter

#

_destroid animateSource ["L_leg_1_Z_Rot",0,_sm];

#

_destroid animateSource ["Body_Y_upward",1,_sm];

cerulean whale
#

A little detail on it now, I tried a different system but want to see why this isn't working, when I do [_this select 0, _this select 1], it returns [No Control, 0]. Even though a control is defined

#

But then when I just put the ctrlName in _this select 0, it just returns an empty string when I go for lbData

little eagle
#

You cannot return the class name of the item in the inventory ui

#

You can only return the display name and the picture

#

I use this logic to store the name + picture combination of all items/weapons/magazines in config on a pseudo namespace to retrieve a classname

#

But it's obviously not perfect as two items with the same display name and picture are essentially indistinguishable. It was enough for what I was doing though.

cerulean whale
#

Well at the moment I have an issue with it even giving me the display

#

I add into the EVH ```SQF
test = findDisplay 602;

#

and return ```SQF
No Display

nocturne basalt
#

@indigo snow I have actually been using the class names from AnimationSources all along (even when using animate) but it worked

indigo snow
#

then i have no other clue than checking if the script is even running on your server via some debug messages

nocturne basalt
#

I'll do some digging. Thanks for your help so far

#

๐Ÿ˜ƒ

#

I'm actually using the same animation names. the ones in model.cfg = the one in AnimationSources

#

thats why Animate has worked so far

jade abyss
#

@little eagle

commy2 - Today at 8:41 PM
You cannot return the class name of the item in the inventory ui
You can only return the display name and the picture```
You mean inside the Inventory LB? Then: Your answer is wrong. It just works with Magazines.
little eagle
#

If so then I never noticed that. But I don't think that alone is enough for what they want.

little eagle
#

But yay. Now I can distinguish between Handgrenade and HandgrenadeStone

jade abyss
#

We had that a few days ago

little eagle
#

Yeah. Doesn't help when it's only mags

#

And does it work inside ammo boxes too?

jade abyss
#

Yep, its crap

#

Works inside everything

#

Just "only" with Magazines

little eagle
#

strange

#

too bad all this shit is hard coded and not sqf

jade abyss
#

Makes no sense, same as: You can not remove a single item from a Vehicle ๐Ÿ˜„

little eagle
#

yeah. imagine all these actions being sqf commands and the whole menu being sqf

#

but nope

#

all hidden in C++ land : /

jade abyss
#

whole menu being sqf? Why?

#

Sadly, yeah.

little eagle
#

To manipulate it and to have useful sqf functions

jade abyss
#

You can manipulate it

little eagle
#

yeah, not in a way I want

jade abyss
#

means?

little eagle
#

you can't even add items to the listbox

#

won't work

jade abyss
#

True

peak plover
#

So I got an array with 6 arrays in it. I want to change the third array's first value and missionnamespace setvariable it.

#

I can only thing of : get the full array, remove from main array, change it, and add to the main array agian

still forum
#

(_array select 2) set [0,newValue]

#

will change the value in place inside the array

#

will modify the original array

#

Like if your array is a MissionNamespace variable that will also be directly updated.
But you have to manually publicVariable if you want to do that

peak plover
#

main_array = [[group1,[true,false,false]1],[group2,[true,false,false],[group3,[true,false,false]];

#

main_array select 1 set [0,true];

#

Is that correct?

still forum
#

main_array select 1 -> [group2,[true,false,false]]
so no

peak plover
#

main_array select 1 select 1 set [0,true];

still forum
#

((main_array select 1) select 1)-> [true,false,false]

#

yes

#

use parenthesis to be on the safe side

peak plover
#

So this will automatically update the main array stored in the missionamespace?

still forum
#

yep

jade abyss
#

@peak plover
If you write a more complex Array, make it more readable for yourself.

main_array =
[
      [
            group1,  //main_array select 0 select 0
            [     //main_array select 0 select 1
                  true,     //main_array select 0 select 1 select 0
                  false,     //main_array select 0 select 1 select 1
                  false     //main_array select 0 select 1 select 2
            ]
      ],
      [group2,[true,false,false], //main_array select 1
      [group3,[true,false,false] //main_array select 2
];
little eagle
#

Or just don't create horrible arrays like this.

peak plover
#

I thought this might be a problem since I got the the array by using [main_array] call fn_bigscript. then _this

jade abyss
#

โ˜

peak plover
#

Can't think of a better alternative

still forum
#

_this would then be [main_array]
to get to main_array you would have to do _this select 0 again

peak plover
#

I used to have group setvariable instead of every array entry

little eagle
#

this is wrong

jade abyss
#

Why do you need the 2nd Array anyway? ( [true,false,false] )

little eagle
#

append returns nothing

#

aiMaster_groups append _gVars;

peak plover
#

It's basically aah

little eagle
#

is what you want

still forum
#

goes to bed and let's commy handle the rest

little eagle
#

let's start over at line 1

jade abyss
#

Lets start with: What are you trying to achieve.

peak plover
#

Ai script, it used to be I used group setVariable to attach all the knowlage the script will need for every group

#

I'm trying to change that, because I'm now using deleteunit rather than enablesimulationglobal to cache the units

#

So instead of setvariable I must now have an array with all the variables for each group that are all added into a single array that is used to store information. This would also allow for saving into profile namespace for persistance

jade abyss
#

profile Namespace +persistance = urgs

dusk sage
#

Urgs!

jade abyss
#

Urgs!

peak plover
#

Urgs? I don't know that word, yet

#

Urgent?

dusk sage
#

Urgs

jade abyss
#

Spell it out

#

Just simply spell it out

halcyon crypt
#

it means that they're disgusted with that method of persistence ๐Ÿ˜›

jade abyss
#

urgs = eww, no, don't do that, disgusting.

little eagle
#

I read those 4 lines, but still have no idea what you're trying to do

peak plover
#

Alternatives ?

jade abyss
#

Oh btw. Same here

peak plover
little eagle
#

T-That doesn't help

jade abyss
#

stop pasting images of scripts

peak plover
jade abyss
#

dang^^

#

FFS

#

STAHP

peak plover
#

I tried explaingin it

jade abyss
little eagle
#

github gists with syntax hghlighting!!

jade abyss
#
#include "includes\units.sqf"

wtf?

#

Never seen that before oO

ionic orchid
#

does that define_units ?

little eagle
#

Can we all agree that this is how you NOT do SQF?

ionic orchid
#

I've been doing...

#

_GAME_NPCS_DEF = [
#include "Data\GAME_NPC_DEF.data"
];

#

๐Ÿ˜„

jade abyss
#

erm, I do. commy

#

Anyway, what does that do and what is that Array needed for?!

#

Where do you wanna use that in those pictures?

#

PICTURES

#

P I C T U R E S

ionic orchid
#

it's telling me 1000 words

halcyon crypt
#

stop being patronizing and help the dude

dusk sage
#

Including .sqf can be useful

jade abyss
#

where?

#

As i said: I've never seen anyone using it. Just wondering/curious

little eagle
#

I'm trying to help, but I dunno where to start.

dusk sage
#

Depends how you like to do things. Lots of people use it to make something seem modular

peak plover
#

Is it that bad? :S

jade abyss
#

@dusk sage Thats what Functions are for

little eagle
#

It looks pretty bad tbqh.

jade abyss
#

2nd thing is: P I C T U R E S

dusk sage
#

Of course, but CfgFunctions won't include the file in another ๐Ÿ˜›

#

I've seen it used for map stuff from Xcam

jade abyss
#

No need to include files, when you can make a function for it ๐Ÿ˜„

peak plover
#

I use include to add the arrays of untis

jade abyss
#

But what would you implement? Still confused.

dusk sage
#

It stops you needing to use a function, it gets pre processed into the one

little eagle
#

Inline for SQF

dusk sage
#

Yeh

#

I don't do it, but I've seen it a lot

jade abyss
#

okayyyyyyyyy

ionic orchid
#

nigel: same - I'm processing my array data with an external tool 1 step before I build the pbo, so it just gets included when I build

little eagle
#

I've done it and I regret it.

#

SQF is not meant for inlining

#

I leave that to C++ compiler

#

lol

dusk sage
#

Some people include .cpp in C++

halcyon crypt
#

^ it's called unity build

#

fyi ๐Ÿ˜›

little eagle
#

Idk

#

Take the first line as example

#
if !(typeName _pos == "ARRAY") then {_pos = [_pos, _pos]};
#

What the is that?

peak plover
#

Ok

#

[spawn logic,patrol logic], //either a logic or an array of 2 logics

dusk sage
#

What the is that?

peak plover
#

Means that I can have either a single logic for the unit to spawn in and patrol in. Or I can have 2 logics so the unit spawns around first and moves to patrol around the 2nd

dusk sage
#

Triggered commy?

#

๐Ÿคฃ

little eagle
#

I don't get it. Why is it named _pos?

#

I don't want to shit on it, but it's pretty hard to understand when _pos is an array of two objects

#

Or at least sometimes it is

#

You'd think _pos is a position

#

like [x,y,z]

#

or at least [x,y]

peak plover
#

Or... _pos as in the logic used for position

little eagle
#

the logic used for position...

#

private _pos = getPos _logic;?

dusk sage
#

๐Ÿ™ˆ

little eagle
#

Consider me confused.

peak plover
#

_unitpos = getpos _pos call fnc_findLandPos;

#

More or less

little eagle
#

What is fnc_findLandPos

dusk sage
#

The plot thickens

little eagle
#

getPos _pos ๐Ÿค”

peak plover
halcyon crypt
#

assuming that's the code that @peak plover is working on

dusk sage
#

Hey atleast it's not as bad as some people. I've seen people take pictures of their code with their phone

halcyon crypt
#

no clue if xJenny99x is @peak plover though ^^

peak plover
#

Yeah, updated one 'tho

little eagle
#

I'm still not over getPos _pos

#

That should error

#

expected: object, encountered: array

#

or something like that

halcyon crypt
jade abyss
#

Solution:
Ctrl+A
Del
Restart from scratch.

peak plover
#

What's a better way of doing something with the same functionality?

eager minnow
#

@little eagle the getPos function will return the position of an object.

Long time since I worked with scripts in ArmA 3

jade abyss
#

writing it on your own.

little eagle
#

sudo rm -r ./

jade abyss
#

not sure if trollanswer or...

peak plover
#

It's a puzzle. Glad you sovled it

little eagle
#

@eager minnow But it errors when you use it on a position.

#

getPos _pos

#

That doesn't look right

jade abyss
#

getPos [1,2,3];

peak plover
#

But _pos is the logic used for positioning

jade abyss
#

like asking your Doc for a Doc. Doesn't make sense.

eager minnow
#

@little eagle the function expects for example a unit object or an item

little eagle
#

Logic as in module?

jade abyss
#

so _pos != a position??

#

Who the f wrote those VarNames?

eager minnow
little eagle
#

What is a logic?

#

I know how getPos works, Spartan

peak plover
#

Bear in mind the 2017.01.14 version of this script works, no script errors. All I am trying to do is change from _it setVariable ["aiMaster_patrol",[_pos select 1,_distP,_patrol,_out]] to an array. Because groups run into a limit of 144 and I want to delete the groups if the units are cached.

little eagle
#

But getPos on a positon doesn't work

peak plover
#

logic as in gamelogic

#

As in a object in-game

little eagle
#

So a module?

#

A unit?

peak plover
#

Anything can be used

little eagle
#

Why not name it _logic ?

peak plover
#

I'm bad with names...

little eagle
#

or _object ?

thin pine
#

the art of variable naming

#

difficult for some

eager minnow
#

Yes because it doesn't expect a position, it expects an object of which u want the position of. For example you want to know what the position of a unit is on the map then you'll get is with getPosition _myUnity

jade abyss
#

@eager minnow Pls perform a rightClick on my or commy2's name. Then go to "role". Rest assured: We mostly know what we are talking about ๐Ÿ˜›

thin pine
#

_obj = [0,0,0]; _pos = player; _pos setPos _obj; ๐Ÿ˜›

little eagle
#

I'm a 9/10 SQF guy according to a random Slovenian.

peak plover
#

I have trouble remembering them, and I never intended to share this script. I'll surely tidy it up. Do not worry. A rewrite is in progress currently hence my interest in the arrays

jade abyss
#

@little eagle 5/7

little eagle
#

Why 7 ?

jade abyss
#

google it^^

peak plover
#

I don't mind sharing. Just don't think anyone would want a script this specific.

eager minnow
#

@jade abyss yeah thanks didn't look at it just trying to help ๐Ÿ˜„ As I also said it has been some time since I did work with the ArmA 3 scripts (SQF). I am just firmiliar with programming languages in general.

thin pine
#

perfect score

jade abyss
#

Blue/Orange/Green = Those guys know their shit. @eager minnow (mostly)

thin pine
#

I'm white...feelsbadman

jade abyss
#

racist

#

๐Ÿ˜„

eager minnow
#

Alright ๐Ÿ˜ƒ

jade abyss
#

Yep Commy

thin pine
#

How to meme 101

jade abyss
#

There is more, where he fks him up ๐Ÿ˜„

little eagle
#

Not applicable to any other scenario, bro

jade abyss
#

5/7 = Best note ever. Like: "The Dark Night" XD

little eagle
#

Needs better variable names. And more functions and less includes.

thin pine
#

do you still need halp @peak plover?

little eagle
#

That would probably get rid of all problems

#
if ( isNil "_oldStance" || typeName _oldStance == "BOOL") then {
#

this line is broken

#

if _oldStance really is undefined

#

Then the second evaluation will error out

wispy patio
#

@little eagle Do you happen to know how I can select from an event handler array inside an the event handler?

#

I thought I could do it with _this.

#

Like so:

#

TurnOut = "if ((_this select 1) == commander (_this select 0)) then {(_this select 0) execvm '\uk_mbt\functions\Commander_Turnout.sqf'};";

#

The if doesn't work though because the script also runs when I turnout as driver.

little eagle
#

Are you on dev now?

wispy patio
#

Yeah.

little eagle
#

Cool, Seems to work there then I guess.

wispy patio
#

At least the script runs now. Still can't figure it out completely :p

little eagle
#

Here is what I'd do:
leave the config level ASAP

#

TurnOut = "_this call Rik_fnc_handleTurnOut";

#

And then use CfgFunctions to define Rik_fnc_handleTurnOut

#

or however you tag your functions

#

That is much easier to do than to edit shitty one liner strings where you have to escape each quote mark just to have mikeros tools replace all true with ones and all that junk.

#

As for _this select N

#

I'd use params to define all passed variables.

#

Wait

wispy patio
#

So in the eventhandler what is "_this" actually?

little eagle
#

The passed values

#

It's an array with info about what happened

#

vehicle: Object - The vehicle the event handler is assigned to
unit: Object - The unit performing the Turn Out action
turret: Array - Turret path

#

So

#

first line be:

#
params ["_vehicle", "_unit", "_turretPath"];
#

And then you can use these variables

#

kill it with fire

wispy patio
#

Hmm I see.

little eagle
#

params explodes the passed _this array into it's elements

#

That is a million times more readable than (_this select 1) == commander (_this select 0)

#

Because now you write:

#

_unit == commander _vehicle

#

Yeah. Good question. Does turnOut run on all machines or only on the drivers machine?

#

There is no doc about it. I guess it runs on all machines.

meager granite
#
private _maxRange = 10000;

...

while{ not(isNull ( (uiNamespace getVariable "rhs_spo15_ctrl") displayCtrl 8655)) }do{

private _targets = _v nearEntities [["AIR","TANK","CAR"],_maxRange];
_targets = _targets - [_v];

little eagle
#

TurnOut saving performance hardly matters though. You turn out like ten times in a two hour mission...

meager granite
#

RHS scripting ๐Ÿ™„ ๐Ÿ”ซ

little eagle
#

nearEntities [["AIR"

#

Is Air even a thing?

#

In Arma?

meager granite
#

As soon as you get into Mi-24 your FPS starts doing regular hiccups

#

on empty map

thin pine
#

yeah i used Air

meager granite
#

probably worse in real scenario

thin pine
#

wait did they really put the maxrange to 10km?

#

what

meager granite
#
if( (_d>5 AND _d < 20)  )then{_h pushback "12";};
if( (_d>20 AND _d < 40)  )then{_h pushback "3";};
...
#

and so on for 360 range

little eagle
#

could've used math

thin pine
#

does _h pushback "12" exist twice in that collection of if() checks?

meager granite
#

4 times

#
// function to calculate direction to target
_calcSide =  {
    params["_d"];
    private _o = [];

    if( (_d>355 OR _d < 25)      )then{_o pushback "rwr_lights_10RS";};
    if( (_d>15 AND _d < 45)      )then{_o pushback "rwr_lights_30RS";};
    if( (_d>35 AND _d < 85)      )then{_o pushback "rwr_lights_50RS";};
    if( (_d>65 AND _d < 105)      )then{_o pushback "rwr_lights_90RS";};
    if( (_d>95 AND _d < 195)      )then{_o pushback "rwr_lights_RS";};
    if( (_d>165 AND _d < 270)      )then{_o pushback "rwr_lights_LS";};
    if( (_d>260 AND _d < 295)      )then{_o pushback "rwr_lights_90LS";};
    if( (_d>290 AND _d < 315)      )then{_o pushback "rwr_lights_50LS";};
    if( (_d>310 AND _d < 345)      )then{_o pushback "rwr_lights_30LS";};
    if( (_d>335 OR _d < 5)      )then{_o pushback "rwr_lights_10LS";};

    _o
};
#

At least it doesn't tank FPS

little eagle
meager granite
#

Looks alright

#

to some extent

little eagle
#

It's old.

#

Or at least the original was. This one is like a year old and a copy paste from whatever the Leo has.

meager granite
#

{_threats = _threats - [_x];_threats append _x}forEach _threats;

dusk sage
#

threatception

jade abyss
#

wait what?

meager granite
#

I guess they don't know about reverse

peak plover
#

It's a nice touch 'tho. Having the helicopter tell you, that you are about to recive a missile is great.

jade abyss
#

lol

little eagle
#

Wouldn't it be pushBack if they want to reverse the array instead of append? ๐Ÿค”

meager granite
#

True

little eagle
#

Also, you're absolutely not supposed to modify the array size while iterating though it.

#

Undefined behaviour

jade abyss
#

Nah

meager granite
#

its different array on first command

#

because array - array

little eagle
#

true. Right. No problem then.

#

still tho

#

{_threats = _threats - [_x];_threats append _x}forEach _threats;

#

^nuke that

meager granite
#

actually it doesn't reverses it

#

basically threats is array of arrays

#

so it kinda unfolds it into single array

little eagle
#

Why the - [_x] part then

jade abyss
#

Reasons.

little eagle
#

just make a new one with a different variable name

#
private _newArray = [];
{
    _newArray append _x;
} forEach _threats;
_threats = _newArray;
#

there

#

A million times nicer

#

And prolly faster

meager granite
#

definitely faster

dusk sage
#

Maybe that had a reason for only wanting to use the one variable

jade abyss
#

But the other one looks more fancy

meager granite
#

Basically the whole script is a mess and destroys FPS too

jade abyss
#

Makes even less sense BoGuu ๐Ÿ˜„

dusk sage
#

๐Ÿ˜„

little eagle
#

Only use one variable to save performance : S

dusk sage
#

need that memory commy

#

no 64 bit yet

#

๐Ÿ™ƒ

jade abyss
#

oh myy

peak plover
#

Looking forward to >144 groups

little eagle
#

Great. More than 144 groups. Make Arma even slower than it already is. ๐Ÿ˜ 

meager granite
#

Doesn't Arma 3 has much higher limit already?

little eagle
#

On dev it has apparently

peak plover
#

The low frame rate is another layer of added artificial difficulty. It's a feature.

meager granite
#

Just 288, I thought they would virtually get rid of the limit

little eagle
#

64 bit won't increase the FPS. Believing that is insanity.

meager granite
#

No idea why there is limit in first place, doubt it has something to do with preallocation

#

probably fool proof limit

little eagle
#

144 seems like an odd number

#

I mean, it's an even number, but it's a odd choice.

peak plover
#

Well. 288 can be 576 if you use resistance as well

meager granite
#

They probably rolled handful of dice

little eagle
#

!roll D256

peak plover
#

Refresh rate 144, Group limit 144, coincidence?

little eagle
#

"refresh rate" ?

peak plover
#

It's what I call my arrays which don't seem to have any other more compelling or fitting names. /jk

meager granite
#

They foresaw 144hz monitors back in 98 so they can simulate group each frame for perfect performance /s

peak plover
#

๐Ÿ›ซ ๐Ÿฌ

little eagle
#

144Hz monitor and the game runs at 15 FPS. GG

meager granite
#

Actually I just figured how group limit is calculated

#

GroupSquad * GroupPlatoon * GroupCompany

#

number of config entries in each

#

basically it is limited by possible group name combinations

#

4 * 4 * 9

#

144

jade abyss
#

#Rigged

meager granite
#

Nevermind I think I'm wrong, GroupCompany has more than 9 entries

jade abyss
#

*czech

peak plover
#

Don't the russians have 3 squads in a platoon ? Atleast the motorized infantry should have 3, as far as I remeember about the 2002 setup

lavish ocean
#

the limit for groups exists because of performance reasons, groups surprisingly eat resources too

meager granite
#

There a way to animate locally?

cerulean whale
#

Anyone got an idea

#

?

meager granite
#

shadow = 0

cerulean whale
#

I did colorShadow as well, I set it to invisible

meager granite
#

maybe inside Attributes

#

can't recall

tough abyss
meager granite
#

I meant animate command, local version of it

leaden summit
#

Ok is there a specific hit even handler for the moving targets? I've got hits registering fine on the static targets but nothing from the moving ones?!?

nocturne basalt
#

@indigo snow @jade abyss I got the animation somewhat working when in multiplayer, but it seems like the server is having trouble sending out animation information to the clients. Here you see how its supposed to work(in editor), then how it works when joining a server

#

Anybody know what could cause this? Even the death animation isnt activatied at all, and It takes alot more bullets to kill the vehicle. Its like the server is having a hard time receivind data from the client and vice versa

#

and this is a local dedicated server. my ping is 5-6

indigo snow
#

it seems to hang in the extreme positions, maybe check the logic for animating? I think i remember it was based off of the animation phase.

nocturne basalt
#

yeah last night I changed them all to use animationSource

#

instead on animate

indigo snow
#

I meant the checks for animation phase, are there cases where if the state is on a boundary none of the conditions will return true?

nocturne basalt
#

hm no dont think so. Shouldnt they also have problems in SP then?

indigo snow
#

its just something I noticed in the video

nocturne basalt
#

ok

#

the conditions are quite simple actually

#

if (_destroid animationphase "m_L_groin_X_forward" == 0) then {

#

if (_destroid animationphase "m_L_groin_X_forward" == 1) then {

#

if (_destroid animationphase "m_L_groin_X_forward" <= 0.9999) then {

#

and you saw the legs suddently started moving after I exited the vehicle. They should only move when the speed is > 5

round trout
#

I wish I didnt need arma installed to do some programming and test if it works ugh

sterile ravine
#

is there any possiblity to refresh dialogs used in a mission without restarting arma?

halcyon crypt
#

requires arma3_diag.exe though

#

or just dev branch, not sure

#

another option is to build the dialog programmatically then you just have to restart the mission

#

I guess you could write an export script that turns it in a config based dialog for release

sterile ravine
#

thanks for the hints. it seems diag exe is needed as far as i read. i think currently it is faster to restart arma but this will be helpful for bigger projects.

jade abyss
#

@nocturne basalt Execute the Anims Local on the Owner, not from the Server. This should solve some of your Probs

round trout
#

Question if anyone knows, so I am using eventhandler with CBA to run a function when hit. Now if I add units in zeus or through a spawning script.. What is best way to add these eventhandler to those new units (I know in spawn script, I can just use the addeventhandler but I want a general check, than keep modifying scripts to fit).

#

@little eagle would know I guess, sorry for pinging you ^^

little eagle
#

Can you show what you're doing atm?

rancid ruin
#

anyone know how the box-drawing and selection part of 3den/zeus is done? script or hardcoded?

round trout
#

Hi Commy, I am just right now running a eventhandler for HIT on all AI units that have been spawned through mission editor. This is now done with ArmA 3 default one and not CBA.

#

WHat I want to do basically is to run this on every new AI unit created: _x ["hit", fn_findNearby] call CBA_fnc_addEventHandler;

#

I can do a CBA_fnc_addPerFrameHandler check but I think thats a bit overkill

#

_x ["hit", { _this call fn_findNearby}] call CBA_fnc_addEventHandler;

little eagle
#

["CAManBase", "hit", {systemChat str _this}, nil, nil, true] call CBA_fnc_addClassEventHandler;

round trout
#

I assumed that was the case and inside my function findNearby I just have to do a check if unit that was hit is a player, if it is then exit

#

else find nearby ai units and run taskAttack

#

on shooter last known pos

little eagle
#

Idk, CBA_fnc_addClassEventHandler is basically addEventHandler, but for classes instead of objects.

#

Sounds like that is what you need

round trout
#

Yeah, I looked at it

#

but was unsure if this was the case.

#

Perfecto, happy as it is

#

basically just implementing dynamic ai to react when friendlies are getting attacked

#

Can't use upsmon has it has moer than what I really need

safe forum
#

Will diag_mergeConfigFile appears on stable branch?

nocturne basalt
#

@jade abyss ok Ill try. Will people see others legs moving then? or just their own?

coarse dagger
#

hay i got a problen with somthink i dont no i have it righton in my SQF for a random load out that is set that works i buy some new stuff from a store i made in game sync data and i see it save's it on the databace but when i relog it duz not load the saved data can any 1 help thanks

little eagle
#

No @safe forum

jade abyss
#

@nocturne basalt animate/animateSource is Global, so everyone.

safe forum
#

@little eagle Thanks

nocturne basalt
#

@jade abyss som just like this? if (!isServer) animate ?

#

then what if my pc is the host? then everybody else will animate but me?

tough abyss
#

the script command itself has global effect, so a isServer check won't stop it from executing there

jade abyss
#

Again:

#

GLOBAL

#

Means: Syncronized over the Net

#

Short: Just execute the Animations on the CLIENT. No isServer checks or whatever (no clue why you even started with that oO)

#

+Also do yourself a favor and check the Biki, what effects the Commands have that you use (G = Global (everyone gets an Update) | L = Local (nobody, except where the command is executed gehts an update))

nocturne basalt
#

ok thanks I try

nocturne basalt
#

I have been using _local variables all the time btw

jade abyss
#

poasenbraew tb t

#

nah.. someones else. Not in the mood right now^^

#

@little eagle I don't want to^^

thin pine
cedar kindle
#

_myVar is a local variable inside a script
myVar is a global variable, which means it exists on missionNamespace and can be accessed from all other scripts (in the same namespace)
you also have locality, in short local. if you own an object, say the actual player object, that means that object is local to you. player is also different on every machine
if you're the driver of a car, that car is local to you

so then we have SQF commands, where some requires the argument to the command to be local. a good example would be setFuel command. if you're the driver of the car, the car is local to you. so that command will work fine. this is what AL (arguments local) means in the scripting wiki. next to AL there's EG (effects global) which means that if the argument to setFuel is local, the effect of that command (fuel) is global. hence it is broadcasted

#

hope that helps

jade abyss
#

myVar can also be a Variable, wich is NOT replicated/transmitted over the net (e.g. in the missionNameSpace).

rancid ruin
#

@thin pine I meant box drawing with the mouse for object selection, e.g RTS games/editors

little eagle
#

Global variable is a shitty name considering they are local to one machine usually by default.

#

I mean, I understand the concept is from other languages, but that doesn't mean it's not shit.

jade abyss
#

Yep

cerulean whale
#

Hey, is there a silent way (No Dialogs show ) to kick someone back to the lobby?

jade abyss
#

endMission should do that

queen cargo
#

anyone knows what PAA actually stands for?

tropic juniper
#

I don't think it specifically stands for anything

#

It's just a file format

rancid ruin
#

maybe the P stands for portable like it does in png

native hemlock
#

Could well be something in Czech though

rancid ruin
#

portable network graphics is a crazy name for a file extension when you think about it

#

surely portable and network make each other obsolete

native hemlock
#

I'm guessing the PA in PAC and PAA stand for the same thing

polar folio
#

second A is alpha i think

rancid ruin
#

probably picture, BI like that word

little eagle
#

Tweaked: Location GetVariable and Task GetVariable now support default value

#

YES

rancid ruin
#

this makes your life easier yeah?

little eagle
#

The CBA pseudo namespaces use locations

#

This is wonderful

native hemlock
#

commy happy? What is this

little eagle
#

It doesn't make my life easier, it makes my recreational more fun.

#

Good question. I never tried on map locations

#

Also, I'm usually a very happy guy tbqh. I just complain so much, because I really like like like the good parts about life.

meager granite
#

probably works for all, no reason not to

#

as locations are 100% local anyway

#

Yep you can delete map locations

#

labels still show

#

locations are 100% local, not synced in any way anywhere

woeful void
#

I have an interesting question. Is it possible, via scripting in the editor, to get a list of mods a player has installed, and output that to the side chat when they join a game for debugging purposes?

little eagle
#
private _mods = "true" configClasses (configFile >> "CfgMods") apply {configName _x};
native hemlock
#

Can you be sure every mod will have a CfgMods though?

little eagle
#

No.

#

And it will also list the DLC's and a mod_base class

jade abyss
#

why not CfgPatches?

little eagle
#

CfgPatches is a huge list

jade abyss
#

Or both

#

And?

#

Not my prob ๐Ÿ˜„

little eagle
#

CfgPatches is more like a PBO list and CfgMods is a mod list

jade abyss
#

insert my last 2 sentences

little eagle
#

You don't have to participate in the conversation if you don't care at all.

jade abyss
#

as boring as ever

native hemlock
#

Thoughts?

private _vanillaMods = ["curator", "dlcbundle", "expansion", "heli", "kart", "mark"];
private _modList = (configSourceModList (configFile >> "CfgPatches")) select {
    !(toLower _x in _vanillaMods)
};
little eagle
#

configSourceModList only reports stuff that has a CfgMods entry, no?

native hemlock
#

Oh, I'm not sure. It returns me

["@CUP_Terrains_Complete_RC","@CBA_A3"]

That's definitively not the entry in CfgMods for CUP Terrains, but it could be it requires a CfgMods entry and then returns the folder name

#

I'll remove the CfgMods and try again

little eagle
#

Maybe it's also using the mod.cpp

#

The thing is that these @ folders break if you put all PBOs in one folder as a mod pack.

#

also, btw

#
private _vanillaMods = ["curator", "dlcbundle", "expansion", "heli", "kart", "mark"];
private _modList = configSourceModList (configFile >> "CfgPatches") - _vanillaMods;
#

^ this should be faster

native hemlock
#

Yeah that's better. I was worried about case sensitivity for some reason, which makes me wonder if - ARRAY is case sensitive

little eagle
#

it is

#

But they're all lower case

native hemlock
#

I think the full proof method is CfgPatches, but that returns a lot more than you probably want

little eagle
#

It's annoying to work with, yeah

woeful void
#

assuming that this was on an init script on a playable soldier: this sidechat ("I am connecting with " + configSourceModList (configFile >> "CfgPatches")) (not completely accurate but I'm looking to get in the ballpark here.

little eagle
#

If you don't want to check every PBO, your method seems best.

#

No, whisker

#

That would report the local mods every time, not the mods of the connected client

#

cause configSourceModList is executed on the local machine

woeful void
#

ok, that little tidbit I didn't know.

little eagle
#

First of all don't use the init box for this, but initPlayerLocal.sqf

#

And then generate the addon list there

woeful void
#

I'm mainly asking out of curiousity, if it's possible to get a list a mods that a player connected with. From there a scripter can do with it as they wish, from just noting it in the log to a boot for not having the approved mods installed.

little eagle
#

and send that to the chat of every machine via remoteExec

#

I posted the solution

woeful void
#

so sideChat executed locally on the player's machine does not broadcast to everyone?

little eagle
#

No, but you can broadcast using remoteExec

woeful void
#

I'm at work right now so my ability to look up the functions is a little limited right now. working off of memory.

little eagle
#

"<chat message>" remoteExec ["systemChat"];

woeful void
#

Reminds me a little of windows RPC calls there...

little eagle
#

It sucks, but remoteExec is an easy quick work around for commands with local effects like chat commands

woeful void
#

ok, that really reminds me of RPC because it sucks too. ๐Ÿ˜ƒ noted.

#

hmmm... ( configSourceModList (configFile >> "CfgPatches") ) remoteExec ["processPlayerModList"] (and now to define processPlayerModList on the server....)

little eagle
#

try to use some variables instead of making it a shitty one liner no one can comprehend.

#

systemChat already is a command usable by remoteExec

woeful void
#

Sorry, it's a habit from my days of working with perl... some of those 'optimized' perl scripts can be truly nasty to work with.

little eagle
#

no need to define a function

#

There is no need to optimize a script this little that only happens once for every player at the mission start

woeful void
#

systemChat is good for debugging purposes, but ultimately I think the solution I would like to reach for, is where the server manages what mods are allowed and if one has a mod on that list that is not allowed (a hack mod for example)... they're given das boot.

royal abyss
#

is it possible and if so how would i start with making all Vehicles stop taking dmg after being fully red (not exploding) ๐Ÿ˜ƒ

woeful void
#

I rather not have that list of allowed mods be sent to the client to be processed though, as it opens that list up to being altered.

rancid ruin
woeful void
#

Makes sense of what I'm reaching for @little eagle ? Even if it's a little beyond my reach right now, I don't get better if I don't set some difficult goals now and then.

native hemlock
#

Why not turn signature check on?

royal abyss
#

thanks @rancid ruin

cerulean whale
#

@woeful void You could do that with ```
activatedAddons

little eagle
#

No

woeful void
#

It's possible, but I think the goal here is not to verify if a mod has been hacked, but flat out allow or deny only the mods that mission maker wants in.

little eagle
#

CfgPatches is more reliable. activatedAddons is a piece of shit and doesn't even list everything under certain circumstances.

woeful void
#

so even if it's legit.. if say a gaming group dislikes X mods from steam, don't allow a player to connect with it.

native hemlock
#

For some reason I thought activatedAddons only gave the "activated" or addons in use in that mission at that moment

cerulean whale
#

ye, and just chuck mod names in an array

rancid ruin
#

why kick someone for running a mod you don't like when you could just enable signature checking?

cerulean whale
#

It can be bypassed

woeful void
#

somegroups have funny ideas about what mods are 'realistic' and which ones aren't... and play accordingly.

#

I doubt any serious realistic gaming group would allow the stargate mod, for example. ๐Ÿ˜ƒ

rancid ruin
#

but nobody would load the stargate mod and try to connect to a milsim server

#

i don't understand the issue

woeful void
#

the issue is to restrict what mods can be used on a map as per the mission maker's requirements. This coul dbe for various reasons, from ensuring everyone has the right mods in the right order so there's no rude surprises, to keeping unknown mods from creeping in and hacking a server, bringing it down for everyone (which happened to me on a public server last night... I didn't like getting strapped to a jdam and dropped on the airfield where we were mustering.)

#

some of those requirements could be for set pieces too. A mission based around 2016 shouldn't have assets and equipment from 2035.

willow pike
#

there is a require addon

#

can not recall how it was called.

open vigil
#

So, are you saying "don't tell the client what mods the server needs, but rather let anyone join and only filter those with mods you choose?"

woeful void
#

Hackers have found a way around that. I don't know how.

willow pike
#

activateAddons

woeful void
#

I imagine, while a server says it needs x,y,z... it doesn't have the ability to tell that client, "-don't- use any other mods"... I can be wrong though.

woeful void
#

I'll have to give that a try @willow pike.

open vigil
#

I am asking because I've seen a bit of traffic where "unscrupulous monetising server operators" don't want to admit what mods they are running.

woeful void
#

Ah, I can see that concern.. no I'm addressing the opposite of that problem, where the client is the one running mods they shouldn't and want to hide.

willow pike
#

added some other info to the gist.

woeful void
#

I hope I'm making sense here @open vigil

still forum
#

Hackers can also very easilly find their way around something that relies on CfgPatches

woeful void
#

Sad but true.

still forum
#

Best way is bisigns... Which can be circumvented.. but thats the best you have

#

Just have no CfgPatches in their Mod... Or just name it the same as another Mod that is allowed

woeful void
#

I suppose the only real way to lock it down is to have a map specify the mods and the signatures of each mod.. and if their list and the client's list don't match, denied.

#

white list approach there... blacklist would be only of limited use since mods change so much and there's a lot of them out there already

#

anyhows, you all gave me some things to try and think about, so thank you very much. I'll have something to play with over the weekend now.

still forum
#

are you running battleye?
BE and SignatureCheck should be the best

woeful void
#

any third party cheat detection (and I mean third party as in a separate process from the game itself), can be and has been bypassed quite often. it's pretty clear with any FPS based game you see on the net now... rainbow six, counter strike, the works... there's a ton of videos on hackers in those games, and they're rarely caught before they had a chance to ruin a game.

#

I'm looking at more preventative measures, not reactive.

#

again, this all is really just a difficult challenge I set for myself so I can get better at scripting for arma 3. It does have potential benefits for others but the real purpose is to push what I know.

little eagle
#

You won't get them with PBO or mod checks.

still forum
#

That was true with old Battleye.. But it changed quite a lot last year.. And if you are handling such cheaters that can circumvent battleye you have no chance anyway

woeful void
#

I figured.. but since the goal is to learn the scripting a lot better, it's the best solution I could think of without going outside of scripting.

little eagle
#

Do something less futile if you want a scripting project.

woeful void
#

the point is I don't care if it's futile, as long as it teaches me what I'm looking to learn. Then it hasn't been...

#

You don't get better by always sticking to the tried and true. then you are only learning by rote, not by true understanding.

little eagle
#

You sound motivated.

woeful void
#

been hacking on computers since I was 16 and I'm 40 now... the only thing that's slowed me down has been age.

#

I doubt I'm going to lose that motivation any time soon.

#

working for naval intelligence, took me from a rank 0 in perl to a master in only a month. the easiest way for me to learn is to just throw me into the deep end and see if I sink or swim.

little eagle
#

With SQF you always drown in the end, lmao.

woeful void
#

but at least it'll be fun in the attempt. ๐Ÿ˜ƒ

#

Personally, one of my more fun goals is if someone joins a server with the name "M Jackson", they end up moonwalking everywhere. ๐Ÿ˜‰

#

no idea how I'm going to do that yet but still sounds fun.

#

Anyhows, thank you for the information ya'll.

tough abyss
woeful void
#

you know what I want to see.... ๐Ÿ˜ƒ

#

Zombies manning a tank...

#

the worst gunnery, the worst driving, evar.....

earnest coral
#

I have a problem with the Mirujana on my server you cant plant seeds for it anyone know how to fix it?

rancid ruin
#

mirujana

earnest coral
#

probably my there sucks for at english but you know what i mean weed canabis? you cant plant it

halcyon crypt
#

๐ŸŒฟs

rancid ruin
#

that's one of the greatest sentences i've ever seen

earnest coral
#

sorry im a bit tiered

rancid ruin
#

keep it up, you're doing good

earnest coral
#

Anyone there can help

halcyon crypt
#

you should probably try some A3Life support channels

young current
#

@rancid ruin no need to be like that. We have enough of that here already.

#

What @halcyon crypt said.

earnest coral
#

Where do i find that then?

young current
#

Dont think theres much active Life server people here.

halcyon crypt
#

ยฏ_(ใƒ„)_/ยฏ

earnest coral
#

Dammit

halcyon crypt
#

would be nice to know where to send people for Life related stuff though

rancid ruin
#

do you know what script it is cronnax?

young current
#

If its your server you must have got the life server stuff from somewhere?

rancid ruin
#

cos people might be able to help if you show them the script

#

but just saying you can't plant marinanja doesn't give people the full picture

young current
#

As said not many active.

earnest coral
#

I dont know what script i should find the variable in for it

young current
#

Where did you get the server files? theres no documentation with them?

rancid ruin
#

you need to either a) wait for the developer to fix it or b) learn some mission making and sqf

#

it's probably in a file called weed.sqf or something

earnest coral
#

I will see if i can fint the script

rancid ruin
#

have a look

cerulean whale
#

Hey, is there a scripting command to create an item at the position of the player (at their feet)?

rancid ruin
#

get position using modelToWorld then create a groundWeaponHolder i think

cerulean whale
#

I know that, I'm just thinking of what command would create an object on the ground?

rancid ruin
#

object: createvehicle or createsimpleobject

#

item you can pick up: groundweaponholder

#

groundWeaponHolder

#

there's groundWeaponHolderSimulated or something too but i was never sure what that does

dusk sage
#

@halcyon crypt
For vanilla life framework stuff
discord.gg/P7rKv

little eagle
#

I have a problem with the Mirujana on my server you cant plant seeds for it anyone know how to fix it?
probably my there sucks for at english but you know what i mean weed canabis? you cant plant it

dusk sage
#

yes commy

#

u know fix plz?

little eagle
#

Dunno how to respond.

#

I'm dying over here.

dusk sage
#

plz fix me Mirujana commy1 ๐Ÿ˜ฆ

little eagle
#

Breaaath

#

Ahahahaha

dusk sage
#

heres where you should @ all the staff

#

and ask them

young current
#

Guys. I like a laugh like anyone else, but dont you think your jokes are becoming a bit stale?

dusk sage
#

What jokes ๐Ÿ˜Ÿ ?

young current
#

all this mocking other people.

little eagle
#

It's not stale if they keep delivering ... Miruhanas

young current
#

I respect your mad scripting knowledge @little eagle but really that shit just ain't that funny.

dusk sage
#

Just smoke some mirujana and relax, it's all good

little eagle
#

Idk man. It kinda is.

jade abyss
#

It's late, aye?

young current
#

It is.

jade abyss
#

Okay.

#

Time to smoke some Miruhanas

little eagle
#

stopp

dusk sage
#

!!!!!

jade abyss
#

..., in the name of love

dusk sage
#

@young current I mean the day people stop stealing someone elses code and asking for help with it... ๐Ÿ™„

young current
#

Things could be still said and done in civilized way.

jade abyss
#

You guys need a blint

little eagle
#

And that's your job?

thin pine
#

@tough abyss why no script in english? ๐Ÿ˜›

tough abyss
#

@MrSanchez#5319 i will update it to english someday.

leaden summit
#

Ok I thought I had this but I don't
I have an array with 10 items, and I want to take 3 unique items from that array and put them into another array

What's the easiest way to do that??

jade abyss
#

Don't put them in that array and make them extra.

leaden summit
#

How do you mean?

jade abyss
#

Put those 3 Uniqe items in a special Array, not in the other

#

(since i have no clue whats inside that array, i have to guess)

leaden summit
#

Oh sorry I didn't explain properly, I need to select 3 random and unique items for the other array.

Basically I have 10 possible locations for spawning IED's and I want to spawn an IED in 3 of those locations randomly and repeatably (it's for squad training)
SO I have 1 array with the 10 locations and was going to put 3 of those locations into another array and them spawn the IED using select 0 select 1 etc and typing this out has made me realise how convoluted I'm making it haha

jade abyss
#

So, Array with Locations?

#

Do locations have names?

#

Can't remember tbh.

leaden summit
#

I've basically got 10 invisible "helpers" that I'm going to select

#

So I should be able to just select the helper out of the array and createvehicle position <helper>

#

I assume, I'm terrible at scripting

jade abyss
#

If so, then a simple

{
     if(_x in ["LocationName1","LocationName2"])then
     {
          _NewArrWithUniqueLocs pushback _x
     };
}forEach LocationArray```
#

something like that.

#

might be easier than using find etc

leaden summit
#

Yeah ok, thanks man I'll give it a try ๐Ÿ‘Œ

jade abyss
#

(As i said, i can't remember if they have names or not)

#

Before you use that, make a simple run:

{
     systemchat str _x;
}forEach LocationArray
#

Just to see, what _x will give you

leaden summit
#

ok sweet

cerulean whale
#

Hey, I am using a "Fired" eventHandler, the issue is that in the 7th Aspect of the array (where it tells you hit-target), it is returning ```SQF
<NULL-object>

#
[B Alpha 1-1:1 (Ben Harris),"Pickaxe","Pickaxe","Single","Pickaxe_Swing_Ammo","Pickaxe_Swing",<NULL-object>,B Alpha 1-1:1 (Ben Harris)]
meager granite
#

Maybe projectile gets deleted right away (or not even created?)

halcyon crypt
#

@dusk sage how about a non expiring invite that "we" can use to direct people there? ๐Ÿ˜„

hexed thunder
#

anyone used setvehiclecargo for anything yet?

#

once i define a vehicle should i be able to just use" _vehicle setVehicleCargo B_Quadbike_01_F;" to spawn a quadbike in there?

little eagle
#
Syntax:
vehicle setVehicleCargo cargo
Parameters:
vehicle: Object
cargo: Object
#

B_Quadbike_01_F is a classname, so it would be "B_Quadbike_01_F", but the command expects two OBJECT and not a STRING

hexed thunder
#

ok so how do you define it as an object then

little eagle
#

define it as an object

#

That is not how it works. You just spawn a quadbike, store that object reference in a variable and then use that for the command

#

createVehicle spawns a vehicle and reports the object reference

#

It's a two step process is what I'm saying

#
  1. create quadbike
  2. load quadbike into vehicle X
hexed thunder
#

ah ok

hexed thunder
#

ok that made much more sense and i now have it working thanks

little eagle
#

You're welcome. I always try to make sense of things.

little eagle
#

ikr ยฏ_(ใƒ„)_/ยฏ

willow pike
#

from a script?

halcyon crypt
#

that function doesn't seem to exist anymore

#

nvm

#

you'll have to tell us what's wrong though

willow pike
#

_pos = getpos player;
_class = "R_230mm_HE";

_dummy = "LaserTargetCBase" createVehicle _pos;
_dummy enableSimulation false; _dummy hideObject true;
_dummy setVariable ["type",_class];

[_dummy,nil,true] call BIS_fnc_moduleProjectile;

[_dummy] spawn {
sleep 10;

deleteVehicle (_this select 0);
};

#

that is how I called it.

halcyon crypt
#

yes

#

what's the error

#

what's it doing

#

etc

willow pike
#

nothing happens

halcyon crypt
#

you can't suspend in unscheduled and BIS_fnc_moduleProjectile relies on suspending

#

so use spawn instead of call

little eagle
#

If that is the problem, then it should complain about it in the RPT file. Script error.

halcyon crypt
#

it does, check the gist

willow pike
#

perfect.

#

thanks

#

works.

halcyon crypt
#

googling the error would've pointed you to the same answer though ๐Ÿ˜›

#

Suspending not allowed in this context

willow pike
#

was just looking for the end of the error and not in the middle.. ๐Ÿ˜ƒ Yea sometimes it can be as easy as that.

little eagle
#

Always fix these error from top to bottom.

#

Otherwise you end up trying to fix non errors that only exist because of the real problem.

willow pike
#

yea..

dusk sage
#

https://discordapp.com/invite/0jFDY3VsGIwgd7Ih @halcyon crypt , my bad

tough abyss
#

A way to delete a particlesource and its effects:{deleteVehicle _x;} forEach (_ps nearObjects 0);

#

Where _ps is the particle source created with createVehicle: "#particlesource" createVehicle getPosATL player;

peak plover
#

count loop is a little faster than forEach loop

jade abyss
#

Yep, but if you need _forEachIndex -> forEach =}

peak plover
#

I just started using param, and it's awesome, so much better than select and saves me a line or two when using the defualt value

jade abyss
#

Depends

#

Sometimes param is just "overkill"

peak plover
#

But param is faster

jade abyss
#

for example if you know whats in there, everytime etc.

#

param faster than select? Nah

#

Could let a diag run? oO

peak plover
#

yes

jade abyss
#
_a = [0,1];
_b = _a param[0];

and

_a = [0,1];
_b = _a select 0;
#

and

_a = [0,1];
_b = _a param[0, 0, [0]];
peak plover
#

Yeah, param is 0.053 ms faster getting 10 floats from an array

jade abyss
#

hmm... nah

peak plover
#

ohh yeah

#

I mean select

jade abyss
#

Okay, again: Whats faster by how many ms?

peak plover
#

Yeah, selectis 0.053 ms faster getting 10 floats from an array

jade abyss
#

Was about to say. Wouldn't make much sense, that a simple select would be slower then a param with a check etc ๐Ÿ˜„

#

Thats why i meant: param is overkill sometimes.

halcyon crypt
#

ty, @dusk sage now we can send those people away ๐Ÿ˜›

native hemlock
#

You also have to remember that params makes the variables private. So it's more reasonable to compare things like

params ["_a", "_b"];

and

private _a = _this select 0;
private _b = _this select 1;

The only time _this select beats out params is for one variable, otherwise it's slower

jade abyss
#

true dat

meager granite
#

When you have one variable just use _this instead

#

Never understand why people send single argument into function as array, for their own internal functions

rancid ruin
#

readability?

little eagle
#

params handles both. Array and single element.

#

param is nicer than select if you're not sure about out of bounds, -1 (after find) or for default values.

#

also
param [0]
should still be faster than
_this select 0

polar folio
#

about params. if there's only one argument and it's an array. it gets confused unless you put that argument in an array too. is that right? or did i miss a feature?

#

postion for example

little eagle
#

[_this] params ["_myArray"];
can get around that issue most of the time

polar folio
#

yea

#

i guess the extra checks would make it slower. was just wondering

little eagle
#

Imo, you should always pass positions like this:

#

[_pos] call _fnc_

polar folio
#

ye that's what i do

little eagle
#

For anything else that is not an array itself and if it's just one element, then I pass it without array. All my functions use params so I don't have to worry about bwc.

#

player call _fnc_

cerulean whale
#

Hey does anyone know the IDC for the inventory? I thought it was 602 but that doesn't seem to work

polar folio
#

hm. unless they cahnged it, it should be 602

cerulean whale
#
((findDisplay 602) displayCtrl 619) ctrlSetEventHandler ["LBDblClick", "_this call fnc_useItem; test = _this;"];
#

test is ```
[No Control, 1]

#

@tough abyss Please stop

#

@lavish ocean

polar folio
#

no, you test the code from that post first ;P

cerulean whale
#

as in, it doesn't find the control. and when I try to do SQF test = findDisplay 602; it returns ```SQF
No Display

#

therefore meaning it isn't finding it?

polar folio
#

while inventory is open?

cerulean whale
#

Yes

#

that is executed in an inventoryOpened eVH

#
fnc_inventoryOpened = {
    params["_unit", "_crate"];

    handle = false;

    test = findDisplay 602;
};
#

Just tested that

#

still got ```SQF
No Display

polar folio
#

isn't null for me. maybe it's how you debug it

cerulean whale
#

every script I do is appearing No Display

tough abyss
#

Anyone know the walk speed and run speed on the player?

#

๐Ÿ˜„

polar folio
#

i dunno what to say ben harris. i think it's your method. i can jsut tell you that i can debug it just fine.