#arma3_scripting

1 messages ยท Page 288 of 1

still forum
#

That code was only intended to stress the compiler.

rancid ruin
#

keep it scheduled, keep it safe frodo

little eagle
#

It's more potential for optimization.

#

Stuff can be even faster than we thought.

#

Good findings.

still forum
#

I guess my nickname will now officially be "the optimizer" or.. "the optimiz0r" or sumthin even cooler

little eagle
#

you obviously send the client id over net. everyone already has all the names on their machine, dummy

#

I fail to see what this has to do with the scheduler either. You guys are just acting up like monkeys that found a new toy.

#

Weirdos.

still forum
#

Every eventhandler might be affected. Tell me how you would replace a onHit eventhandler by something scheduled

little eagle
#

Yeah. Ask check damage x seconds. At least it's scheduled. -.-

blazing zodiac
#

Does anyone have a way to return the typeName of an object? Like the typeName bushes uses when using the nearestTerrainObjects or nearestObjects command "BUSH" or "TREE"

#

Yea I don't mean the classnames

still forum
#

I couldn't find any script command returning the mapType (Thats the name of that btw)

blazing zodiac
#

Like the names that are used in the nearestTerrainObjects and nearestObjects commands

#

The categories like "BUSH" or "TREE"

#

That work for sorting even though there is no class for the objects

#

There's some listed under that entry

still forum
#

There are all listed under that entry*

blazing zodiac
#

It's gotta be where they inherit from somewhere up the config Hierarchy?

#

It seems they aren't all listed there dedmen

#

Unless they are and this object is unsorted

#

I've tried each of those types for this object and it didn't come up yet it does come up with an empty array for types

still forum
#

They are all there all 40 of them. And it's nothing related to inheritence. It's a setting set in the Model of that object

#

Wait a sec I'll double check if thats really all of them. just for you ๐Ÿ˜‰

blazing zodiac
#

Maybe I missed one when I was going through

still forum
#

Yep. the last one is "TRAIL"

blazing zodiac
#

Anyway to get one of those with cursorObject?

#

Let me check with getModelInfo quick

still forum
#

I checked the Wiki and I couldn't find a script command returning the type

blazing zodiac
#

unfortunately getModelInfo doesn't seem to work for it

rancid ruin
#

i was trying to do the same thing the other day hound, don't think it's possible

#

and commy it has nothing to do with the scheduler, it was a lord of the rings joke

indigo snow
#

getText it from their entry in cfgMarkers

little eagle
#

Ingame config viewer

#

class CfgMarkers

meager granite
still forum
#

no

#

this is ObjectType @blazing zodiac was looking for mapType

meager granite
#

Ah, shape mapType

#

Actually would be good addition to getModelInfo command

rancid ruin
#

would be very useful

#

i couldn't find a better method than standing next to the object and hideObjectGlobal'ing each mapType one by one until it disappeared, then i knew the object was that map type

tough abyss
#

There is a way to know if a vehicle is armed using configs?

still forum
#

Sure. All weapons are defined inside the config class

austere granite
#

what's the easiest way to figure out what you're looking at eden? Basically want a cursorTarget/cursorObject that works in it, so i don't need to load in

#

Talking terrain objects btw, not eden placed entities

tough abyss
#

hey guys does anyone here know which script / mod this in from? Found it in my script.log for the server 13.02.2017 14:59:27: Kim Andre (IP address) GUID - #5 "lost_key','pooploop','rscrazzler','rsclistboxvg','vgdialog','sspcm','niggers_die']; _badclasseskick = ['a3_m3editor','extdb2',"

plush cargo
#

just googled "arma rscrazzler" and the only thing to come up is cheat and anti cheat sites

tough abyss
#

terribly sorry, disregard that #5 seems to be ultimate soldier 2 MP

#
5 PA_arsenal
5 vaa_arsenal
5 grace_sway
5 vaa_fnc_vaa_arsenal
5 ULTIMATE_SOLDIER2MP
5 SSPCM```
#

at least I'd say so

#

5th entry being Ultimate Soldier 2 MP

plush cargo
#

looks like a cheat dialog

rancid ruin
#

i know your intentions are good but you probably shouldn't ever link hacking sites here

plush cargo
#

ooo ur prolly right thanks

tough abyss
#

oh no worries on that @rancid ruin those scripts are long patched

still forum
rancid ruin
#

i don't think it's a question of if the thread you're linking has working hacks, more of a principle

still forum
#

quick edit the message and we all pretend we didn't see it 11

tough abyss
#

Iwas just looking what to put in the ban message now that those 20 entries are banned permanently^^

plush cargo
#

I respect that @still forum but wouldn't being aware of whats out there be better than not? How do you protect against hackers wo knowing what they are up to?

still forum
#

I don't know. I just cited a rule

plush cargo
#

understood ๐Ÿ˜ƒ

#

edited the post

rotund cypress
#

is there a command to set background colour of progressbar colour?

still forum
plush cargo
#

class RscProgress
{
type = 8;
style = 0;
colorFrame[] = {0,0,0,1};
colorBar[] = {1,1,1,1};
texture = "#(argb,8,8,3)color(1,1,1,1)";
x = 0;
y = 0;
w = 1;
h = 0.03;
};

#

think its texture

#

been a while since i messed with it

rotund cypress
#

ye so a command to set colour of colorBar

#

would be needed i guess

plush cargo
#

you can put a text rsc behind it and color that

rotund cypress
#

I want to colour the progressbar

#

not a background

still forum
#

is there a command to set background colour of progressbar colour? you are confusing

plush cargo
#

^

rotund cypress
#

alright

#

sorry

#

i mean the progress bar bar

still forum
rotund cypress
#

Yes

#

Didnt seem to work

plush cargo
#

says in the description it works on progress bars

rotund cypress
#

Aah alright

#

I'll try that then

still forum
#

so colorBar is the "color of the bar" and texture is the "texture of the bar" not very helpful. I don't know how to set texture on a ctrl

plush cargo
#

ctrlsetText will work for texture if applicable

tough abyss
#

Its so nice omg... I want that one

little eagle
#

and links

plush cargo
#

There is a ton of good camera tutorials out there. Took me a bit to get the hang of it but it's pretty cool stuff

#

When you get it going, keep in mind players will have to sit through it everytime unless you run some sort of check to see if it's their first time on the server

#

I made a short one for a life server a while back

#

_distance = 75;
_plr = vehicle player;
_dir = (getDir _plr) + 25;
_height = 37.5;
_camPos = [_plr, _distance, _dir] call BIS_fnc_relPos;
_camPos set [2, _height];
showCinemaBorder true;
_camera = "camera" camCreate _camPos;
_camera cameraEffect ["INTERNAL","BACK"];
_camera camPrepareFOV 0.700;
_camera camPrepareTarget _plr;
_camera camCommitPrepared 0;
while {_height > 2} do {
_distance = _distance -0.36;
_height = _height - 0.175;
_camPos = [_plr, _distance, _dir] call BIS_fnc_relPos;
_camPos set [2, _height];
_camera camPreparePos _camPos;
_camera camCommitPrepared 0.025;
waitUntil {camCommitted _camera};
_dir = _dir - 1;
};
_camera cameraEffect ["terminate","back"];
camDestroy _camera;

tough abyss
#

Soolie, do you have some Links? Because this is what i want, i would appriciate any cool good links because i want that so bad, also its perfects as an outro :p

rotund cypress
#

Is there a way to disableFire without deleting the projectile on fired?

plush cargo
#

that dude has some good ones

rotund cypress
#

Found a way to do it via keyhandler

plush cargo
#

@tough abyss tbh the tutorials are good but if you're anything like me you will learn the most from looking at other people's code. DL a bunch of cam scripts and check out how they do it. That combined with the tuts should be good

tough abyss
#

thank you

plush cargo
#

np ๐Ÿ˜ƒ

rancid ruin
#

there's never a need to use BIS_fnc_relPos these days @plush cargo, you can replace that with getDir

tough abyss
#

Hey Guys, why is my screen not going black? waitUntil {!isNull (findDisplay 46)}; 0 spawn { cutText ["", "BLACK FADED", 5]; titleText ["","Black IN",4]; any=[[["TEST","<t align = 'center' size = '0.7'>TEST</t><br/>"],["TEST","<t align = 'center' size = '1'>TEST</t><br/>"],["TEST TEST","<t align = 'center' size = '0.7'>%1</t><br/>"]]] spawn BIS_fnc_typeText; sleep 30; cutText ["", "BLACK IN", 5]; }; sleep 10; ["core\ls\videos\vid.ogv"] spawn BIS_fnc_playVideo; //Video abspielen

little eagle
#

check rpt for script errors

plush cargo
#

@rancid ruin was using relpos bc i needed not only the dir but the distance bc camera rotates around player and also moves toward them.

rancid ruin
#

getDir alternate syntax does exactly the same thing as BIS_fnc_relPos

#

no wait, getPos alternate syntax

#

origin getPos [distance, heading]

little eagle
#

There also is getRelPos SQF command which doesn't use north as 0 degree, but the view direction of the "origin" object.

rancid ruin
#

that's nice, bit more intuitive than modelToWorld

plush cargo
#

good info guys thanks

shadow sapphire
#

What is or where might I find the command to change the set the texture of headgear?

#

Anyone know?

indigo snow
#

with a mod

shadow sapphire
#

I thought that, too, but then I saw this:

class H_Beret_02: H_Beret_blk
    {
        author="$STR_A3_Bohemia_Interactive";
        _generalMacro="H_Beret_02";
        displayName="$STR_A3_H_Beret_020";
        picture="\A3\characters_f_EPB\BLUFOR\Data\UI\icon_H_beret02_ca.paa";
        model="\A3\Characters_F_EPB\BLUFOR\headgear_beret02";
        hiddenSelectionsTextures[]=
        {
            "\A3\Characters_F_EPB\BLUFOR\Data\headgear_beret02_co.paa"
        };
        class ItemInfo: ItemInfo
        {
            mass=6;
            allowedSlots[]={801,901,701,605};
            uniformModel="\A3\Characters_F_EPB\BLUFOR\headgear_beret02";
            modelSides[]={6};
        };
    };
#

It has hiddenSelectionTextures. Is there no way I can leverage that viat script?

indigo snow
#

yes, with a mod

shadow sapphire
#

Fuck. That's irritating.

indigo snow
#

there is no helmet object to pass to setObjectTexture

shadow sapphire
#

That's weak shit, there. It should be like setObjectTextureGlobal [3, etc.]

#

Dammit. Anyway, thanks!

indigo snow
#

hm, no, its not part of the uniform model so you cant retexture from the main unit object

shadow sapphire
#

Ugh! Always something.

scarlet spoke
plucky beacon
#

oooh

#

I use VS Code

tough abyss
#

Ehm, is it possible to make a script that changes the gui color of the client? I saw that one some servers, after i joined it was red.

#

Im sorry, im a hardcore noob, could you maybe write something like that for the community and post it here or is there a certain code on the internet?

#

๐Ÿ˜ฑ im sry

plush cargo
#

not sure if this is it

#

"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1

tough abyss
#

The thing is, i want a script that sets the profile of the player to as an example red.

#

Not the Dialog thing

plush cargo
#

what do you mean profile of the player

#

can you post a screen shot of what you want to change?

tough abyss
#

The Standard Orange Color

#

You can change that by a script. I know it, i had the script but i dont have it anymore

tough abyss
#

i think its something with GUI_BCG_RGB_R GUI_BCG_RGB_G GUI_BCG_RGB_B GUI_BCG_RGB_A

rancid ruin
#

you could maybe copy/paste your current profile variable file, then change the value using the in-game settings menu, save, then use your text editor to compare the c/p'd file to it

#

the variable/s that is different will be the one/s you're looking for

plush cargo
#

yeah those are what I posted

#

pick a color with rgb format profilenamespace setvariable ['GUI_BCG_RGB_R',1];

#

thats 100% of red

tough abyss
#

['GUI_BCG_RGB_R',1]; that is red?

plush cargo
#

rgb_r r is red

rancid ruin
#

four separate variables just for one colour ๐Ÿ˜ƒ

#

BI making sense yet again

plush cargo
#

so if you want only red then you need to set the rest to 0

tough abyss
#

yea yea

#

but now how can i make that as a script bruh xD

plush cargo
#

just call it on the player

#

in the init.sqf or initplayerlocal.sqf

#

profilenamespace setvariable ['GUI_BCG_RGB_R',1];
profilenamespace setvariable ['GUI_BCG_RGB_G',0];
profilenamespace setvariable ['GUI_BCG_RGB_B',0];

tough abyss
#

okay omg i give that a try

rancid ruin
#

it's those 4 variable names you listed, and they are part of your profile namespace

#

profile namespace persists between missions unlike missionNamespace

plush cargo
#

^

rancid ruin
#

imo fucking with people's profile namespace vars like that is kinda rude though

#

i wouldn't be happy if i joined a server and it changed all my preferences

tough abyss
#

๐Ÿ˜„ ๐Ÿ˜„

plush cargo
#

maybe you can restore to default on disconnect

tough abyss
#

My Server is a Mod-Server. We are something like a big Walking Dead Server. Big Community and that. Id like to have it red so its perfect

rancid ruin
#

yeah, restoring people's preferences back to what they set them as, on disconnect, would be thoughtful

tough abyss
#

@plush cargo good idea

rancid ruin
#

it would be a nice touch then, rather than a "what's this fkn mission dev done to my preferences"

tough abyss
#

yea it would just be a script that i need to open in the escInterupt and than make those settings back. But the question is how are the standard settings?

#

๐Ÿ˜‚ @rancid ruin

rancid ruin
#

do a profileNamespace getVariable on those 4 variables

#

same as how you set them to new values, you're just getting them instead

jade abyss
#

What if the game crashes? ๐Ÿ˜‰

rancid ruin
#

then people will be like "why the fuck did this mission dev fuck with my profile"

jade abyss
#

Yep.

#

And will never be seen again.

tough abyss
#

got it working omg

#

but i need to make the alpha channel a bit down because only red is fcked ๐Ÿ˜‚

plush cargo
#

does this affect all ingame uis or is this - BCG - code for just the loading screen?

#

@tough abyss ?

rancid ruin
#

it changes a lot of stuff i think, it's like your default "colour"

tough abyss
#

All Ingame GUI's

plush cargo
#

awesome, suprised more people dont edit this to match their own uis

tough abyss
#

I will add the Script for removing it after leave and post it here as pastebin.

#

But its on Life Framework 5.0

dusk sage
#

Why even bother changing shit

#

it's annoying as hell

#

Attempting to change them back when they disconnect isn't going to be perfect

#

What if they crash/dc or alt-f4

jade abyss
#

@BoGuu#1044 Don't try to argue with common sense, this was told before, he ignored and... yeah, Life^^ What do you expect ๐Ÿ˜„

tough abyss
#

@jade abyss i dont ignore, when they crash they can change the settings back in the Arma Settings. There is idk i heart it from god, its called set to default settings. The function is cool ๐Ÿ˜Ž

dusk sage
#

That isn't cool

#

You are changing something that somebody wanted set in a particular way

#

It's incredibly annoying

tough abyss
#

@dusk sage its just the color wtf ๐Ÿ˜‚

dusk sage
#

A colour that somebody has picked, because they like it

#

You walk over and change it for them

tough abyss
#

You dont need to join my server ๐Ÿ˜‹ , its just a cool thing to add

dusk sage
#

Just a scumbag thing to do

tough abyss
#

@dusk sage I could also make a script where you can have a dialog and change it on your own ๐Ÿ˜‡

dusk sage
#

there already is one

tough abyss
#

btw are there more codes for that? because my gui in main menu is now without any color lol ๐Ÿ˜‚

#

@dusk sage you are laughing about Life Framework. Why should you steal or just copy? Its easy to do that.

dusk sage
#

you are laughing about Life Framework. Why should you steal or just copy? Its easy to do that.
What are you on about? Steal what? I haven't laughed about anything

tough abyss
#

Oh im sry, it was Dscha

#

๐Ÿ˜ฑ sry

dusk sage
#

I'm just talking about how stupid the servers that change your gui colours are

rancid ruin
#

it does seem a bit rude

jade abyss
#

Wow, you are a pretty good example, why the Lifers have such a bad reputation.

#

(still searching, where i was laughing about the "Life-Framework"... hmm... can't find it...)

rancid ruin
#

you were actually crying?

jade abyss
#

On 2nd thought, meh, who cares. Blocklist, you have a new member =}

#

Seems to be ๐Ÿ˜„

little eagle
#

@tough abyss
No, saveprofilenamespace is essentially pointless. The profile will be saved anyway when you close the game. Including alt+f4 or even CTD. Maybe it doesn't save it when you pull the plug. Never tested that.

chilly wigeon
#

You should ๐Ÿ˜ƒ

little eagle
#

No. I still need this machine to read my Emails and I don't have a smart phone to compensate when this one dies.

shadow sapphire
#

I'm watching these Armachinima entrants and I need to know like... damn, how do they have such precision control over their AI? I think I need to just put together a list of all of the commands to control AI to do exact shit in a given scenario and go at it as a whole, rather than my method of piecing it together one command at a time.

rancid ruin
#

unitcapture + unitplay a lot i'd guess

plucky beacon
#

What do all the vets in this chat do when they're not here teaching us scripting noobs how to sqf

dusk sage
#

What every single other person does

#

๐Ÿ˜›

little eagle
#

clasified

dusk sage
#

When commy isn't typing in this chat, he continues his SQF studies, and waits for the prime moment to correct someone

#

๐Ÿ•ต

little eagle
#

Continuously correcting mistakes is the only way to perfection.

dusk sage
#

๐Ÿ˜‰

plucky beacon
#

The first step to improvement is acceptance of failure

little eagle
#

Accepting failure is damning yourself to mediocrity.

upbeat surge
#

I know nothing about coding , Can somone edit this so it can do slow motion while the bullet is travelling , its a working bulletcam script , and also Have a Delay at the end to see the Target Shot ?

Slow motion code : setAccTime 0.1

player addEventHandler ["Fired", {
_null = _this spawn {
_missile = _this select 6;
_cam = "camera" camCreate (position player);
_cam cameraEffect ["External", "Back"];
waitUntil {
if (isNull _missile) exitWith {true};
_cam camSetTarget _missile;
_cam camSetRelPos [0,-3,0];
_cam camCommit 0;
};
sleep 0.4;
_cam cameraEffect ["Terminate", "Back"];
camDestroy _cam;
};
}];

little eagle
#

I don't see the problem. Just insert your slowmo one liner at the start and the end. Where the camera is created and later deleted. How did you even get this far without any knowledge of scripts?

upbeat surge
#

I found the script while browsing for bullet Cam.

#

I just would like to see these things implemented , A.) Slow mo . B. ) Infinite Camera Time C. ) Delay at End ~ 3 seconds.

dusk sage
#

Make sure to leave credits!

upbeat surge
#

Ah for sure , will change

little eagle
#

What does "infinite camera time" mean?

upbeat surge
#

When I shoot bullet in Air like 4km from airfield, It Exits camera

#

around 3km

#

Because of Bullet expiery?

#
  • Also in the air it exits.
little eagle
#

Yeah, the bullets die after 6 seconds or so. To save performance.

#

No way to get rid of that.

upbeat surge
#

Bullets die , hmm interesting.

little eagle
#

They get deleted.

upbeat surge
#

Where can I put Slow mo and Delay at end to see the Dead Soldier I hit ~ ?

little eagle
#

Then you obviously can't follow them anymore.

upbeat surge
#

ok

little eagle
#

Probably after the camCreate and camDelete commands. I mean, SQF is pretty verbose and self explanatory.

upbeat surge
#

sooo like this

player addEventHandler ["Fired", {
_null = _this spawn {
_missile = _this select 6;
_cam = "camera" camCreate (position player);
_cam cameraEffect ["External", "Back"];
waitUntil {
if (isNull _missile) exitWith {true};
_cam camSetTarget _missile;
_cam camSetRelPos [0,-3,0];
_cam camCommit 0;
};
sleep 0.4;
_cam cameraEffect ["Terminate", "Back"];
camDestroy _cam;
};
setAccTime 0.1
}];

little eagle
#

Same for your 3 seconds. There already is a delay in the code. You just need to replace the numbers.

upbeat surge
#

at teh end

little eagle
#

wow

upbeat surge
#

what

#

this > < ? _cam camSetRelPos [0,-3,0]; > ?

#

-3 ?

little eagle
#

Pardon?

upbeat surge
#

Slow motion please.

#

setAccTime 0.1 not working at end of code.

little eagle
#

Are you in Multiplayer?

upbeat surge
#

Editor.

little eagle
#

Slowmo will never work in MP.

upbeat surge
#

Editor is SP

little eagle
#

Sure. Just so you don't get your hopes up.

upbeat surge
#

ok so

#

where do i put Time accel

#

Had to reload Editor , for the new code , But its working now

little eagle
#

I'd say you slow down the game when you enter the camera, and speed it back up when you leave the camera ...

upbeat surge
#

im having a hard time understanding what you mean

#

you dont really udnersatnd what i mean i guess

little eagle
#

I think I do, but I don't feel like doing all the work so you can copy paste it without any effort.

upbeat surge
#

lol so much work for a little tiny favour , thanks anyway

little eagle
#

Seriously. It's like adding two lines. Anyone can do that.

dusk sage
#

I read that earlier, thought nothing of it, but at second glance

#

๐Ÿ™ƒ

plush cargo
#

Going to be releasing a few versions of this on the forums later(diff camos/colors). Here's the first one.

dusk sage
#

Did it force a windows update ๐Ÿ˜„ ?

rotund cypress
#

Is there anyone who knows how I can check if cursorObject is a tree?

#

I did the following

#

if ( cursorObject in [ "b_ficusc1s_f.p3d", "t_ficusb2s_f.p3d", "t_pinuss2s_b_f.p3d", "t_pinuss1s_f.p3d" ] ) then {};

#

But didnt work

#

I assume it doesnt work since the tree itself returns 819438: t_pinuss2s_b_f.p3d

#

But could I use BIS_fnc_trimString on that or something?

#

Or maybe not since it will be a different value for all trees

dusk sage
#

@rotund cypress
You can do str cursorObject find "ficusc1s" > -1

#

Or you could trim the string and check if the model part is in your list

#

yep

rotund cypress
#

The above will only give me a bool

dusk sage
#

You want to check if it's a tree, you never said anything about which one

rotund cypress
#

Oh ahhaha

dusk sage
#

Never used it though

rotund cypress
#

nice exactly what i need

#

now i can select 0

#

and just use that

#

thanks

#

Since it returns array

#

Yaaay

dusk sage
#

๐Ÿ‘

jade abyss
#

Hint: t_ = tree ๐Ÿ˜ƒ

#

b_ = bush

dusk sage
#

Get out with your wizardry

jade abyss
#

Should work

#

*rewrote a bit @dusk sage

dusk sage
#

I wonder if you'll ever have a case that's t_...t_? @jade abyss

jade abyss
#

?

dusk sage
#

Because could just do a str _x find "t_" if not

jade abyss
#

was find expanded?

dusk sage
#

ah yeh can search strings now

jade abyss
#

Ah, i got you. Could lead to some strange circumstances, when you have a model with "t_" in it

#

(for example: Carxyz_t_b or whatever)

#

i remember there were some Vehs with it

dusk sage
#

yeh, that's my worry

jade abyss
#

Thats why -> Search for " : " with LIO, delete until that (+the spaces behind it) -> Select the first 2 letters -> compare

dusk sage
#

one up

#

str _x find ": t_" ๐Ÿ˜„ ?

jade abyss
#

๐Ÿ˜„

#

prolly, yeah. Should do it too. Test it out =}

#

Problem is: Some Custom Maps don't use the " t_ " Tag.

dusk sage
#

blah, they can ๐Ÿ’ฉ off

#

Guess it depends on his use case ๐Ÿ˜ƒ

rotund cypress
#

ah ye i see this

jade abyss
#

*updated with alternative Comparsion

dusk sage
#

there is one good thing about windows 10

#

When I create an infinite loop and can't exit ARMA at all, I can bring up the window screen and move it to another desktop

rotund cypress
#
14:54:28   Error position: <ATLtoASL player modelToWorld [ 0, 4, 0 ]>
14:54:28   Error atltoasl: Type Object, expected Array```
#

Got that error

#

apparently it expects an array

#

I guess its because its in a forEach

jade abyss
#

Where do you execute it?

rotund cypress
#

In a script

#

Spawned

jade abyss
#

No way, rly?

rotund cypress
#

I don't mean how you mean

#

With how I execute it

jade abyss
#

Okay, again:
Where is it beeing execute, under what circumstance, who is executing it?

rotund cypress
#

Well i am executing it by spawning it on my player

jade abyss
#

That thing above should be executed, when you stand somewhere, as a player.

rotund cypress
#

Yes

#

Exactly

jade abyss
#

worked for me, no clue what you did

tame portal
#

@rotund cypress use ( )

rotund cypress
#

Oh

tame portal
#

ATLtoASL player modelToWorld [ 0, 4, 0 ]

#

->

#

ATLtoASL (player modelToWorld [ 0, 4, 0 ])

jade abyss
#

oh boy

rotund cypress
#

Hahaha

jade abyss
#
(ATLtoASL (player modelToWorld[0, 4, 0]))```Just like it was in my example...
rotund cypress
#

Yes

#

But didnt know it had to be in parenthesis

jade abyss
#

There is a reason, why i did it that way, sooo... just don't change it ๐Ÿ˜‰

rotund cypress
#

Ye I see now

tame portal
#

i know that feeling

#

when you can see the mistake

#

although its plain obvious, well "arma obvious"

jade abyss
#

I mean, its just logic

tame portal
#

well in the end its just

#

what the engine thinks is more binding

#

ATLtoASL player

#

or player modelToWorld

#

but yeah from left to right its logical that it will not work

#

D:

jade abyss
#

(ATLtoASL (player modelToWorld[0, 4, 0]))

ATLtoASL -> Expects array, but next entry is an Object -> Error
means -> Calc the mtw Pos first -> ( ) it

#

Yep

rotund cypress
#

Is there a reason for these aswell? _objectName = toArray str ( _x ); _objectName deleteRange [ 0, ( ( _ObjName find 58 ) + 2 ) ]; _objectName = toString ( _ObjName );

#

THe parenthesis

jade abyss
#

Yes

rotund cypress
#

Hate parenthesis

jade abyss
#

What are you planing to do?!

rotund cypress
#

Tree cutdown script

jade abyss
#

No shit, rly?

#

i meant with the codeblock above, where you said "hate parathesis"

rotund cypress
#

no I just think it looks cluttery

jade abyss
#

Oh my

tame portal
#

NO
NO DSCHA

jade abyss
#

Yep

tame portal
#

NO

jade abyss
#

I send you strange pics again, if you try to argue with me again!

rotund cypress
#

oh god

jade abyss
#

(btw.: tbh.: Can't remember if the () at toString were needed or not anymore, wayyyy too long ago)

still forum
#

Never needed it. It's SQF. SQF doesn't have functions that take parameters in ()

jade abyss
#

โ˜ your answer @rotund cypress

rotund cypress
#

nice

dusk sage
#

Wasn't it only the other day people were questioning the amount of parenthesis simzor uses? ๐Ÿ˜„

#

Or maybe that was me, who knows

rotund cypress
#

I know I used a lot before

#

Then I came to the conclusion that it's stupid

#

But that was a couple of weeks ago

#

@dusk sage

dusk sage
#

It can sometimes get confusing

#

people often think
select 1 select 1 select 1 select 1 doesn't work

rotund cypress
#

ye

tough abyss
#

Guys, what is the Variable of the Ingame Background? The Menu is: 'GUI_BCG_RGB'

dusk sage
#

If you're still trying to change peoples colour settings

#

Find it yourself ๐Ÿ˜„

tough abyss
#

no

#

I dont know where i find them, in setVariable Wiki is no variables list

#

Or how can i see my profile (game) options? I cant find that in Documents and the files

#

๐Ÿ˜ซ i just want help no one knows?

dusk sage
#

Don't do it Dedmen

#

Think of the people

#

!

still forum
#

The LoadingScreen only uses GUI_BCG_RGB Don't even know what you mean by ingame background. My ingame background is the 3D landscape

jade abyss
#

He wants to change the UI Color of every Client, connecting on his Server, then saving it to the profile, fking up the Clients Settings.

still forum
#

If you want to fuck up the client's profilenamespace just fill it with gigabytes of junk.

dusk sage
#

SHHH

tough abyss
#

@jade abyss dude omg, can you just answer my question or get the fuck out ? So unproductive

dusk sage
#

๐Ÿ’ฃ

tough abyss
#

@still forum i dont want that. I just want to change the color Settings of the Menu in Arma to White, The Text to Black and the gui white

#

I got it working with the gui but i dont know the variables of the menu

still forum
#

what menu? escape menu?

tough abyss
#

@jade abyss i dont want to attack you but it gets on my nerfes

#

Arma Main Menu

#

In Browser on top the black thing

dusk sage
#

@jade abyss Just a prank bro

tough abyss
#

@still forum i sent a screen

jade abyss
#

@dusk sage ?

dusk sage
#

i dont want to attack you but it gets on my nerfes

#

๐Ÿ˜„

jade abyss
#

lulz, i am just told him what he was planning, lulz

tough abyss
#

Guys ? Discussion about anything related to Script creation and usage within game ... IF (script == true) THEN {chat here};

still forum
#

i sent a screen did you?

tough abyss
#

IF ( getsonmynerves == true ) THEN { stop }

#

@still forum uploading

still forum
#

nerves* btw

#

but sent means you already did it. I'm confused

tough abyss
#

sry, im german thank you โค

still forum
#

I'm too ^^

tough abyss
#

send* bro xD

dusk sage
#

Does that class under short temper ๐Ÿ˜ฎ

tough abyss
#

@still forum

still forum
#

But why do you want to change that? That's in no way related to the server the players are playing on. If you are doing a Mod change it in config. Else let the user change it via game settings

jade abyss
#

dude omg, can you just answer my question or get the fuck out ? <- lulzยฒ

tough abyss
#

Its related to it, its for my text system and other things, so you dont know the answer?

#

@jade abyss pls, its a discussion about script related stuff

still forum
#

Everything after you join the mission on a Server is serverrelated. The server selection screen definetly is not

tough abyss
#

But the Server Selection Color is also the color for inGame

still forum
#

why do you show me a screenshot of the server selection if that's not what you want to change?

#

And do you know that the game has to reload the UI after you change the profileNamespace variable for the background?
for the change to take effect

dusk sage
#

I thought you were changing their colours back when they left, now you want to change the server browser colours ๐Ÿ˜ฆ

#

Lies!

little eagle
#

re eventhandlers yesterday

jade abyss
#

I didn't even knew, that the 2nd one was even possible oO

little eagle
#

Why? What's so strange about it?

jade abyss
#

Nothing strange, its just... idk, i think i have never seen it anywhere (always with { Call Function/Code inside} )

#

Just re-check my old files: Yep, everything done with {call _fnc_bla}.

little eagle
#

Well, it doesn't work with local variables.

jade abyss
#

Was there any benefit of using it without {} ?

little eagle
#

One less call, one less scope.

jade abyss
#

hm, strange.

little eagle
#

No need to define another global variable.

#

But turns out, this one is faster regardless.

jade abyss
#

True true

little eagle
#

Which means I can squeeze out some more ms in some of my stuff.

jade abyss
#

The only example i found in the files so far oO Rest is with {}
a3\functions_f_mp_mark\Revive\fn_reviveIconControl.sqf

//main draw eventhandler
if (isNil "bis_revive_iconEH") then {bis_revive_iconEH = addMissionEventHandler ["Draw3D",bis_revive_draw];};```
little eagle
#

Which is a huge deal. draw3d is basically once every frame

jade abyss
#

Yeah

little eagle
#

Dunno how long bis_revive_draw is

jade abyss
#

puh

#

There it is:

P:\a3\functions_f_mp_mark\Revive\fn_reviveIconControl_functions.sqf

rancid ruin
#

boguu, you were teasing a life developer earlier, that won't please boguu from yesterday

dusk sage
#

When did I tease somebody?

little eagle
#

I think he mixed up some names.

rancid ruin
#

you were taking the piss out of that miller guy and his quest to fuck up people's profile vars

dusk sage
#

I wasn't taking the piss out of anyone, the guy wants to mess with profileNamespace colour vars, I said that's annoying as hell

little eagle
#

A normal person would've responded: "Oh, I guess changing profile settings isn't a good idea after all".

#

This guy though ...

dusk sage
#

Really scumbag thing to do, I have to fix them up every time I join the servers that change them

#

But I guess your skills at reading prevail again ๐Ÿ™ƒ

rancid ruin
#

just saying, you're poking fun at the exact type of person you went on an hour long argument to say we shouldn't poke fun at, only yesterday ๐Ÿ˜ƒ

#

i don't really mind, it's all funny to me

little eagle
#

But I guess your skills at reading prevail again ๐Ÿ™ƒ
Did I make a mistake?

jade abyss
#

I am confused now, who is firing shot at who now?

little eagle
#

I don't know anymore.

jade abyss
#

Or: Are there any shots fired at all?

dusk sage
#

I'm not poking fun at anybody, I'm just telling the guy it's annoying to change the colours, doesn't matter what server he owns, goes for everyone

little eagle
#

^ this sounds reasonable to me

jade abyss
#

Because:

#

It is.

little eagle
#

You have to point out the "obvious" these days.

jade abyss
#

When i said that, he told me to stfu ๐Ÿ˜„

#

When i explained that to others -> He hold me to stfu ๐Ÿ˜„

dusk sage
#

I made a comment in general after I saw yet more generally stupid comments about life. I pointed out that people continue to shame some of the decent people in the community, which is true. So I guess getting upset with colours is cannon fodder

little eagle
#

Don't care which sub community they are, but it's pretty amazing how many stupid, brazen and brazenly stupid people there are these days.

dusk sage
#

Brazen and brazenly stupid has a weird ring to it

jade abyss
#

have you ever looked at Nitrado or the official altis life Forums?

little eagle
#

"dumm, dreist und dummdreist"

jade abyss
#

๐Ÿ˜„

little eagle
#

It makes sense in German

dusk sage
#

I've never looked at nitrado

jade abyss
#

The worst thing i've read was a guy, who struggled with a hint message.

#

Wait, lemme search for it

dusk sage
#

I like the copying commits from GitHub and including the + and -

jade abyss
#

"I found the solution" or "I fixed it all by myself" XD

little eagle
#

That guy yesterday that wanted to add a slowdown to the bullet cam script he copy pasted yesterday and even copied setTimeAcc from somewhere else.

#

"Please put this together for me, I don't want to think. thx"

dusk sage
#

Edit it for me ๐Ÿ™ƒ

#

Did he update that post with credits?

jade abyss
#

hmm... can't find the Thread anymore -.-

Commy, you are kidding, right?

little eagle
#

Wait

dusk sage
#

All threads will be gone @jade abyss

little eagle
dusk sage
#

Some kids hacked the old Tonic owned ALRPG site, he then sold the domain

jade abyss
#

Hu? He shut that thing down ๐Ÿ˜„

dusk sage
#

No, hackers wiped it all

#

Leaked all the database somewhere on the webs

jade abyss
#

alrpg? nah, that was Exile.

dusk sage
#

Believe me ๐Ÿ˜›

#

IIRC it was the same people, can't remember though

jade abyss
#

anyway: lulz @little eagle

#

I was talking with somone a few days earlier, before that happend, he mentioned that it will be shut down in a few days.

cedar kindle
#

shut what down

dusk sage
#

I'm confused

lavish ocean
#

@little eagle @still forum thanks, we will take look into that's EH recompiling 16x something something , you know what i mean ๐Ÿ˜‰

plucky beacon
#

Huh? Arma life shutting down?

#

oh dear

#

them hackers

dusk sage
#

?

lavish ocean
plucky beacon
#

k

#

If I'm using a trigger for conditions that don't require any of the trigger specific functions or variables, is it more reliable to just use a [] spawn ={waituntil{};}?
for context it's a countdown timer and the condition is elapsedTime > timerlength

polar folio
#

i think it depends on the rest of all code running at the same time. i think one of the main issues with spawn is that once the script engine gets overloaded there is no guarantee when the code will be executed anymore.

my guess is that triggers are fully engine side and thus more reliable.

plucky beacon
#

I ask because sometimes the mission ends when the condition is met but other times does not. Trying to figure out if it's a ttrigger or script problem.

cedar kindle
#

code can only be correct or not

#

it's not random

#

but time can be different on machines

plucky beacon
#

time is calculated on the server, then sent to clients via public variable

#

so time should be same for everyone

cedar kindle
#

yep.

plucky beacon
#

so it's not the time that's the problem, originally I was thinking having the trigger on Server Only would work better so that the mission end script is only executed once. Because aren't triggers global?

jade abyss
#

@plucky beacon
DriftingNitro - Today at 7:44 PM time is calculated on the server, then sent to clients via public variable
nope, serverTime is synced.

#

for local timings, like countdown only on one Client -> diag_TickTime might be the best choice

rancid ruin
#

how does date work? that's not synced either is it?

jade abyss
#

I have no fkn clue.

rancid ruin
#

wiki says it isn't

#

should be a flag in description.ext at least imo...like syncing the date across clients isn't a strange request imo

jade abyss
plucky beacon
#

That'll be the day when we have week long missions and need to sync dates, lol

jade abyss
#

erm.. timeMultiplier? ๐Ÿ˜‰

plucky beacon
#

thought you were talking like system date

rancid ruin
#

nah, in game date

jade abyss
#

lol ๐Ÿ˜„ no

plucky beacon
#

haha

jade abyss
#

That made me smile, gj on that ๐Ÿ˜„

plucky beacon
#

time multiplier x120

#

gg

rancid ruin
#

like, one client can be at daylight in january, another at night time in october, seems so stupid

jade abyss
#

Are you sure? hmm... (date not synced)

#

Maybe just adding a simple setDate every... idk... hour ๐Ÿ˜„

rancid ruin
#

it was that way in arma 2, pretty sure it hasn't changed

plucky beacon
#
END_TIME = 300;

if (isServer) then {
[] spawn 
    {
        ELAPSED_TIME  = 0;
        START_TIME = diag_tickTime;
        while {ELAPSED_TIME < END_TIME} do 
        {
            ELAPSED_TIME = diag_tickTime - START_TIME;
            publicVariable "ELAPSED_TIME";
            uiSleep 0.98;
        };
    };
};

so basically this is what I was running, and on the client side it's updating Elapsed_time every second.

jade abyss
#

END_TIME not defined

plucky beacon
#

it is above

jade abyss
#

invisiblblblblble

#

now visiblblblblble

plucky beacon
#

blblblblbllbl

#

bubble

jade abyss
#

but... why?

plucky beacon
#

only veterans can do reactions huh?

#

why the timer?

jade abyss
#

Yeah

#

Yep

plucky beacon
#

time sensetive mission

#

dramatic countdown

jade abyss
#

serverTime

#

as i mentioned above

#

its synced

plucky beacon
#

instead of tick_time?

jade abyss
#

read above

#

11-12min ago

#

You simply just send the startTime to the Clients -> Count down from that Number (using serverTime)

plucky beacon
#

is that because time-from-start is diffrent when people JIP?

jade abyss
#

wut?

plucky beacon
#

diag_ticktime is real time spent from start of game

jade abyss
#

Yes.

plucky beacon
#

so that's diffrent depending on when they joined the server

jade abyss
#

ignore that one for now. Just concentrate on ServerTime.

#

Yep, correct.

plucky beacon
#

I just wanted to make sure I understood what diag_tickTime was doing

#

okay

jade abyss
#

rgr

#

So basicly... erm.. just:

Client:

Tag_MyStartTime = 0;
waitUntil{uisleep 1; Tag_MyStartTime > 0};
while{true}do
{
    uisleep 1;
    hint str (serverTime - Tag_MyStartTime);
};

Server:

_startTime = serverTime;
missionNameSpace ["Tag_MyStartTime", _startTime, true];
#

should be correct/usable. (Untested in A3)

plucky beacon
#

Thanks, I'll have to test it later because I ahve to finish this homework before I start doing Arma stuff again :P

jade abyss
#

yepyep

rancid ruin
#

oh, nice

#

it always seemed such a broken system

#

i remember some arma 2 server where different clients would be in total darkness or daylight lol

#

are there still issues with weather sync? i also remember some people with clouds/fog, and others with bright sunshine

#

that's why so many people just set the fog to 0 repeatedly in a loop right?

#

that doesn't sound like arma

#

no wait, that does sound like arma

#

i've never understood what wind actually does in arma, other than move trees. does it affect projectiles or anything?

#

there's a fantastic video of the results of a hacker in dayz standalone somewhere, with the trees going 90 degrees in either direction

#

it might've been removed cos i couldn't find it last time i looked ๐Ÿ˜ฆ

polar folio
#

@tough abyss is forceWeatherChange the engine version of that skiptime setovercast hack solution?

#

i hear ya. i guess a zeus-ish "10 hours later" loading screen could work. but only with controlled pace of combat. could be disastrous otherwise n certain situations ๐Ÿ˜„

#

"the root of the problem is first param of setOvercast simply does not work ..."

yea probably because of lazy 3rd party cloud tech implementation

#

dang

#

what i do now is not fuck with weather at all and just set forecast stuff totally different from start conditions in the editor. aka using engine implementation for random weather. seems to work fine but never ran it for hours and checked in a detailed manner, if stuff is synced

#

man i wish setfog would accept an rgb input. shit looks still way too blue sometimes

thin pine
#

postprocessing effects hehe

polar folio
#

actually. i just realised why i think by fucking up my settings. it's jsut using the sky box for color i think

plucky beacon
#

isn't Ace weather supposed to sync all the fog and stuff?

polar folio
#

already thinking about what to use this for lol. can't think of anything though

plush cargo
#

@polar folio interrogation tactics

plucky beacon
#

answer me or it's back to the 4th dimension with you

plush cargo
#

ahh thats fog :/ thought as snow

polar folio
#

yea definately good for trippy stuff. "the ground is gone :O"

plucky beacon
#

Reminds me of the color correction ppEffect

#

make everything red and blue and shit

#

My next challenge will be getting a GUI text field to set an integer value globally.

jade abyss
plucky beacon
#

lol thanks

#

I'll save this

#

Is it always better to use the namespace instead of publicVariable?

jade abyss
#

I barely used PV. But can't rly tell anymore. @little eagle ?

plucky beacon
#

So missionNamespace doesn't update for players who join the game halfway in

jade abyss
#

It does (its setVariable you are speaking off)

plucky beacon
#

oh hang on

#

ya I see now

jade abyss
#

_myTruck setVariable ["myPublicVariable", 123, true];
JIP/Global
_myTruck setVariable ["myPublicVariable", 123, false];
Lokal (where executed)

plucky beacon
#

just went to the setVariable page

jade abyss
#

Ah:
Whats possible was:

_Number = 2;
missionNameSpace setVariable ['VarName', _Number, true];
#

(wich makes no big diff at all ^^ Ignore what i said ๐Ÿ˜„ I have no idea anymore, why i used MNS the whole time. Prolly because of the possibility to format["VarName_%1",2] the VarName

plucky beacon
#

Formatting could be useful

celest crown
#

hi, help me please make autobans. my sclient-side [getPlayerUID player)] remoteExec ["TON_fnc_autoban",2]; and server side _uid = _this select 0;

"228229230" serverCommand format ['#kick %1',_uid]; I only work kick player and exec ban It does not work. Why can not I use a ban? and whether it is possible to make the ban on time, which would contribute to ban.txt, ie BE comands

#

Sorry for my English((

woeful void
#

q: How would I go about creating a sector dynamically on every known city on the map? (yes, I know on altis this is cpu suicide but I'm looking for a working example). I've narrowed it down to this: { } forEach nearestLocations [getPosATL player, ["NameVillage","NameCity","NameCityCapital"], 25000];

#

So what do I put inside the {}'s?

jade abyss
#

why forEach?

woeful void
#

Because, as proof of concept, I'm looking to make every city/town/village a sector that can be claimed, regardless of the map. The module should just automatically (automagically?) scan the map and figure it out.

jade abyss
woeful void
#

I already have nearest locations in my code snippet and that's why I opted for just the nameVilalge, nameCity and nameCityCapital categories. I don't need nameMarine and others.

#

What I'm looking to do is create each of those locations as sectors in a sector control game.

jade abyss
#

btw.: Those Informations should be inside the Config, might be easier to take them out of it.

rancid ruin
#

yeah get locations from cfg

#

hang on a sec

jade abyss
plucky beacon
#

mmm arrays

woeful void
#

That's not the question I'm asking.

jade abyss
#

wow

woeful void
#

I already have my list of locations. I need to make each of them a sector.

plucky beacon
#

you mean like the BIS capture sectors?

woeful void
#

yes.

rancid ruin
#
_locations = "true" configClasses (configFile >> "CfgWorlds" >> worldName >> "Names");
{
    _type = getText (_x >> "type");
    if ((_type == "NameCityCapital") || (_type == "NameCity") || (_type == "NameVillage")) then {
    // do something with this city/town
    };
} forEach _locations
jade abyss
#

@rancid ruin "Thats not what he was asking for" XD

woeful void
#

oneoh, I am already past this point. Again.

rancid ruin
#

alright bruh keep your hair on

plucky beacon
#

Everybody stop panicking!

#

I didn't read that as aggressive btw but I just got here

woeful void
#

It wasn't meant to be aggressive. If it was taken that way, my apologies.

rancid ruin
#

you should keep your hair on anyway, lest you go bald

woeful void
#

too late on that point

#

๐Ÿ˜ƒ

plucky beacon
#

Wew

#

would locations take more than just the cities?

#

like, ruins

jade abyss
#

Sure

#

markers on the map for example

woeful void
#

if I pass in an array that had more than the three name constants I threw in then yea it can get overly aggressive. I could easily just have it grab mountain tips, for example.. the ones that are named at least.

rancid ruin
#

there's shit loads of location types, not many are really used though, it's a shame

woeful void
#

But the question is more, how do I make each of them a sector for the sector control game type.

plucky beacon
#

are locations organized by type? I mean they must be if only some are available for jumping to in Eden and Zeus

woeful void
#

without any previous knowledge of what is on the map.

jade abyss
#

Thats why we started with that Config thing. 1. "nearestXYZ" -> avoid if not rly needed.

plucky beacon
#

Here at the Arma 3 discord we work from the ground up

#

leave no line of code unchecked

woeful void
#

I could tell. ๐Ÿ˜›

plucky beacon
#

Listen to Dscha (carefully) and you'll be good

jade abyss
#

meh, me? meh

woeful void
#

sadly, for my needs I kinda do because I am aiming to wrap most of thesector setup stuff into a drag and drop module, set the range on what it'll turn into a sector, and it'll do the rest. That's why the range attribute, defaulting to 25000 range, can easily be smaller if you want a smaller stage to play on.

jade abyss
#

Next thing: I don't think there is a "Prefab" for Sectors. I guess, you have to write that stuff for yourself (e.g.: CreateMarker + InArea)

woeful void
#

I was afraid of that.

polar folio
#

pretty sure BIS modules contain some sector control shizz

#

^there ye go

jade abyss
#

Uh, nvm. Thx @rancid ruin o7

rancid ruin
#

2nd result for arma 3 sector control on google

plucky beacon
#

I bet Sa-Matra knows sectors, ya know KOTH and all

woeful void
#

nerfbats Oneoh. "scripted setup, not manual. :)"

polar folio
#

best bet would be placing that stuff in the editor and thus finding out how it's done using the editor UI. then go hunt class names of those modules and functions those modules run

#

and then create them via script

plucky beacon
#

cfgModules

rancid ruin
#

yeah you can do anything in script that you can do in the editor

plucky beacon
#

editor is just a GUI for scripts

polar folio
#

will help you reverse engineer

woeful void
#

Was hoping I didn't need to go into that deep into the code but... looks like that's all I have. Ah well. And that module framework is what I'm actually leading with to make a dynamic sector control game... the overall idea is that Altis could be split up in roughly equal sections from east to west, and the idea is to take over one part of the continent before advancing to the next.

jade abyss
#

There will be more ๐Ÿ˜„

woeful void
#

The sector control is created, and destroyed dynamically as the west advances into the east (or other way around if they botch it up bad)

jade abyss
#

Hint: Start small, just play around with some basic stuff. Then go bigger and bigger (like testing around with Arrays/Markers etc)

tough abyss
#

@still forum 5 mega would fuck profileNameSpace?

plucky beacon
#

that don't sound like something you can avoid going deep on xD

woeful void
#

I had hoped. ๐Ÿ˜ƒ

plucky beacon
#

hope is not a strategy

#

I will take that to my grave

jade abyss
#

Hope is for the weak

woeful void
#

What I might do, if I can figure out how to dynamically add and remove sectors, is to make the trailing edge of a warfront despawn and new sectors created ahead of the front as it moves.

#

keep it as one sector control but the sectors themselves are dynamic.

dusk sage
#

no @tough abyss

tough abyss
#

@dusk sage thanks.

woeful void
#

Thank you for your time folks. At least it gives me something to work with.

jade abyss
#

@woeful void Try static stuff first ๐Ÿ˜„

woeful void
#

Already bored with setting up static sector missions. ๐Ÿ˜ƒ

jade abyss
#

I thought you didn't know how to setup Sectors?! oO

#

i am confuziused now.

woeful void
#

Dynamic ones, I don't.

jade abyss
#

kk

woeful void
#

if I can't do it manually, then I have no idea how to do it automatically. That's true for about everything really. you can't automate what you have no knowledge of.

polar folio
#

yea i dunno about performance of those BIS modules whne there are as many as towns on Altis for example

woeful void
#

I already know trying to make every down a sector is CPU Suicide..

#

I may put a hard limit inside of the code, only X many sectors can be created, for example.

polar folio
#

i'm thinking making your own sector system is actually a great project for a starter. clear conditions and straight forward concepts. and as a bonus you get all the control over what exactly happens

jade abyss
#

btw.: For how many players did you planed on doing this?! 1000?

#

Otherwise -> Zones will be empty, when more then idk... 10-20

woeful void
#

That's part of the fun, scaling it for the # of players online per side. If there's less then 10 total, then having 2-4 sectors might be enough. 100? 8-12ish.. playtesting will bear out what is a fair number.

jade abyss
#

Sounds easy, but will be a clusterfk (alot to do) ๐Ÿ˜„ gl with that

polar folio
#

isn't CTI doing all that?

jade abyss
#

CTI scales?

polar folio
#

like making each town a sector

jade abyss
#

Ah, yeah. (at least, it was in OFP ๐Ÿ˜„ )

polar folio
#

yea haven't played it in a while myself. but i think there are several versions of this concept available in mission form. maybe you can find one that suits your needs. unless you're in it for the challenge

woeful void
#

I'm doing it as a goal/scenario/... something, that gives a reason to why I'm torturing myself (err)... to satisfy my curiosity and learn more about how the engine works. (yea, lets go with that reason)

#

^.^

#

Ideally I would like to find a way for the scripting to communicate off server, like calling a URL or writing/reading from a file...

#

that way I can have multiple server running, each handling a different part of that warfront and syncing up through that external resource. even MySQL would be a good option...

#

DayZ did something like that. I would love to learn how.

polar folio
#

didn't dayZ just save player gear and position independent from server? i always thought that was one of its biggest flaws design wise. allowing server hopping to pick clean airfield barracks on empty servers

jade abyss
#

Yep

woeful void
#

I don't disagree about it being a flaw.. but the concept behind it, with data being shared across servers, is what I would like to work out.

#

Hmmm.... I'll have to look at this.

polar folio
#

i'd love something like planetside 2. game is stupid but the whole mass battle on one server thing is damn beautiful

jade abyss
#

But: Before you do something like that -> Fiddle more with the basics.

#

Yeah Benson... ๐Ÿ˜ฆ

#

Or at least... connect from 1 Server to another one directly (via Script/ServerCommand)

polar folio
#

you should start small though. make your script create zone markers on each town based on location size. then learn the most effective way to check how many units of any side are in those areas considering that you got a shit load of them.

that's already a bunch of interesting problems to solve

#

and learn in the process

#

yea that'd be cool dscha

jade abyss
#

There is one command, but don't work ๐Ÿ˜ฆ

woeful void
#

I'm working off of several ideas like that @polar folio, it's kind of like a knowledge map. high level concept, broken down into pieces and each piece I'm addressing individually, some of those are broken down too... down to like.. 3-4 layers deep. There's so many things I do have to learn, yes, so I'm working on each byte sized piece, one at a time. ๐Ÿ˜ƒ The dynamic sector module is my learning how to create game logic entities dynamically.

jade abyss
#

gl with that

woeful void
#

thanks.

little eagle
#

@plucky beacon @jade abyss
I think publicVariable and missionNamespace setVariable public are essentially the same. Both trigger pv eventhandlers now. object setVariable public should too btw. Very weird stuff going on there.
There is no reason to usepublicVariable outside of explicitly wanting to make use of the PVEH.
missionNamespace setVariable public is faster, because it's one less command. It should be used most of the time, but is for whatever reason less popular "out there".

blazing zodiac
#

Anyone have a surefire way to keep AI from proning? setUnitPos "Up" doesn't work 100% of the time.

#

Plus I'd still like them to be able to crouch

jade abyss
#

@little eagle Are you sure, that setVar triggers PV EH? oO don't think so, tbh, hmmm....

cedar kindle
#

according to rocket (dayz) PV's are sent as priority messages while setvar is not

#

and no @jade abyss, setvar should not trigger pveh

#

oh it seems like setvar pveh was added in 1.46

#

but it seems to take the target to listen to so they're not the same

#

unless the first syntax runs for MNS setvar

jade abyss
#

Erm, yeah? Thats what i said, it doesn't trigger it? oO

plucky beacon
little eagle
#

setVariable public does trigger PVEH and it will also pass the used namespace as 3rd argument in _this..

#

Machine 1:

"test" addPublicVariableEventHandler {diag_log _this};
#

Machine 2:

missionNamespace setVariable ["test", 0, true];
player setVariable ["test", 1, true];
group player setVariable ["test", 2, true];
#

RPT:

14:25:07 ["test",0,Namespace]
14:25:07 ["test",1,B Alpha 1-1:1 (Gefr. commy2) REMOTE]
14:25:07 ["test",2,B Alpha 1-1]
jade abyss
#

Good to know.

little eagle
#

It works the same as publicVariable does, in that it does only trigger the event on all other machines, not the one that used the command.

#

Which means that it does not work at all in SP.

#

@cedar kindle
The alternative syntax of addPublicVariableEventHandler is not functional and does exactly the same as the default syntax. The namespace parameter is simply ignored.
I also cannot reproduce either of them being sent with any sort of priority. The messages arrive in the order they were sent.

cedar kindle
#

i'm guessing it has something to do with the engine implementation but that's good to know

#

any difference for jips when the variables are synchronized?

little eagle
#

Hmm. Not tested. Should be easy to figure out when looking at that JIP messages .txt file.

#

The PVEH does not work JIP anyway. PVEH cannot be added in frame 0 and in frame 1, all JIP messages are synched already.

cedar kindle
#

oh

west lantern
#
player setVariable [ "VAcatch", [ "VAcatch", "onEachFrame", {
    if ( !( isNil { _this getVariable "VAcatch" } ) && { !( isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) ) } ) then {
      _this setVariable [ "VAcatch", nil ];
      _thread = _this spawn {
        waitUntil { isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] )  };

           // Arsenal closed
           // Save player gear
           [] call ing_fnc_gear_save;
           _this setVariable [ "VAcatch", "VAcatch" ];
         };
       };
       }, player ] call BIS_fnc_addStackedEventHandler ];``` doing something wrong here? Works from initplayerlocal.sqf but only first time I open arsenal and close it, next time it wont... hmm
little eagle
#

Does BIS_fnc_arsenal_cam actually become null when the arsenal is closed?

#

Maybe they keep the camera object around, but inactive

#

The waitUntil seems arbitrary

#

I'm also sure there already is a Arsenal opened event and you don't have to loop.

west lantern
#
    BIS_fnc_arsenal_cam            //null if arsenal is not open else holds reference to arsenal display```
#

Larrow claims so

little eagle
#

Yeah, but is it true?

west lantern
#

well must check... but it works for the first time when used just not after respawn ยฏ_(ใƒ„)_/ยฏ

little eagle
#

Do yourself a favor and use this:

[missionNamespace, "arsenalOpened", {
    // code
}] call BIS_fnc_addScriptedEventHandler; 
#

like

#
[missionNamespace, "arsenalOpened", {
    [] call ing_fnc_gear_save;
}] call BIS_fnc_addScriptedEventHandler; 

done

west lantern
#

๐Ÿคฆ๐Ÿป well yeah the easy way ๐Ÿ˜„

little eagle
#

That should do it as far as I can tell.

civic maple
#

Wait, is there actually an event for opening the arsenal now?

little eagle
#

A" scripted " one, yeah. And it has been there since forever

#

Unfortunately it executes after the arsenal exchanges all your gear, so it's not as useful as it could be. But I guess that is exactly what Jastreb wants? Maybe not.

west lantern
#

save gear after player closes the arsenal ( what Jastreb wants )

little eagle
#

No, opens it.

#

The arsenal, for whatever reason, replaces all your gear with the exact copy of what you had

#

Which is only a problem when you deal with setVars on backpacks if you want to handle TFAR or ACRE

#

Otherwise you don't notice it I guess.

#

Oh and it deletes your laserdesignator batteries when you have full gear.

#

Really annoying.

#

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

west lantern
#

๐Ÿค”

#

this will save gear when player open arsenal, but player changes gear and at that point when he is done I need it to save it

little eagle
#

Well, replace arsenalOpened with arsenalClosed

west lantern
#

shit... where do you dig these

little eagle
#

lol

west lantern
#

its not on EH list on BIKI

civic maple
#
[] spawn {
    while {true} do {
        waitUntil {
            !isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull]);
        };
        
        waitUntil {
            isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull]);
        };
        
        _inventory = [player, [player, "currentLoadout"]] call BIS_fnc_saveInventory;
        player setVariable ["currentLoadout", _inventory];
    };
};
little eagle
#

I hit windows key, "fn_arsenal.sqf" -> open file -> ctrl + f "scriptedev" -> F3, F3, F3

civic maple
#

that's how I do it

little eagle
#

Yes, but you ask the game every frame if the arsenal is open or not.

jade abyss
#

wich is a waste of ressources

civic maple
#

yeah, that's because I didn't know there was an event handler for it

little eagle
#

Contrary to what some people claim I say, I think it's not a good idea to do that.

civic maple
#

so thanks a lot for showing me

west lantern
#

no I just call a FN which saves it to ProfileNamespace

little eagle
#

yw

west lantern
#

@little eagle and folks massive thanks for the EH direction and possible solution

tough abyss
#

Donnovan Bob was here ๐Ÿ˜„

#

Who whats my spectator with zoom script for free? ๐Ÿ˜…

still forum
#

@tough abyss 5 mega would fuck profileNameSpace? Not sure... But a few GB certainly will

tough abyss
#

The chance to it hit 5 mega is remote, real is more like 2 mega.

#

What happens if i create an object and then store it in a var in profileNameSpace, and then restart the game? This object will be a objNull?

little eagle
#

How would you even reach 1 MB of data? Even saving a whole loadout is <5 kb

#

You'd need to save hundreds of loadouts

tough abyss
#

@little eagle i use profile name space, on the server, as a alternative to ExtDB3.

#

Was not hard to do.

little eagle
#

There is no limit as far as I know.

#

Although I think that the whole profile namespace resides in RAM.

#

So yeah, don't make it take up gigabytes.

tough abyss
#

I just store text and number in it, because this is the data send to ExtDB3. But can i store object types in it?

#

After server reset what happens with this var if the object stored in it don't exists anymore?

#

It take less than 1 mega with a clean server. With a server full of objects and player it can grow to 3 megas may be.

little eagle
#

You can store anything in profile namespace, but if you switch missions, things like objects, groups, locations etc. become null.

#

They only persist as long as the mission persists.

tough abyss
#

Ahh.. thanks.

#

I simplilly have an array in profileNameSpace that simulates each table in MySQL

#

5 tables in MySQL -> 5 arrays in profileNameSpace

#

Starting to whink MySQL is unecessary

#

:p

little eagle
#

I don't know what mySQL does.

tough abyss
#

So without MySQL and without the need of ExtDB3, one can run the mission in his client, play with friends, and have persistent stuff using profileNameSpace

#

There is no need of dedicated. It will really be a mission only, with persistent save.

#

@little eagle its a database.

#

To store player gear, vehicles position etc...

little eagle
#

I know that, but I don't know how it does that.

#

And I don't care tbqh.

#

Doubt it can handle object references either, since you can only pass strings to extensions.

#

And there is still no way to serialize objects...

tough abyss
#

_object = compile str player;

#

this dont work?

#

MySql store only numbers and string

cedar kindle
#

use player UID

little eagle
#

Only if you give that object a vehicleVarName and that still does not serialize it actually in that you cannot use it in different missions / sessions.

jade abyss
#

MySQL is simply just for storing data (like Gear, Position, whatever) not varNames and Objects etc.

little eagle
#

numbers, strings and arrays basically

jade abyss
#

No idea who would made a mess like that oO

#

Yeah

little eagle
#

Those are the things usable with profileNamespace and extensions

jade abyss
#

But faster to qry from an MySQL DB

tough abyss
#

Ok then

#

My players "table" in profileNameSpace is like that:

jade abyss
#

Why PNS?! oO

#

That might work, if you only have certain amount of entrys in it. If it gets bigger and bigger -> MySQL is faster, due to index stuffthingystuff

little eagle
#

Because people would rather use inferior features than introduce dependencies.

celest crown
#

hi, help me please make autobans. my sclient-side [getPlayerUID player)] remoteExec ["TON_fnc_autoban",2]; and server side _uid = _this select 0;

"228229230" serverCommand format ['#kick %1',_uid]; I only work kick player and exec ban It does not work. Why can not I use a ban? How to ban with a reason and time via extDB2 or BE command. Is there a way to call BE command from sqf?

little eagle
#

What?

jade abyss
#

He wants to ban via sqf, but is too lazy to do a 5min googlesearch (since 3 days)

#

btw.: Lifer how it seems ๐Ÿ˜„ (TON_fnc)

little eagle
#

Idk, if exec ban does not work with serverCommand , then there is nothing we can do about it.

tough abyss
#

My players "table" in profileNameSpace is like that:

playersTable = [
    [
        "23897492374"    //player 01 UID,
        "56745764644"    //player 02 UID,
        "34534636566"    //player 03 UID,
        "23445644745"    //player 04 UID,
        "65734534563"    //player 05 UID,
        "45645635634"    //player 06 UID
    ],
    [
        [gear,life,myUniform,weapon,myItems],    //p 01 data
        [gear,life,myUniform,weapon,myItems],    //p 02 data
        [gear,life,myUniform,weapon,myItems],    //p 03 data
        [gear,life,myUniform,weapon,myItems],    //p 04 data
        [gear,life,myUniform,weapon,myItems],    //p 05 data
        [gear,life,myUniform,weapon,myItems]     //p 06 data
    ]
];

To query for a player is simple:

_playerData = playersTable select 1 select ((playersTable select 0) find _uid);

To save a player is simple also (total save):

(playersTable select 1) set [((playersTable select 0) find _uid),_newPlayerState];

To save player uniform is simple also:

(playersTable select 1 select ((playersTable select 0) find _uid)) set [3,_newUniform];
little eagle
#

sqf
You goofed

jade abyss
#

๐Ÿ˜„

#

@tough abyss And i will tell you: It will be slower then MySQL via ExtDB.

little eagle
#

That (playersTable select 0) find _uid line looks painful. Also this is essentially what those CBA hash thingies do.

#

Yeah idk. That looks good to me. I wouldn't worry about size until it actually causes problems.

#

You could, instead of using one variable, use a new variable for every player uid using the format command, to get rid of the need to use find, which would speed things up.

#
profileNamespace setVariable [format ["MyTag_playersTable_$%1", _playerUID], _whatever];
#

etc.

jade abyss
#

Yep, thats how i did it for temporary saves in 2017mod

little eagle
#

oops, edited

civic maple
#

Does anyone know of a fast way to get the class name of an item with a specified displayName?

jade abyss
#

typeOf ?

#

Or do you only have the string with the name?

civic maple
#

I don't have an instance of the item, only the name

little eagle
#

Cache them at mission start in a pseudo namespace. Best used together with the items inventory icon.

jade abyss
#

What kind of items?

civic maple
#

Stuff in your inventory

#

like uniforms, bandages, goggles, and such

jade abyss
#

Why by name?

little eagle
#

^ That's how I do it

jade abyss
#

oO

little eagle
#

:magic:

civic maple
#

How long does that take to run?

jade abyss
#

Problem: Localization? Commy2

little eagle
#

like 0.002ms

civic maple
#

oh nice

little eagle
#

Yeah, it breaks when you change language mid mission, Dscha

#

But who gives

jade abyss
#

You don't know players ๐Ÿ˜„

#

+ah, thats local, nvm

little eagle
#

You cannot get faster than this with SQF, anden3 ...

#

Of course multiple item classes can share the same display name and picture, so it's not ...

#

... What's the term?

civic maple
#

my current method is around 500 ms, so this seems a bit better

jade abyss
#

again: What are you trying to achieve?

civic maple
#

This is for loading gear on mission start

jade abyss
#

Wouldn't it be better to use Classnames, instead of DisplayNames oO

civic maple
#

People in my community has complained about them taking long to look up :P

little eagle
#

lol

jade abyss
#

Ooohhhh myyyyyy

civic maple
#

So I'm just checking how viable it is to use displayNames

jade abyss
#

Give them a simple UI Listbox Interface or let them use Arsenal ๐Ÿ˜„

little eagle
#

lmao. It is, but you need to unlock level 100 SQF to get it to work.

tough abyss
#

@jade abyss @little eagle i never got the profileNameSpace tables highly populated to know if it gets slow or not.

little eagle
#

No, they are hashes. Doesn't matter how many entries they have*

civic maple
#

@jade abyss Nah, enforced gear.

jade abyss
#

hmm

tough abyss
#

@little eagle you talk about your solution with each player in a variable?

little eagle
#

Exactly.

tough abyss
#

But hashes also don't need to be... found? lol ๐Ÿ˜›

#

they are a lot faster to find?

civic maple
#

I see you're using count instead of forEach. How big of a difference does it make?

jade abyss
#

count is a bit faster, but doesn't have _forEachIndex.

civic maple
#

kk

jade abyss
#

But not THAT much faster

little eagle
#

I'd rather use forEach, but the QC likes count for whatever reason.

still forum
#

someone needs to make a forEach/count without _forEachIndex and without counting the return values

little eagle
#

Dedmen, fix your unit test, so we can release 3.2

still forum
#

I did

tough abyss
#

@little eagle you understand, if 2000 unique players join my server, i will have 2000 vars.

still forum
#

@tough abyss use CBA hashes

little eagle
#

So? Currently you will have a huge ass array instead and using find becomes slower linearly the more entries you have, while format getVar does not change speed at all*

tough abyss
#

Yeah, so its magic, or with one billion vars it start to get slow?

little eagle
#

One billion will get slow because it will have to resolve hash collisions, but it'd still be faster than find, probably

#

Look up how hash tables work. That is what BI does for setVar or any other global variable

#

In a well-dimensioned hash table, the average cost (number of instructions) for each lookup is independent of the number of elements stored in the table.
Wikipedia

tough abyss
#

@still forum thanks, i will use it.

#

HOW COULD THIS BE!!!

#

๐Ÿ˜ฑ

plucky beacon
#

lol what?

little eagle
#

He learned about associative arrays today.

#

Pretty shocking.

tough abyss
#

"lookup is independent of the number of elements stored in the table"

#

just kiding

plucky beacon
#

but are you?

tough abyss
#

I'm kinidng about my reaction, but this is very nice thing i was not aware of.

little eagle
#

Invented 1953

#

You're behind the curve.

tough abyss
#

They also invented potatos with curry and magantiba in 1837... you know that?

jade abyss
#

Okay, time to be the PartyPooper:
How do you think, will you edit your saved Data.
Also:
How will you save your cached Data?
Also also:
How will you load your saved Data?
also also also:
Do you plan on doing any backups? If so: How?

tough abyss
#

"who gives a shit about potatos" lol

#

just kiding

little eagle
#

"I ate a potato."

plucky beacon
#

I think I figured out a pretty neat revision of my vehicle spawner. Instead of changing the addaction of each vehicle I have it grab the classname of the vehicle who's init it's in, send that to a case:switch and checks the library of all combinations and spawn's the enemy counterpart.

#

Also I was using an ugly way of having two arrays and spawning them with the same index of a parrallel array

jade abyss
little eagle
#

returnUnique (Optional): Boolean (added in v1.69.140138) - When false, all intersections in the same object are included not just the 1st one. Default: true

#

:9

plucky beacon
#

oh that's just for not spawning it on top of each other

#

You talking to me Dscha? I think we're on diffrent pages

jade abyss
#

uh, wut?

#

Yeah, i was talking to you

#

Weren't you the one, who had simpleObjects as Vehicles, then exchanged them?

#

If not -> Ignore what i said ๐Ÿ˜„

#

If you are -> read what i wrote ๐Ÿ˜„

plucky beacon
#

nahnah

#

:P

#

I'm sure it's hard to remember when over half the conversations last weekend were about my project >_<

jade abyss
#

I can't even remember what i said 2 hours ago, soo...

plucky beacon
#

Well 2 hours ago nothing, so of course you can't!

tough abyss
#

Thanks for all the help, as a conclusion of all help here i will keep the find version for obvious reasons.

#

@jade abyss can't you block me again? ๐Ÿ˜„

#

The day you guys do a lazagna good like me we will be able to talk.

little eagle
#

as a conclusion, I will stick with the worst option
O.K.

jade abyss
#

<- confuziused

tough abyss
#

You guys made fun of me

#

๐Ÿ˜ญ

#

bye

still forum
#

The philosophy of Confucius emphasized personal and governmental morality, correctness of social relationships, justice and sincerity

jade abyss
#

@little eagle do you have any idea whats going on atm?

little eagle
#

#arma3_scripting was pretty friendly to you compared to some of the other people that run into here and want their two liner scripts fixed for free.

jade abyss
#

@still forum confuziused = Confused just spelled wrong on purpose, because: I dolfinitive like that.

little eagle
#

do you have any idea whats going on atm?
No.

jade abyss
#

Okay.

little eagle
#

But that makes it all the more exciting.