#arma3_scripting

1 messages ยท Page 304 of 1

still forum
#

also the while loop will never end because you never remove anything from acts. Meaning it runs 10k iterations and then just quits which may cause a framedrop

jovial ivy
#

Silly me. Forgot to remove it from the array ๐Ÿ˜›

still forum
#

Doesn't change much about the fact that it runs in one frame.. The Player will not even see the Actions appearing

jovial ivy
#

Hmm.

still forum
#
[] spawn {
    sleep 60;
    {
        ply removeAction _x;
    } forEach acts;
    acts = [];
     ply sideChat "No response. Assuming you want to stay inside vehicle.";
};

use this instead of the while loop. It will wait 60 seconds and then abort

#

Also your variable names are very generic..

#

And if the player uses the getOut action again and just ignores your Yes and No you will overwrite acts while not deleting the old Yes/No Actions. So you will get duplicates

jovial ivy
#

Alright. Maybe it would be better to use a HUD? So the player cannot scroll and is forced essentially to either press Yes or No?

still forum
#

Would be better. Then he can also just close it with Esc and you can see that as a No

jovial ivy
#

Indeed

#

Will be a fairly new experience for me due to the fact I have never messed with HUDs.

still forum
#

But making a Hud is even Harder than a addAction script. And you seem to already be struggling with the script

jovial ivy
#

Very true.

still forum
#

you should check at the start of the script if acts is non-empty. And if yes delete the existing Actions inside acts. That would solve the duplication issue

jovial ivy
#

waitUntil {time % 500 == 0}; would technically work to execute a code every 500 seconds if used in the right context yes?

still forum
#

yes...... But.. That's kinda dumb

#

you need a while loop anyway.. Why not use a sleep

#

a waitUntil is checked every few frames. A sleep wouldn't be touched till it's done (It will still be touched but won't be as heavy as evaluating the waitUntil condition)

rancid ruin
#

can't you just remove the vanilla exit vehicle action and replace it with an action that creates yes/no actions or displays a yes/no dialog?

still forum
#

Afaik vanilla exit vehicle is hardcoded

#

But you could lock the vehicle so the player can't get out otherwise

jovial ivy
#
    sleep 500;
    if(stats_sectors_liberated > 0) then {
        res = stats_sectors_liberated  * 3;
        resources_ammo = resources_ammo + res;
        systemChat Format["Game Logic : Given Resources: %1", res];
    } else {
        systemChat "Game Logic : Unknown Error - manage_timer.sqf";
    };
}; ``` And I suppose with the lock.
scarlet spoke
#

Does the server regroup units in it's initialization?

tough abyss
#

What do you mean regroup?

scarlet spoke
#

Because if I execute my code right after the client has his interface whcih will create a new unit the player is switched into and joins the old player unit to another group, it won't work completely. The player controls the new unit but the old one is still in his group. But logging showed that the group switch did indeed work at the time the script has finished

#

Therefore I am assuming the server is doing something with the group of the old unit and switches it back to the original group ๐Ÿค”

tough abyss
#

Groups are local to the machine that created them?

#

I think...

#

I've been away from ArmA 3 for a long time now.

#

I quit the game completely.

#

Correction groups are Global

#

Got the code to look at?

tough abyss
#

Now I remember why I quit SQF

#

hugs C++, C and Python

scarlet spoke
#

Haha xD

tough abyss
#

I also found out ArmA 3's single-threaded nature got worse...

#

after the 64bit update.

#

Running a single-thread on my machine at 100%

#

causing the FPS to cap at 30 FPS

#

CPU could not longer provide work for the GPU to do.

tough abyss
#

@scarlet spoke

#

You've got a locality issue

#

selectPlayer is known to screw with locality

jade abyss
#

Just4Info:

Most of the notes above do not apply to Arma 3 anymore.```
tough abyss
#

Update the wiki then...

scarlet spoke
#

And it does work later on

tough abyss
#

facedesk

scarlet spoke
#

It just doesn't work directly after mission start

tough abyss
#

Is it running scheduled?

scarlet spoke
#

Nope

tough abyss
#

Post init it?

#

or preinit it?

scarlet spoke
#

The complete mission is unscheduled

#

Pre-Init

tough abyss
#

Yeah preinit can delay stuff a lot.

scarlet spoke
#

Any idea in how to solve the issue?

tough abyss
#

Why not just use the initPlayerLocal.sqf or something like that?

scarlet spoke
#

For now I have implemented a delay for the client's mission start and it seems to work but it's kind of a dirty fix...

#

Becaue it would screw the rest of the system (because its no longer in sync) + it would be in scheduled env.

tough abyss
#

remember also

#

initPlayerLocal.sqf, init.sqf, initServer.sqf or initPlayerServer.sqf

#

all run scheduled.

scarlet spoke
#

I know... That's why I don't use them ^^

tough abyss
#

Did you try benching your code?

#

In the unscheduled to see how long it takes to execute?

scarlet spoke
#

The one in the pre-init?

tough abyss
#

Yeah

scarlet spoke
#

No haven't done that yet

tough abyss
#

Check it.

scarlet spoke
#

But I'm not doing a lot of stuff in there...

#

Okay I'll do that

#

The client takes 0.001 seconds to run the code and the server takes ~7 seconds

#

I think this is because the server has to create a few bases from scratch during that time

tough abyss
#

Which will be running in scheduled also have to remember

scarlet spoke
#

However the client only starts after the server has run all it's code anyways

tough abyss
#

the scripting executor VM is mapped to a single Kernel layer thread

scarlet spoke
#

What will run in scheduled?

tough abyss
#

Ohh you are creating the bases in non-scheduled?

scarlet spoke
#

yeah

tough abyss
#

Sounds expensive...

#

CreateVehicle calls alone are pretty costly.

scarlet spoke
#

Well apparently it is ^^

#

But this is only when the server initializes and as I said the client won't start before it has completed

tough abyss
#

Anyway you could shrink the workload and do it in batches?

#

Ah before the clients connect, but you've got to consider when you reboot the server

#

that preinit code will run

#

everytime the mission is restarted or rebooted.

scarlet spoke
#

I guess I could but then it could be that the client initializes before the bases are created... ๐Ÿค”

#

I know... But if it doesn't there's nothing to play on except the plain map of Altis xD

tough abyss
#

using call in unscheduled do me a favour

#

Run your code

#

Then watch using ProcessExplorer

#

CPU core 0

#

and how far it goes up while running that code.

#

Particularly the base creation.

#

I remember from my own scripting core 0 goes to about 70 - 90% when performing those sorts of operations.

scarlet spoke
#

I get the point but that has to be done on startup anyways so why not do it at once?

tough abyss
#

You know an unscheduled halts all engine operations till completed yes?

#

it's "Blocking"

#

So sure complete it all at once.

#

But it may impact the performance of other sections of your mission potentially.

#

Depends on how long the "Blocking" function takes to complete.

#

it's why they say

#

you shouldn't run complex code in unscheduled

#

Creating vehicles, is definitely considered "complex"

#

@scarlet spoke

scarlet spoke
#

Hm I'll have to investigate that further and experiment a little bit with the different options...
Thanks for your help @tough abyss

dusk sage
#

it lives

jovial ivy
#

@still forum The HUD/Confirm thing wasn't that hard ๐Ÿ˜›

tough abyss
#

@dusk sage am I correct?

little eagle
#

No one wants to have 30 FPS on the loading screen. createVehicle at mission start in unscheduled.

#

That way the missions starts faster...

#

Even when using the scheduled environment, one createVehicle call will run all at once, because one script command is atomic.

tough abyss
#

I've done this before, spawning a bunch of vehicles in unscheduled made the game cry...

#

It was about 10 - 12 vehicles

little eagle
#

Don't do it during the mission obviously.

#

Create batches of objects in one frame.

tough abyss
jade abyss
#

1.:
class nev_debug_menu { <-- nonono

#

class nev_debug_menu <-- yesyesyes
{ <-- yesyesyes

tough abyss
#

Nope. That's not the issue here @jade abyss.

dusk sage
#

?

jade abyss
#

It is, because you would see instantly, where one is }; missing ๐Ÿ˜„

tough abyss
#

You keep giving unhelpful advices.

jade abyss
#

Yeah i know. Good, aye?

tough abyss
#

Aye, real mature.

#

Tried looking at your Macro declarations?

jade abyss
#

(oh btw. i am checking your files atm, while giving you unhelpful advices....)

tough abyss
#

because Macros replace the inline macro keyword with code

#

It's probably one of the macros you are using

jade abyss
#

Yep, must be something in the Macros

#

(another "unhelpful advice")

#

My unhelpful advice/Guess is:
Line 5
onLoad = QUOTE(call FUNC(onLoad));

little eagle
#

I don't see include of the script_component.hpp, but even then, it should just replace them with strings

meager granite
#

class nev_debug_menu { <-- nonono
class nev_debug_menu <-- yesyesyes
{ <-- yesyesyes(edited)
triggered

tough abyss
#

The file is included inside config.cpp, at the top of which there's #include script_component.hpp.

little eagle
#

ok

#

what's the error? I'm trying to build it

tough abyss
#
Truncated file. Missing one or more };. Error starts near token 'controls' "
In file C:\Users\Me\Desktop\nev_debug_menu\config/cpp: Line 574 EOF encountered

return with -noisy option to see decode

Press the ANY key
jade abyss
#

One of the Macros

tough abyss
#

Told you.

#

I updated the gist to represent the whole config.cpp

little eagle
#

style = ST_LEFT + ST_FRAME;

jade abyss
#

works like that

little eagle
#

Pretty sure the tools want you to put quote marks arund this

#

because they suck ass

#

QUOTE(ST_LEFT + ST_FRAME)

jade abyss
#

packed it with PboProj once, didn't complained

#

Do i wanna know, what "quote" does?

tough abyss
#

It's not in quotes on the wiki.

#

QUOTE(hi) >> "hi".

jade abyss
#

๐Ÿคฆ

tough abyss
#

Sorta.

little eagle
#

Dscha, you cannot do
style = "ST_LEFT + ST_FRAME";

#

That wouldn't resolve those numbers

#

Build works for me (after adding the base classes for the controls)

jade abyss
#

Use the Numbers, problem solved, next one.

little eagle
#

What you should do is comment out all the controls classes with one big /* */

#

Dscha, that isn't the problem

#

Comment out all controls and then reenable them one by one

#

To find out which class is bugged.

tough abyss
#

And the tedious debugging begins.

#

Hey isn't it weird how if I build it with AddonBuilder and place it inside @Ace#7850/addons it works?

#

This is why I started learning C++ and Python...

#

I get an IDE.. (off-topic)

little eagle
#

AddonBuilder is better than mikeros tools.

#

No surprise here

tough abyss
#

For pbo'ing yes.

#

I've been trying to solve this since yesterday. Bascially the game is refusing the load my addons...

#

Unless I move them to another folder.

#

Mikeros tools are good for de-pbo'ing and de-rapifying

little eagle
#

Maybe something in your build script

tough abyss
#

I never used them beyond that.

little eagle
#

I can agree to that, Geeky

tough abyss
#

I had weird stuff happen when pbo'ing using his tools

jade abyss
#

"weird stuff" means?

tough abyss
#

Not recognizing script files in missions among others..

jade abyss
#

I am using it since > 2 Years, no problems at all.

#

Must be on your side then oO

tough abyss
#

@NEV_Addons/addons/nev_debug_menu.pbo = doesn't work. Moving it to @ACE/addons/nev_debug_menu.pbo = Works

#

Pretty sure I fucked up something during building and now the game is refusing to handle @NEV_Addons properly.

#

There's nothing about nev_debug_menu inside the RPT as well.

rancid ruin
#

i hate to be this guy, but why not just do this whole menu in script form using ctrlCreate?

#

i've not seen the point in doing UIs in configs since that family of scripting commands came to arma 3

tough abyss
#

Because that would be an even bigger pain.

#

Config solution > Scripts.

rancid ruin
#

well, you can't even run this cfg properly, so..

jade abyss
#

@rancid ruin
Can't agree on that. createDialog > ctrlCreate the whole thing

Script solution -> Good for testing/aligning it.

rancid ruin
#

portability between missions and not needing to run an @ is a bigger plus IMHO

jade abyss
#

The problem he has atm -> Macros... macros everywhere.

tough abyss
#

@rancid ruin the mod adds an addAction and a keybind.

#

So all you have to do in order to open the dialog is press a button...

rancid ruin
#

nothing stopping you from creating the exact same thing using sqf

#

but fair enough, more than one way to skin a cat

jade abyss
#

@tough abyss You can build your whole UI with CtrlCreate and its other commands. When this is completely done -> You can copy the Coords / Commands to the Config.

#
_Ctrl_InfoBar_BG_Pos =    [0.398 * safezoneW + safezoneX,0.758 * safezoneH + safezoneY,0.204 * safezoneW,0.027 * safezoneH];

_Ctrl_GetInInfo_Text = (findDisplay  46) ctrlCreate ["RscStructuredText",411002];
_Ctrl_GetInInfo_Text ctrlSetPosition _Ctrl_InfoBar_BG_Pos;
_Ctrl_GetInInfo_Text ctrlSetBackgroundColor [0, 0, 0, 0];
_Ctrl_GetInInfo_Text ctrlCommit 0;
_Ctrl_GetInInfo_Text ctrlSetStructuredText parseText format["<t font='RobotoCondensed' size='1.2' align='center' color='#%2'>%1</t>",_Text,_Color];```
for example
tough abyss
#

Seems like one big ass script to run every few seconds.

jade abyss
#

Once

#

oO

tough abyss
#

Assume this is an admin's console of a sort, the dude's going to be opening and closing all the time.

#

ctrl commit 0;

jade abyss
#

Not rly

tough abyss
#

then uncomit it?

jade abyss
#

what?

tough abyss
#

Isn't there a way to hide the GUI

little eagle
#

Geeky is trolling

tough abyss
#

then reshow it?

rancid ruin
#

what i did with my debug menu was to ctrlCreate buttons when inventory screen is opened, ez, works well

tough abyss
#

Yeah pressing Esc.

little eagle
#

I replaced as many ctrlCreate with config as possible.

rancid ruin
#

i did the exact opposite ๐Ÿ˜„

tough abyss
#

Commy gets it.

jade abyss
#

@rancid ruin reason?

#

(i can't find any logical reason, why you prefere 10000 Commands, instead of a single command to load the Display/Interface)

rancid ruin
#

find it easier to follow the flow and see what's going on. everything's SQF, same syntax, same fucked-up-ness

jade abyss
#

hm

#

nah

tough abyss
#

It's not like you jump between Ruby and SQF in an HPP file ๐Ÿคฆ

rancid ruin
#

it works for me and let's me dev stuff quicker

jade abyss
#

everyone got his kink

rancid ruin
#

i have like a makeButton function which i pass params, which then does the ctrlCreate, set text, colour, position, commit, etc

#

apply that to all ctrl types and you've got a big mess of [param,param,param,param,param,param,param,param,param,] call createCtrlElement

tough abyss
#

A button is like 7 lines of code in a config.

jade abyss
#

So instead of inheriting from a base class, you recreate every button on its own ๐Ÿ˜„ Lets talk about effiency ๐Ÿ˜‚

tough abyss
#

^

little eagle
#

Obfuscated either one is just one line

rancid ruin
#

let's talk about how this guy can't even pack his addon correctly though, and see which of us can make a UI quicker ๐Ÿ˜„

tough abyss
#

๐Ÿ˜„

jade abyss
#

๐Ÿ˜‚

little eagle
#

๐Ÿ”ฅ

tough abyss
#

I worked 2 days ago ๐Ÿ˜ฆ

little eagle
#

It works with addon builder and it works in the magical ace folder

jade abyss
#

AddonBuilder...

#

*shiver*

rancid ruin
#

you guys are trying to apply sensible programmer logic to an unsensible platform

#

embrace the SQF and write fucked up code

tough abyss
#

Nah.

#

Could signitures be the issue here?

little eagle
#

Well you're applying unsensible logic to an unsensible platform

jade abyss
#

Btw.: Did AddonBuilder already learned, go give proper feedback about errors?

tough abyss
#

@little eagle ๐Ÿ”ฅ

rancid ruin
#

i would be debugging this in a clean, minimal new @mod rather than shoe-horning it in to the existing ACE mod or your own @ which is doing other stuff

#

compartmentalise it all

jade abyss
#

Some stuff like:
"Error in line 6 of file abc.hpp"
And not
"Error: 404. Find the cause for yourself, sucker."

little eagle
#

Yesterday when I build TFAR 1.0 the game complained about:
Input after end of line: <space>

#

Today it works

#

One restart

#

๐Ÿคท

rancid ruin
#

and yeah keep restarting your game

jade abyss
#

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

jovial ivy
#

Gotta love it...

little eagle
#

ErrorMessage: File z\tfar\addons\backpacks\anarc164\ui\anarc164.ext, line 74: Config: End of line encountered after

#

after ___ ... -__-

jade abyss
#

^^

little eagle
#

End of line encountered after ?

#

Sounds funny to me

#

Where else would the end of the line be

rancid ruin
#

that's deep

tough abyss
#

Renaming the folder didn't work ๐Ÿ‘Œ

little eagle
#

Did you try the good old /* */ method?

tough abyss
#

No.

little eagle
#

Do it.

tough abyss
#

What exactly do I comment out?

little eagle
#

All controls

#

And then reenable them one by one

#

Until it crashes

tough abyss
#

Ok.

little eagle
#

It crashes during build or at game start?

tough abyss
#

I commented out everything UI related: ```Cpp
#include "script_component.hpp"

class CfgPatches {
class nev_debug_menu {
name = "Mutipurpose Debug Menu";
author = "Neviothr";
units[] = {};
weapons[] = {};
requiredVersion = 1.0;
requiredAddons[] = {"Extended_EventHandlers"};
version = 1.4.2;
versionStr = "1.4.2";
versionAr[] = {1, 4, 2};
};
};

#include "CfgSettings.hpp"
#include "CfgNotifications.hpp"
#include "CfgEventHandlers.hpp"
// #include "ui\BaseDefines.hpp"
// #include "ui\DebugMenu.hpp"

#

Addon does not work.

#

Does not appear in RPT, etc.

#

0 changes for better or worse.

#

Oh and it doesn't crash @little eagle.

jade abyss
#

You are packing with?

tough abyss
#

AddonBuilder. Would you like screenies of the settings?

jade abyss
#

No, give pboProject a try

tough abyss
#
locating rapify...found
locating makepbo...found
locating Personal Tools for Arma2...found
locating steamtools for Arma3...found
Impossible. SourceFolder <C:\Users\Me\Desktop\nev_debug_menu> is not part of Workspace <P:\>.
See setup->
#

Does the unpacked mod folder need to be in P:?

jade abyss
#

Might be better

tough abyss
#

Where's the binlog?

#
scanning for jobs to do....
Processing nev_debug_menu
MakePbo x64UnicodeVersion 1.88, Dll 4.97 "nev_debug_menu"
Warning: rapWarning: **********missing file(s)***************
Warning: nev_debug_menu\CfgEventHandlers.hpp Line 3: call compile preProcessFile
LineNumbers '\NEV_Addons\addons\nev_debug_menu\XEH_preStart.sqf'
Warning: nev_debug_menu\CfgEventHandlers.hpp Line 9: call compile preProcessFile
LineNumbers '\NEV_Addons\addons\nev_debug_menu\XEH_preInit.sqf'
Warning: nev_debug_menu\CfgEventHandlers.hpp Line 15: call compile preProcessFile
LineNumbers '\NEV_Addons\addons\nev_debug_menu\XEH_postInit.sqf'

Rap or Derap error

makepbo failed
jade abyss
#

what the

#

"\NEV_Addons\addons"

#

why do you write the whole path in it?

tough abyss
#

?

jade abyss
#

You don't use CfgFunctions, right?

tough abyss
#

Nope.

jade abyss
#

You should do it.

tough abyss
#

But...CBA...

nocturne bluff
#

ACE dosent either, but i like it.

#

Pros and cons to every both systems

jade abyss
#

Its cleaner, tbh

#

config.cpp

class CfgFunctions
{
    class MyTag    //MyTag_fnc_MyFunction
    {
        class ExampleForFolderSortingA
        {
            file = "\MyMainAddonFolder\MyAddon\Functions";    //P:\MyMainAddonFolder\MyAddon\Functions
            
            class MyFunctionA {};    //name of file "fn_MyFunctionA" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
            class MyFunctionB {};    //name of file "fn_MyFunctionB" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
            class MyFunctionC {};    //name of file "fn_MyFunctionC" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
        };
        class ExampleForFolderSortingB
        {
            file = "\MyMainAddonFolder\MyAddon\Functions";    //P:\MyMainAddonFolder\MyAddon\Functions
            
            class MyFunctionZ {};    //name of file "fn_MyFunctionZ" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
            class MyFunctionX {};    //name of file "fn_MyFunctionX" in Folder: "P:\MyMainAddonFolder\MyAddon\Functions"
        };
    };
};
#

in PboProject you would select the Folder "MyAddon", wich results in the "MyAddon.pbo"

little eagle
#

Dscha, I don't want to restart the game every time I change a function

#

CfgFunctions is not an option

jade abyss
#

Do you Function Testing like veryone else

#

In the DebugConsole

#

"CfgFunctions" not an option... oh my

little eagle
#

Your ways are quaint

jade abyss
#

[] spawn
{
MyCodeIWannaTest;
};
When done -> CfgFunctions

#

so your reason is not existing ๐Ÿ˜„

little eagle
#

๐Ÿคฆ

jade abyss
#

Mr.Macro, shush

runic spoke
#

^^

little eagle
#

Quiksilver, some people make addons and don't want to recompile their functions at every mission start

#

"old"

jade abyss
#

silly missionmaker

little eagle
#

Whatever helps you sleep at night.

jade abyss
#

and then, there are ppl like you ๐Ÿ˜„

tough abyss
#

I'd like to thank everyone for their help. But I've came to the conclusion that I've fucked up something during packing, and that there's no way to unfuck it. Therefore, I will just wait for it to unfuck itself.

little eagle
#

build.py works for me, but I can't test make.py, because who uses the P drive these days ...

#

I have minions for releases ๐Ÿ˜›

tough abyss
#

Addon's fine, Arma doesn't see it. I'll wait for Arma to fixes itself ๐Ÿ˜

#

Did I create malware?

#

Fuck me...

nocturne bluff
#

P drive is fucking worst thing ever.

#

I dont really see why i need all the games content unpacked on a seperate wonky mounted drive.

rancid ruin
#

"the daily mail is calling your mod a tool to recruit members to ISIS"

#

yeah Head it is ridiculous...i only have SSDs so i can't really justify duplicating arma

#

it's pretty massive install already without having 2 copies

nocturne bluff
#

Should just fetch the needed files from the pbos.
I had kinda that working for includes.
It would just scan the pbo prefix and snag the included files out of it

#

Managed build my addon with CBA includes~

little eagle
#

@tough abyss Even worse is when they offer a fix that doesn't work.

#

For a problem that doesn't exist

jade abyss
#

But its clearly your fault!

#

Don't you see?

#

No other reason possible.

little eagle
#

Especially when one of them uses onEachFrame {} and onPlayerConnected {}

#

...

nocturne bluff
#

I always put my per frame code in onEachFrame.

#

My code is better than commys anyway.

#

๐Ÿ‘๐Ÿฟ

little eagle
#

than*

jade abyss
#

shaddap Commynist.

#

^^

halcyon crypt
#
[1:10 PM] commy2: Dscha, I don't want to restart the game every time I change a function

๐Ÿค”

little eagle
#

Well the other way around. Exile broke, because their onPlayerConnected which did some funny "Bambi" thing and was overwritten by the properly used addStackedEventHandler

nocturne bluff
#

Aw shit

#

Why you break things by using these functions man??

little eagle
#

ikr

#

It's funny when you get complains about "Bambi".

#

No one knew what the fuck they were talking about. Bambi... as in the disney thing?

rancid ruin
#

so wtf were they talking about?

little eagle
#

Something about achivements / inventory persistence,

#

"Bambi Creation Failed"

ionic orchid
#

bambi is a fresh character

#

some youtuber popularised it

little eagle
#

No, bambi is a deer

#

Stop making up things

#

"Fresh Character creation failed"

#

That should've been the error message

#

Then someone would at least know what to look for

#

My first thought was spawning animals or something

little eagle
#

Every ACE update is called banana

nocturne bluff
#

I call it being lame

#

My updates are called 2.1.2.4

#

eeryone of them.

#

Dont need version numbers.

jade abyss
#

๐Ÿคฆ

open tendon
#

Hey, anyone knows how to use Arma_3_Dynamic_Simulation ingame diagnostics?

#

Im reading the wiki but dont get it

#

it mentions 3 modes bDynSimEntities DynSimGroups DynSimGrid

#

but how do I enable em

still forum
#

the scripting executor VM is mapped to a single Kernel layer thread Not a VM. And WTH is a Kernel layer thread
And the tedious debugging begins. I get an IDE.. You know... @tough abyss There are actually two Arma IDE's with integrated Debuggers....

vague hull
#

Wasnt Kernel layering (as a model) just used as a description of how the (micro-)kernel works? ^^

#

And even if you assume that the thread would run in "Kernel mode", I need to dissapoint you

half monolith
#

I have a question about the bohemia saveloadout function, i have googled it for a bit. If someone saves the loadout and they have a grenade launcher and one in the tube, they lose it(the one in the tube. Im pretty novice at scripting so i dont even know where to begin but im looking for a way to resolve this.

dusk sage
#

Are you referring to getUnitLoadout?

scarlet spoke
#

How can I get the config class of a vehicle?

#

When I have the vehicle object given

still forum
#

typeof

#

configFile >> "CfgVehicles" >> (typeof _vehicle)

scarlet spoke
#

Thx

#

Aren't there any sub-classes in CfgVehicles?

#

Like Car and stuff like that?

still forum
#

Yes... There is a class called Car in CfgVehicles

half monolith
#

no when i use this, it makes the grenage in the tube of weapon dissapear

#

[player, [profileNamespace, "Var_SavedInventory"]] call BIS_fnc_loadInventory;

tough abyss
#

Personally I have used this:

_gear = getUnitLoadout player;
player setUnitLoadout _gear;

#

@half monolith

half monolith
#

thankyou for some direction ๐Ÿ˜ƒ

#

see if i can figure it out i am trying to replace a scripted function that seems to have glitch with watches , it is really outdated.

tough abyss
#

I used the above to save gear loadouts in a database and load it upon joining, as well as saving gear as they leave base so when they spawn back in after death, their gear is loaded then too.

#

I haven't tested it specifically for magazines within the launcher, but worth a shot.

half monolith
#

well im using it as an action on a box to save a loadout after leaving arsenal so upon respawn, you dont have to enter arsenal.

tough abyss
#

Ok. So then have the action do this:

_gear = getUnitLoadout player;
_gearString = format ["%1", _gear];
player setVariable ["playerGear", _gearString, true];

And upon loading the gear, you can do this:

_gear = player getVariable "playerGear";

if (typeName _gear == "STRING") then {
    if (_gear == "") then {
        while {_gear == ""} do {
            _gear = player getVariable "playerGear";
            sleep 1;
        };
    };

    _gearFinal = call compile _gear;
};

if (typeName _gear == "ARRAY") then {
    if (count _gear < 1) then {
        while {count _gear < 1} do {
            _gear = player getVariable "playerGear";
            sleep 1;
        };
    };

    _gearFinal = _gear;
};

player setUnitLoadout _gearFinal;
half monolith
#

novice quesrion, should i run these alone or with the bis function as well?

tough abyss
#

Works on its own. No need for the bis function.

half monolith
#

ok giving it a shot thank you

tough abyss
#

Of course

#

Although the second function is specifically tailored for waiting for playerGear to be defined (waiting for the value to be retrieved from the database). So you can probably just use the following:

_gear = player getVariable "playerGear";

if (typeName _gear == "STRING") then {
    _gearFinal = call compile _gear;
};

if (typeName _gear == "ARRAY") then {
    _gearFinal = _gear;
};

player setUnitLoadout _gearFinal;
half monolith
#

ok i saved the first snippet to my save script as is, and the second to the load script as is (overwriting all) and when i try the load after save i get a undefined expression in _gearfinal

tough abyss
#

Are you in the editor?

half monolith
#

yes

tough abyss
#

Run this in the debug console watch section and see what it says:

player getVariable "playerGear"
dusk sage
#

@tough abyss Don't forget you have the command isEqualType now ๐Ÿ˜ƒ

half monolith
#

i went to arsenal picked loadout, saved it, then back to arsenal randomize.. then tried the line in debug. nothing

tough abyss
#

Actually, let's simplify it. Make this your save script:

player setVariable ["playerGear", getUnitLoadout player, true];

And this your load script:

player setUnitLoadout (player getVariable "playerGear");
#

You're saving using the arsenal?

#

This isn't attached to the arsenal in any way.

half monolith
#

i have predifined loadouts that i load

#

then save on the box

#

no save on exit arsena

tough abyss
#

Ok. Just try the above.

half monolith
#

golden

tough abyss
#

Sweet

half monolith
#

thats awesome man

#

thank you

#

now how does this work

#

i had a problerm with mission vs player in the beginning because i found if someone had something saved from another server with say thermals which i have blacklisted, it will still load thermals and all despite this. thats using playernamespace, missionnamespace doesnt allow for that "cheat" (im sure someone would figure it out)

tough abyss
#

As in be able to load whatever they want via the arsenal?

#

So you want to restrict items in the arsenal?

half monolith
#

also have another glitch,. this one has to do with the arsenal function im using writtin by someone else.

#

yeah

#

i have a working whitlest using a hacked up version of larrows written function.

tough abyss
#

You can do it using vanilla methods

half monolith
#

im updating the aas tremplate, to thid century

#

yeah

#

i have a bbackup to this function

#

ready to go

#

may have to use it

#

but its still whitelist

#

and i really want blacklist

#

to blacklist with van methods i technically have to whitelist everything though?

tough abyss
#
_basicWeapons =
[
    "arifle_MX_F",
    "hgun_P07_F"
];

_basicMags =
[
    "30Rnd_65x39_caseless_mag_Tracer"
];

_basicItems =
[
    "U_O_CombatUniform_ocamo"
];

_basicPacks =
[
    "B_AssaultPack_khk"
];

Arsweapons = _basicWeapons;
Arsmagazines = _basicMags;
Arsitems = _basicItems;
Arsbackpacks = _basicPacks;

["Preload"] call BIS_fnc_arsenal;

[player, Arsitems, false, false] call BIS_fnc_addVirtualItemCargo;
[player, Arsbackpacks, false, false] call bis_Fnc_addVirtualBackpackCargo;
[player, Arsweapons, false, false] call BIS_fnc_addVirtualWeaponCargo;
[player, Arsmagazines, false, false] call BIS_fnc_addVirtualMagazineCargo;

["Open",[nil,player]] spawn BIS_fnc_arsenal;
half monolith
#

this is similar to what i wrote

tough abyss
#

Official way of doing it. Although you can't stop them from loading presaved ones, so I got some scripts to override the official functions to whitelist saved ones.

little eagle
#

Although you can't stop them from loading presaved ones

#

lol

tough abyss
half monolith
#

if !( isServer ) exitWith {};

if(playerSide == east) then {

    [_mybox, true, true, false] call BIS_fnc_addVirtualWeaponCargo; // array of weapon classnames
    [_mybox, true, true, false] call BIS_fnc_addVirtualItemCargo; //array of items classnames
    [_mybox, true, true, false] call BIS_fnc_addVirtualBackpackCargo; classnames
    [_mybox, true, true, false] call BIS_fnc_addVirtualMagazineCargo;
    ["Open",false] call BIS_fnc_arsenal;        
};

};

#

ok

#

thats what i came up with

#

its gotta be side specific too lol

#

id add the lists and remove the true

jade abyss
#

```sqf
CODE
```
โ˜ Do that

half monolith
#

like i had done it this way in the first place, until i got stopped by not knowing simple things like

#

if(playerSide == east) then {

#

sqf

#

?

jade abyss
#

To the code you paste in here.

half monolith
#

ahh

jade abyss
#

Makes it easier to read.

half monolith
#

noob lol

#

was wondering how to

#

you guys are a great community

digital pulsar
#

has anyone managed to get BIS_fnc_ambientAnimCombat working reliably in MP on dedi?

tough abyss
#

@UD1E#2095 Just do this:

switch (playerSide) do {
    case west: { [] execVM "westGear.sqf"; };
    case east: { [] execVM "eastGear.sqf"; };
};

Then in each of those files assign the gear to be whitelisted.

plush cargo
#

There is probably a few ways to stop players from using saved loadouts. First thing that comes to mind is find the idc of the button controls "save" and "load" and hide them on when arsenal is opened

little eagle
#

Can't you still open the load menu with ctrl + l ?

plush cargo
#

ahh i guess

#

so find the idc of the load menu and hide that

little eagle
#

well you can't really hide it when ctrl + l makes it show up in the first place

plush cargo
#

waitUntil is shown ctrl

#

hide ctrl?

tough abyss
#

@plush cargo @little eagle easy. Use the files I posted above to overwrite the actions in the arsenal.

little eagle
#

waitUntil huh. So all I need to do is to set my view distance to 12 km and be quick before the scheduler decides to run the thread again ๐Ÿ˜ˆ

plush cargo
#

lol

#

didnt see that garrett

tough abyss
#

Then add this in your functions.h or Cfgfunctions:

class overrideVATemplates
{
    tag = "arsenalFunctions";
    class Inventory
    {
        file = "scripts\arsenalFunctions";
        class initOverride { postInit = 1; };
        class loadInventory_whiteList {};
        class overrideVAButtonDown {};
        class overrideVATemplateOK {};
    };
};
#

And I believe that is all I did to activate it.

jovial ivy
#

When using the [] call BIS_fnc_GUIeditor; editor I can extend from the workspace provided correct?

plush cargo
#

Not sure, I hate the gui editor

tough abyss
#

Second that.

plush cargo
#

calculator ftw

tough abyss
#

I stay away from GUI's in Arma haha

plush cargo
#

i love them ๐Ÿ˜ƒ

scarlet spoke
#

Does somebody has an idea why a vehicle is destroyed (it's Killed EH triggers) but when obtaining the damage of the vehicle it's not 1...

#

Sometimes it is as low as ~0.2

tough abyss
#

Why do you need the damage if you know it is destroyed?

little eagle
#

Wait. Negative?

scarlet spoke
#

@tough abyss doesn't matter at this point

#

But fact is that I do need it and it's not correct

plush cargo
#

~ = approximate commy

jovial ivy
#

Guess im staying within the lines ๐Ÿ˜›

plush cargo
#

you're right, he's always giving others breaks.............................

#

lmao

#

gotta keep him on his toes

#

needs params ["_type","_type","_classname"];

jovial ivy
#

Hey I mean that ~0.000001ms could count in Arma.

jade abyss
#

Every ms counts!

#

Make Scripting great again!

#

We will build a paywall! And the Community will pay for it!

plush cargo
#

gonna be the best paywall, youll see

little eagle
#

~0.2
would be approximate

#

oh

#

damn this font is small

plush cargo
#

lol yeah just a blurry lil line

still forum
#

@jovial ivy 0.000001ms is one nanosecond. No that doesn't count.

little eagle
#

I don't have a scrollwheel (no mouse), but ctrl + num + works

tough abyss
#

I like making my code like this:

AH29e4e59263b38191a8 = { private ["_AH3f546d9751a527bfc", "_AHe804a40dc3fd1fccf", "_AH5a01b6da2dfb75ab2", "_AHb9f46fba64bf7545e", "_AH6f56fd1951a358dab", "_AH60c3b947e760c433a"]; _AH6f56fd1951a358dab = ["LeadTrack01b_F_EXP", "LeadTrack02_F_EXP", "LeadTrack04_F_EXP"]; _AH60c3b947e760c433a = _AH6f56fd1951a358dab call BIS_fnc_selectRandom; player removeEventHandler ["FiredNear", firefightEH]; _AH3f546d9751a527bfc = ["AH69eb4fb98a43608673", "AHdf0affb4cbb717f88c", "AHea01a0c9f01a0c294c", "AH794cb58a10337a6a66", "AH1e941fad0572661df8", "AH2af94cafafe6478ca7", "AHc7290cce7ac55e3c30"]; _AHe804a40dc3fd1fccf = getPos player; _AH5a01b6da2dfb75ab2 = player distance2D (getMarkerPos (_AH3f546d9751a527bfc select 0)); { _AHb9f46fba64bf7545e = player distance2D (getMarkerPos (_x)); if (_AHb9f46fba64bf7545e < _AH5a01b6da2dfb75ab2) then { _AH5a01b6da2dfb75ab2 = _AHb9f46fba64bf7545e; } } forEach _AH3f546d9751a527bfc; if (_AH5a01b6da2dfb75ab2 <= 150) then { [_AH60c3b947e760c433a] call AHe6813ce80ad7fac185_fnc_playMusic; waitUntil { !AH0d8ea34710a288eeee }; sleep 120;        firefightEH = player addEventHandler ["FiredNear", { [] spawn AH29e4e59263b38191a8; }]; } else { firefightEH = player addEventHandler ["FiredNear", { [] spawn AH29e4e59263b38191a8; }]; }; }; firefightEH = player addEventHandler ["FiredNear", { [] spawn AH29e4e59263b38191a8; }]; 
subtle ore
#

0_o

plush cargo
#

ffs delete that

tough abyss
#

Makes it fun for code stealers

jovial ivy
#
    private["_AH3f546d9751a527bfc", "_AHe804a40dc3fd1fccf", "_AH5a01b6da2dfb75ab2", "_AHb9f46fba64bf7545e", "_AH6f56fd1951a358dab", "_AH60c3b947e760c433a"];_AH6f56fd1951a358dab = ["LeadTrack01b_F_EXP", "LeadTrack02_F_EXP", "LeadTrack04_F_EXP"];_AH60c3b947e760c433a = _AH6f56fd1951a358dab call BIS_fnc_selectRandom;player removeEventHandler["FiredNear", firefightEH];_AH3f546d9751a527bfc = ["AH69eb4fb98a43608673", "AHdf0affb4cbb717f88c", "AHea01a0c9f01a0c294c", "AH794cb58a10337a6a66", "AH1e941fad0572661df8", "AH2af94cafafe6478ca7", "AHc7290cce7ac55e3c30"];_AHe804a40dc3fd1fccf = getPos player;_AH5a01b6da2dfb75ab2 = player distance2D(getMarkerPos(_AH3f546d9751a527bfc select 0)); {
        _AHb9f46fba64bf7545e = player distance2D(getMarkerPos(_x));
        if (_AHb9f46fba64bf7545e < _AH5a01b6da2dfb75ab2) then {
            _AH5a01b6da2dfb75ab2 = _AHb9f46fba64bf7545e;
        }
    }
    forEach _AH3f546d9751a527bfc;
    if (_AH5a01b6da2dfb75ab2 <= 150) then {
        [_AH60c3b947e760c433a] call AHe6813ce80ad7fac185_fnc_playMusic;
        waitUntil {
            !AH0d8ea34710a288eeee
        };
        sleep 120;
        firefightEH = player addEventHandler["FiredNear", {
            [] spawn AH29e4e59263b38191a8;
        }];
    } else {
        firefightEH = player addEventHandler["FiredNear", {
            [] spawn AH29e4e59263b38191a8;
        }];
    };
};
firefightEH = player addEventHandler["FiredNear", {
    [] spawn AH29e4e59263b38191a8;
}]; ```
#

๐Ÿ˜›

subtle ore
#

Oh shiet.

tough abyss
#

Have fun

jovial ivy
#

The variables might be a, what the hell.

little eagle
#

@tough abyss

_type = _this select 0;
_type = _this select 1;

๐Ÿค”

tough abyss
#

forgot to "encrypt" the firefightEH lol

#

All the files/folders are like the variable names too bahaha

jovial ivy
#

lol. Formatting it into shape is the easiest part. I just used some random online javascript formtting thing ๐Ÿ˜›

#

Whenever I choose to look into peoples mission files they have all of their .sqf code in a single line lol.

tough abyss
#

I may have. It is finished. Just didn't have the time for a proper release yet.

little eagle
#
  1. close mission
  2. shift + delete the mission folder
tough abyss
jovial ivy
#

What text color goes good on a greyish background?

plush cargo
#

white with a shadow

jovial ivy
#

Can I do that with the GUI editor? lmao

#

I figure I can do white. But not entirely sure if I can do the shadow.

plush cargo
#
            class textScrolltext: RscStructuredText
            {
                idc = 28201;
                x = 0;
                y = 0;
                w = 0.28 * safezoneW;
                h = 1;
                text = "";
                colorText[] = {1,1,1,1};
                shadow = 0;
                colorBackground[] = {0,0,0,0.25};


            };
scarlet spoke
#

@tough abyss you were right about the hitpoints... Is there a way to get the "critical Hitpoints" of a vehicle?

jade abyss
#

"critical"?

little eagle
#
  1. close mission
  2. shift + delete the mission folder
jade abyss
#

HitFuel, HitEngine, HitChartShow

#

(hint: One of them is wrong)

plush cargo
#

will be more for aircraft

jade abyss
#

prolly

#

Engine 1, Engine 2 etc

#

Fuel = boom

#

Engine = engine off

#

Hull = nothing or explosion (depends on Cfg entry)

little eagle
#

Nope, hard coded

#

And depends on the simulation type

jade abyss
#

For Tanks... Puh... thats more difficult...

little eagle
#

Soldier = HitHead and HitBody

jade abyss
#

HitHands = Can be 1

scarlet spoke
#

And what about vehicles?

jade abyss
#

same for HitLegs

little eagle
#

Vehicles = HitFuel and HitHull or HitBody (can't recall)

jade abyss
#

The new stuff, no clue

little eagle
#

HitHead and HitBody kills a soldier if >0.9

#

selection doesn't matter

scarlet spoke
#

Thanks guys!

little eagle
#

hitpoint name does

jade abyss
#

@scarlet spoke That was just for Cars!

#

Tanks etc got others

#

many more others

plush cargo
#

= 0.9 on a veh will destroy it sometime iirc

jade abyss
#
if (_damage >= 0.98) then
{
    if (_selectionName in ['head','body','']) then
    {```
#

better

little eagle
#

omg Dscha

jade abyss
#

sup commy2 (okay, you edit, i edit)

plush cargo
#

could hardly read those two lines wo the formatting

jade abyss
#

you see! โ˜

#

Worth it

little eagle
#

Also, HitFuel doesn't kill a vehicle immediately

jade abyss
#

Fuel leaks -> Then explodes

little eagle
#

It starts a timer

#

But it's only like a few seconds

jade abyss
#

4-5

#

At least, the last time i checked.

little eagle
#

Pretty quick, but not immediate

jade abyss
#

prolly some more
secondaryExplosion = 1000000;
fuelExplosionPower = 1000000;

little eagle
#

Secondary explosions from cooking off ammo

jade abyss
#

*fuel

little eagle
#

And fuel

plucky beacon
#
class CfgFunctions
{
    class DNI
    {
        class startup
        {
            file = "\DNI_ZeusFPSMonitor\functions";
            class init_FPS{postInit = 1;};
        };
    };
};

Warning Message: Script \DNI_ZeusFPSMonitor\functions\fn_init_FPS.sqf not found
but whyyy

#

For an addon btw

#

obviously

still forum
#

Obviously the path is wrong

plucky beacon
#

gaaah wasn't the path it was the tag

tough abyss
#

obviously

#

๐Ÿ˜‚

plucky beacon
#

obviously

rancid ruin
#

hey don't disrespect rocket's SQF guys

#

name one more person who became a millionaire from writing SQF

#

i'll wait

#

woops wrong channel. but still.

polar folio
#

millionaire? didn't know that

jovial ivy
barren magnet
#

Hi @rancid ruin <-- this guy

rancid ruin
#

hello

barren magnet
#

A millionaire in fun and experince though ๐Ÿ˜„

rancid ruin
#

he sold the game to BI and gets royalties AFAIK @polar folio

#

recently admitted to wasting "millions" on that failed ION game

#

and has a lambourghini

#

definitely millionaire

barren magnet
#

well leasing i guess

#

photoshop

#

and a bit of pr

#

People who are really smart and rich would never tell you that directly

rancid ruin
#

maybe he's just rich then

barren magnet
#

but honestly this does not belong into scripting channel sry - dont respond to post further just switch channel ๐Ÿ˜‰

rancid ruin
#

well someone was poking fun at his SQF in general and i replied in the wrong channel, calm down bro

oblique bluff
#

is this not working?

"A3\Sounds_F\sfx\alarm_independent.wss" remoteExec ["playSound3D"];
little eagle
#

Probably not

#
["A3\Sounds_F\sfx\blip1.wav", player] remoteExec ["playSound3D"];

playSound3D needs at least these two arguments.

oblique bluff
#

thx

tough abyss
#

First time ive seen arma spew this out lol

18:09:02   Error position: <ใผ„ใผ‰ใผ“ใผใผ‚ใผŒใผ…ใปณใผ…ใผ’ใผ‰ใผใผŒใพ
18:09:02   Error Invalid number in expression
18:09:02 Error in expression <ใผ„ใผ‰ใผ“ใผใผ‚ใผŒใผ…ใปณใผ…ใผ’ใผ‰ใผใผŒใพ
18:09:02   Error position: <ใผ„ใผ‰ใผ“ใผใผ‚ใผŒใผ…ใปณใผ…ใผ’ใผ‰ใผใผŒใพ
18:09:02   Error Invalid number in expression```
#

and im not even chinese

#

or whatever that is

still forum
#

Atleast it's right. Thats definetly an invalid number

jovial ivy
#
    lbClear _cbo;
    {
        player sideChat Format["Loading Player: %1", (name _x)];
        _index = _cbo lbAdd(name _x);
        _cbo lbSetData[(lbSize _cbo), (name _x)];
    } forEach allPlayers;``` is what you would roughly use to add players to a scroll list?
arctic veldt
#

Anyone know hwo to add functioning radar to a planes init script so I can see targets?

idle steeple
#

How do i refrence an object in a script that is being run from the object init field? This problem probably doesnt make sense but yeah anyway thanks

vapid frigate
#

if init field = this execvm "yourscript.sqf", then in yourscript.sqf _object = _this

#

or you can just use _this in yourscript, or use params to get values out of an array you pass to it

idle steeple
#

i tried _this but i dont really know how to use it XD

#

Thanks anyway

vapid frigate
#

just like you would use this in the init field

idle steeple
#

this execvm "yourscript.sqf" doesnt seem to work

vapid frigate
#

might need nothing= this execvm "yourscript.sqf"

#

unless someone has a better way of preventing it returning

#

this execvm "yourscript.sqf"; nil maybe? havent tried that

idle steeple
#

init: type Script, expected nothing

#

comes up

vapid frigate
#

yeh put nothing= at the start will fix it

idle steeple
#

init: type bool expected nothing

#

so maybe without the true but i did that before

vapid frigate
#

nothing= this execvm "yourscript.sqf" should work

idle steeple
#

Ive put that in the object init (the object is a gate from apex)

#

and in the script is

#

_object = _this;

_object addaction ["test",""];

#

nothing still works

vapid frigate
#

does just putting this addAction ["test", ""] directly in the init field work?

idle steeple
#

it does yes but i wanted to put it in a script so i would have to keep copying or rerwiting the code

#

and just use the script instead

vapid frigate
#

yeah im not sure why that wouldn't work, assuming yourscript.sqf is in the root folder of your mission

idle steeple
#

yes

#

Nevermind about it, i had something in mind and just relised i could do what i was doing form the init field of the object my bad Lecks for wasting yoru time

blazing zodiac
#

How would I go about referencing a terrain object that doesn't have a classname? I basically want to create a blacklist for a cover system I'm working on so I can filter things out like the wirefences but typeOf doesn't return anything on them.

split coral
#

try getting the objects with nearestTerrainObjects

#

then maybe filter them by model names (getModelInfo) or by just type, for example "fence" in the nearestterrainobjects arguments

blazing zodiac
#

Perfect, getModelInfo was exactly what I needed

brazen reef
#

I wanna start scripting for a mission. Is there a way to manually control the gun of an AAA unit with a script?

#

I want to create some background tracerfire.

split coral
#

There's a module for that I think.

brazen reef
#

Oh?

#

Already in game?

split coral
#

yeah. I haven't used it in ages, but it should still be there

brazen reef
#

I'll check later.

split coral
#

no idea what it's called though

#

"tracers" maybe. ๐Ÿ˜„

peak plover
#

I've done that

#
gunner_1 setSkill 0.1;
gunner_1 disableAI "AUTOTARGET";
gunner_1 disableAI "TARGET";

nig_shoot_sky = {
    _gun = _this select 0;
    _t1 = _this select 1;
    _t = selectRandom _t1;
    gunner _gun setSkill ["aimingAccuracy",0.05];
    waitUntil {
        _gun setVehicleAmmoDef 1;
        sleep 10;
        [_gun,_t] spawn {_gun = _this select 0; _t2 = _this select 1;for "_i" from 0 to 250 do {sleep 0.1;_gun lookAt _t2};};
        sleep 10;
        for "_i" from 1 to 10 do {
            sleep random 1;
            _gun fire (weapons _gun select 0);
            _gun lookAt _t;
        };
        sleep random 10;
        !(alive gunner _gun)
    };
};
[zu_1,[skeet_1,skeet_2,skeet_3,skeet_4,skeet_5]] spawn nig_shoot_sky;

#

zu_1 is a zu-23 cannon. skeet_1 to skeet_5 are skeets floating high in the air with simulation disabled, so they don't fall or take damage.

#

This is the basics of it. You can pretty much adjust the rate of fire with this as well

#

Hope this gets you some ideas @brazen reef

turbid thunder
#

The problem about the module is that they can run out of ammo

peak plover
#

the tracers modules spawns an empty unit that shoots the sky :S

brazen reef
#

And since I am already hereThank you @peak plover

turbid thunder
#

Exactly

brazen reef
#

That looks pretty sweet.

peak plover
#

Just use that for ideas. I made it for a GRAD, sometimes the gunner would look away from the targets, so I had to use the sleep 10

brazen reef
#

Fucking gunner

turbid thunder
#

I remember when the module would spawn a boat and even though it was invisible you could still see the position lights

peak plover
#

it took about 10 seconds for my GRAD to set its gun up

#

hahaha, I love these fun things the devs have made

#

Looking at vanilla missions just makes me feel better about myself

turbid thunder
#

Well now its just a soldier with a gun. Still runs out of ammo

peak plover
#

Also most vanilla missions have pentagrams on them

turbid thunder
#

You mean like the campaign?

peak plover
#

Yeah

turbid thunder
#

I noticed that a few years ago when I looked into them

brazen reef
#

I mean it would be nice if I had enough players for things like tracers lighting up the night sky to happen automatically

#

But lmao

turbid thunder
#

That's semi creepy

peak plover
#

Yup

brazen reef
#

The only time that ever happened was in Planetside 2, when I joined a random assalt with lke 40 vehicles, and a few AAA tanks shooting at planes in the sky.

#

Legit a really awesome moment.

peak plover
#

Yeah, it just gives more atmoshpere and war feels

turbid thunder
#

@brazen reef oh yeah. PS2 at night is so pretty

brazen reef
#

Are there things like bright lights?

#

Simulating a burning city in the distance?

peak plover
#

I don't think so

brazen reef
#

Shucks.

turbid thunder
#

You could spawn a light

peak plover
#

I wish you could create artificial glow

brazen reef
#

Well I guess you could spawn normal fires.

turbid thunder
#

With custom settings

#

You can

#

Createvehicle, I just dont remember the classname for light source

#

Might actually be #lightsource

brazen reef
#

You would need to script it to make it flicker.

peak plover
#

Yeah ^

turbid thunder
#

Well nothing in arma happens on its own

peak plover
#
_light setposATL [0,0,0];
sleep 0.5;
_light setposATL _pos;```
#

flickers

turbid thunder
#

You could also adjust the brightness settings via scripts

peak plover
#

That's cash

jade abyss
#

SideNote: If you reach your Max. Light count -> They dissapear. Keep that in mind.

peak plover
#

Ohh yeah, any way to increase max light count? The update on CUP terrains made lights really flickery and dissapearing way too easy on takistan etc.

jade abyss
#

Not rly

#

Increase your settings ingame

#

But still doesn't change thath: What about the players, where the Setting is low? They don't see anything.

#

So... yeah, just a sidenote from me =}

turbid thunder
#

So it might not be so good for distant things at all

peak plover
#

I wish I could incrase the graphics more. I get the same FPS on LOW and MAX on most servers anyway

turbid thunder
#

Atleast you can have insane viewdistances

peak plover
#

A better DOF and particles would be cool too. hell yeah. The view distance is pretty good now. I play with 12k since 64bits

turbid thunder
#

I once set it to 40km and ran out of memory

#

Arma didnt like that

peak plover
#

so the viewdistance scripting command will change over 12k?

digital pulsar
#

is there a way to give priority to selected scheduled threads? something like nice in linux

digital pulsar
#

they're stuck in that animation for no reason

#

at no point do i make them switch animations or play actions

#

just a few operations with disableAI and enableSimulationGlobal

#

whenever I reset them with _x switchMove "", they immediately play that "drag" action

digital pulsar
#

restarting the dedi solved it

#

looks like a late april fools joke from bis

dusk sage
#

No @digital pulsar

#

You could control execution yourself though (assuming these are incredibly long running)

#

And prioritise

hollow lantern
#

In a script I defined a global variable A_AIRS_AVAIL = "readyFix"; Do I need to do something special in another script or will if (A_AIRS_AVAIL isEqualTo "readyFix") then {} will just work?

digital pulsar
#

as long as it's defined before running the if statement, you're fine

hollow lantern
#

well yeah I will execVM the script after the declaration

digital pulsar
#

sounds good

#

@dusk sage do you have any examples of implementation?

#

does dedi have any kind of "on each tick" handler?

#

I assume EachFrame is client only

austere granite
#

instead of changed animation source (I read the config entries and call those)

hollow lantern
#
comment "Define unit as ACE Medic // 0 = no medic; 1 = medic; 2 = doctor;";
unitName setVariable ["ace_medical_medicClass", 1, true];```
Thats for the ACE medic. Does somebody have it for the engineer thingy?
jade abyss
#

Thats why i use my own stuff only @Adanteh#0761 ๐Ÿ˜„

austere granite
#

well i like reading the useractions, because it means it's compatible with all the mods too

#

all non-BIS stuf is fine, plus the hatches on watchtowers and so are still good too ๐Ÿ˜ฆ

plucky beacon
#

I did it, I released my first mod, wohoo

jade abyss
#

I hope you got a "Thanks to" Area, or i will whip you buttocks back to the moon, Mr. Nitro.

#

๐Ÿ˜„

hollow lantern
#

Thanks to the Earth for helping me out lol

#

๐Ÿ˜„

#

thanks to the ACE repo, found my variable sqf comment "Define unit as ACE Engineer // 0 = no engineer; 1 = repair specialist; 2 = engineer;"; unitName setVariable ["ACE_IsEngineer", 1, true];

plucky beacon
#

//////////Help from Commy2, Dedmen, and Dscha////////////

hollow lantern
#

that should be it alltough I'm not sure if the values are correct

jade abyss
#

You better did that! ๐Ÿ˜„ DNI

plucky beacon
#

You going to call me by my prefix tag now?

#

Everytime I read it I think "Dinny"

jade abyss
#

good. Dinny.

plucky beacon
#

GAH

#

This was a mistake

#

I guess there's no takebacksies

jade abyss
#

Nope, Dinny.

hollow lantern
#

@plucky beacon well you could change the Help thingy to Discha ๐Ÿ˜„

plucky beacon
#

LOL

jade abyss
#

"the Help thingy" wow, i am a thing now.

plucky beacon
#

no you're a Dscha

#

1x Dscha

#

dshkm

#

Dscha

#

I rename my unit's config name for Dshkm to Dscha

jade abyss
#

Dinny, sush. Back to topic again =}

plucky beacon
#

Is it because I said config?

tough abyss
#

@jade abyss @little eagle I fixed yesterday's issue, it was a problem with signatures, to fix it I had to sign the addons through the AddonBuilder rather than packing them and then signing using DSUtil.

#

Blame BI I guess @open vigil ๐Ÿ˜„

plucky beacon
#

That's a lot of tagging

#

Im triggered

open vigil
#

So, you had to sign Vanilla addons?

jade abyss
#

?! I can't remember the problem anymore, tbh

open vigil
#

Or you messed up and had sign your OWN stuff?

tough abyss
#

It was my own stuff @open vigil.

jade abyss
#

*slaps*

#

@plucky beacon

plucky beacon
#

Ya?

#

Ow!

#

Domestic violence

#

Halp

open vigil
#

A simple "your were right" would have sufficed ๐Ÿ˜‰

jade abyss
#

^^

plucky beacon
#

Fm help im being abused by Dscha

tough abyss
#

Whatever makes you sleep better at night, mate ๐Ÿ˜›

plucky beacon
#

He keeps slapping me

open vigil
#

its not abuse, he calls it "man love".

plucky beacon
#

...

jade abyss
#

๐Ÿ˜‚

polar folio
#

how would i animate the wheels of a ca via script? _car aniamteSource ["Wheel", 1]; i was thinking. but not sure about the parameters

jade abyss
#

Wheel_1_1
But iirc those wheels must be enabled in the model.cfg before

#

(source="user")

polar folio
#

hm. so engine sources don't work? because the wiki has some turret examples so i thought i can just use what triggers normal driving anims

jade abyss
#

Use the cwr something Version of the Drone. Won't work with it.

polar folio
#

hm. so maybe "animate" will work better?

jade abyss
#

Lets take the example of the Turrets:
If "MainTurret" is not inside "sections[] =" part of the model.cfg -> It won't move

#

Then you need to add the Wheels to the Config under animationSources

polar folio
#

hm. shit. thx

thick oar
#

MainTurret a section?

#

You mean skeleton bones array

jade abyss
#

nope, Sections

#
class Animations: Animations
        {
            class mainTurret
            {
                type = "rotationY";
                source = "user";
                selection = "otocvez";
                axis = "osaveze";
....
...
...```
#

But yeah, in Bones also (but when its a Turret, it should be already in there, otherwise it wouldn't move at all)

thick oar
#

Yes. ๐Ÿ˜„

#

I was confused what was going on here.

jade abyss
#

๐Ÿ˜„

#

selection = "otocvez";<-- that must be in sections[]={};

#

(taking the example above)

thick oar
#

Whaaat. You configure your user animation bones as sections, not as bones? Why?

jade abyss
#

Oo

thick oar
#

Im honestly surprised this works at all...

jade abyss
#

tbh, could be just the same name

#

watching my other files

thick oar
#

Something's fishy here.

#

CfgModels >> someModel >> Sections[] is for defining swap textures and specific engine-side stuff like muzzleflashes, license plates (OFP tech) and the Squad XML surfaces.

jade abyss
#

CfgSkeletons

    class BaseVehicle_Skel : Car_Skel
    {
        isdiscrete = 1;
        skeletonInherit="Car_Skel";
        SkeletonBones[]=
        {    
            "motorblock",""
        };
    };
sections[]= { "motorblock" };
class Animations:Animations
{
     class motorblock            {source = "user";                selection = "motorblock";    axis = "";                    type = "hi  .... bla other settings .....   rceAddress="clamp";};
};

config.cpp:

class AnimationSources: AnimationSources
        {
            class motorblock        {animPeriod = 0.01;    source = "user";            initPhase = 0;};
        };
thick oar
#

Check your CfgSkeletons for that object.

jade abyss
#

*Updating Text on top, mom

#

taken from my Test Model for 2017mod

#

I removed everything unneded (other defines)

thick oar
#

there you go. motorblock is in the skeletonBones.

jade abyss
#

Of course it is

#

I never declined that ๐Ÿ˜„

thick oar
#

If "MainTurret" is not inside "sections[] =" part of the model.cfg -> It won't move

jade abyss
#

But yeah, in Bones also (but when its a Turret, it should be already in there, otherwise it wouldn't move at all)

thick oar
#

Thats what I am contending.

polar folio
#

basically what i want to know is, if you can make a vehicle drive by forcing its animations. the moving part is not important but rather the engine sound simulation

jade abyss
#

The moving wheels won't have an impact on the Driving Force, just4info. The vehicle won't move at all, only the wheels will turn around.

polar folio
#

yea as i said, the sound is what i need not the movement

thick oar
#

PX vehicle, or no PX?

polar folio
#

so how would i make its wheels turn then?

jade abyss
#

Sound gets triggered with the movement/Engine RPM etc of the Car

#

Not the wheels

thick oar
#

@jade abyss So unless you setObjectTexture something to your motorBlock you do not need it inside the sections[] array.

polar folio
#

k. i noticed a quad bike will do the tire rolling sounds when attached to a player while he moves. is that sound configurable per vehicle type?

jade abyss
#

If you wanna animate it, you have to @thick oar

#

Otherwise it won't move.

thick oar
#

No you dont

#

absolutely not.

jade abyss
#

yeah

thick ridge
#

anyone know anything about createSoundSource? Trying to figure out if a local-only sound source could be created

#

seems like it's global though

jade abyss
#

I had to add "MainTurret" to the Sections[] list to let Arma make me animate it Kalb

thick oar
#

You mean overriding engine-generated animation sources?

jade abyss
#

@thick ridge btw.: You will run in the problem: Sound stays static at the position it was created.

#

Nah, any animation Kalb

thick oar
#

Then you're wrong.

jade abyss
#

oihodhns

thick ridge
#

I've found you can move the sound source object

#

and the sound moves

jade abyss
#

kk

thick oar
#

Please have a look at the Test_Tank_01\model.cfg of the A3 sample sources and inspect the sections[] arrays.

#

Yet turrets still move on that tank.

polar folio
#

@thick oar i think Dscha means move turret via script commands

jade abyss
#

Yeah, the Turrets move there, Kalb. BUT: You can NOT use animate or AnimateSource on them

thick oar
#

So back to: You mean overriding engine-generated animation sources? ๐Ÿ˜„

jade abyss
#

Is it overriding them? hm :/

#

I think we talked about 10m aneinander vorbei ๐Ÿ˜„

digital pulsar
#

@thick ridge what about say3D?

thick oar
#

Yeh... but now I know what you were on about. Indeed, animateSource does not work on these engine-side animation sources that turn and elevate the turret.

#

Now you were saying that by declaring this via sections, you could. ๐Ÿ˜„

jade abyss
#

Yeah, for those you have MainTurret (or however its called) to the model.cfg =}

thick ridge
#

@digital pulsar that would work, but concerned about calling say3d over and over in a loop - maybe it's not a problem

jade abyss
#

Yeah, i did some playaround with some Tanks a few days ago, thats why i know it ๐Ÿ˜„

thick ridge
#

@digital pulsar I also like that I can move the sound source around, where as say3d gets stuck in that position

jade abyss
#

(trying to find an alternative to the "One man tank"-solution without AI)

thick oar
#

I thought you were saying that you can use cfgModels >> Animations without declaring the bones. ^^

jade abyss
#

NAH!!! ^^

thick oar
#

OFP had a lot of one-man tanks. That tech should still be around

thick ridge
jade abyss
#

Yeah, with AI as driver.

thick ridge
#

and then just move the trigger around

thick oar
#

even player as driver

jade abyss
#

+damnit, you know what.. i think i used your Tutorial back in OFP to get the Train in game ๐Ÿ˜„

thick oar
#

But I think this may not be possible anymore since Arma1 when turrets were revamped.

jade abyss
#

atm, its a fricking urgs. Not worth the effort, tbh. Solution with AI/Agent is the best so far.

thick oar
#

Oh the fun with fake turrets and invisible people inside.

jade abyss
#

oh my

hollow lantern
#

can I force a AI to repair a vehicle by command?

#

I'm not I want to use it in a script

thick oar
#

And RepairVehicle

hollow lantern
#

OA only. sure it will work in A3? ^^

thick oar
#

Yes ๐Ÿ˜„

hollow lantern
#

ok thanks

sweet canyon
#

need help with a script on exlie

tough abyss
#

@sweet canyon I don't think this is the place. Go to exile discord instead

jade abyss
#

Depends on

#

If it has something to do with the mechanic in Exile itself -> Their Discord might be a bigger help.

sweet canyon
#

well its more of a general question i am trying to get third person unlocked on trigger (like entering a zone)

#

its more of a arma 3 camera controls question

jade abyss
#

I am waiting for the question, what you did before etc

sweet canyon
#

ok well i have tried both ways enable third person in the diffculty from the A3profile then just try to do a check for if !player in zone then disable third person i have a script maybe you could look aty?

#

boths ways being enable third person in profiles and disable the do check for in zone then enable third person

jade abyss
#

```sqf
YourCode
```

sweet canyon
jade abyss
#

uiSleep 0.1;

sweet canyon
#

inArea... did not think about that thanks man

jade abyss
#

Create a Marker named. "ThirdAllowed", place it where you want 3rd allowed ->

if(player inArea "ThirdAllowed")then{//Enable3rd};
#

+the Size of the Marker can be used to determine the area. Size/Area of Marker -> inArea zone

sweet canyon
#

yeah ok instead of using mods location just make my own trigger then set to allow right thanks man

jade abyss
#

Not Trigger

#

Marker

sweet canyon
#

yeah marker sorry

jade abyss
#

rgr

#

gl hf gg no re

little eagle
#

Dscha, inArea also works with triggers and locations

rancid pecan
jade abyss
#

Yeah, but why placing a Trigger who checks every 0.5s for something?
And why placing a Location, when you can have the Size of the marker to declare the absolute size. Thats why ignore them

little eagle
#

Yeah, it doesn't make much sense.

jade abyss
#

Yeah ^^

#

I mean... the Trigger itself is like an Oldtimer Version of inArea

little eagle
#

The whole trigger framework is ...

jade abyss
#

crap?

#

bulls***?

#

Any other word

#

I think... in my whole time as selfproclaimed coder... i think i used trigger maybe 2-3 times

#

Hell, i even prefered "Pos distance pos" against Trigger

little eagle
#

I deleted more triggers in CBA code than I ever used in anything ever.

jade abyss
#

๐Ÿ˜„

little eagle
#

I used them twice I think. Once to debug how the hell they work and why they're used in CBA in some places

#

And once just to help someone in this chat.

jade abyss
#

I did a "Blitzer" in my early days, then noticed -> 0.5s ... ffs? Nope nope nope.

#

anyway, back to configraping

brazen sparrow
#

hey, has anyone worked out how to convert a [vectorDir, vectorUp] -> Eden rotation attribute

little eagle
#

wth is a "Eden rotation attribute"

jade abyss
#

wasn't it VectorFromTo?

brazen sparrow
#

VectorFromTo is vector between 2 points

jade abyss
#

We had that a few days ago in here, can't remember what the result was

brazen sparrow
#

only way to manipulate eden object and it actually save to the mission =/

jade abyss
#

"Rotation" ?

#

should be a simple VectorUp (no clue, haven't touched Eden in no other way than placing 1-2 Items)

brazen sparrow
#

if it was that simple... ๐Ÿ˜›

little eagle
#

[0,0,0] vectorFromTo (_vDir vectorAdd _vUp)

#

?

jade abyss
#

(btw.: I hate vector stuff)

brazen sparrow
little eagle
#

ah

brazen sparrow
#

there is no documentation ๐Ÿ˜„ ๐Ÿ˜„

#

as usual ๐Ÿ˜›

jade abyss
#

Proper Euler angles (z-x-z, x-y-x, y-z-y, z-y-z, x-z-x, y-x-y)
Yep, and i am out. hf.

#

I can burp on command, but Vectorstuff... nah, thx.

brazen sparrow
#

there are some BIS_fnc_getPitchBank, but it can be upto 10% inaccuate i think it said and it doesnt work anyway so

#

i can get the dir needed if its on a 2d plane

#

_vdir[1] atan2 _vdir[0]

#

ish

little eagle
#

I'd write something, but my internet is 404

#

I'd write something, but my internet is 404

jade abyss
#
commy2 - Today at 8:43 PM
I'd write something, but my internet is 404
I'd write something, but my internet is 404```
spammer
#

(i had that yesterday)

little eagle
#

Nah, it's my connection.

#
// ace_common_fnc_getPitchBankYaw
params ["_vehicle"];

(_vehicle call BIS_fnc_getPitchBank) + [getDir _vehicle]
#

This is what ACE uses^^

#

Why are you asking.

#

ah fuck connection

#

404

polar folio
#

shouldn't the weapon holder point upwards anyways?

#

ah

#

got a pic? of how you want it to be oriented?

little eagle
#

Just use the up vector of the table?

polar folio
#

you can use vectorFromTo and modelToWorld positions to get the right vectors

jade abyss
#

attachTo

little eagle
#

The upvector of the table

#

setVectorDirAndUp [[0,0,0],[0,0,0]];
That is invalid

brazen sparrow
#

[0,0,0],[0,0,0]

#

[[0,1,0],[0,0,1]] is default

#

facing north, standing up right

little eagle
#

Now I want to make simple object CfgVehicles versions of my weapons

#

to have them

brazen sparrow
#

so you want weapons to lay flat on a table?

little eagle
#

Doesn't attachTo make it already turn with the object it's attached to?

#

_weapon setVectorUp vectorUp my_table

brazen sparrow
#

u prob need to rotate the vectorUp of the table around the vectorDir 90 degrees then

#

๐Ÿ˜‰

jade abyss
#

wait

#

wasn't there something with Intersect?

brazen sparrow
#

the func rotates any vector around any axis

#

its exactly what your after

#

so my problem ๐Ÿ˜„

brazen sparrow
#

sqf vector -> eden rotation (eular angles)

jade abyss
#

What the hell are you trying to achieve?

brazen sparrow
#

sqf objects (map content) in to an eden mission so it can be editted

jade abyss
#

Whats sqf objects / map content?

#

A file, an array?

brazen sparrow
#

its irrelvent

#

i have the data

#

position classname vectors etc

#

i can position it fine but for objects with standard 3d vectors

#

anything rotated in 2d is fine

#

atan2 works

little eagle
#

Why don't you convert the vectors to polar coordinates and rotate them that way?

brazen sparrow
#

u can only rotate them and it save to the mission using set3denattr

little eagle
#
(_vdir call CBA_fnc_vect2Polar) params ["_mag", "_dir", "_elev"];

_dir = _dir + 90;
_elev = _elev + 10;

_vdir = [_mag, _dir, _elev] call CBA_fnc_polar2vect;
#

there. rotated 90 around z and 10 upwards

#

Hard to help any of you when you don't know the problem

#

shitty connection and glitching out monitor doesn't help

#

ffs

brazen sparrow
#

this is why i dont bother asking for help in here...

#

completely unnessesary comment there

arctic veldt
#

aye but it's a public discord, I assume with no specific rules of no unneccassary comments added

brazen sparrow
#

that code isnt what im after either.
I have a vectorDir + Up and want to convert it to what EDEN takes as a rotation.
Im guessing eden takes eular angles (not 100% sure tho)
This vector:
[[0.17101,0.975082,-0.141314],[-0.173648,0.17101,0.969846]]
Is represented in the eden attr as:
[10,10,10]

#

to rotate things in eden via script and have the translation saved, you HAVE to set the eden attr

#

setdir,setvector* dont save in the eden mission

polar folio
#

btw. to Quiksilver's issue. it's solved. but turns out the weapon will point to the left when created with CreateSimpleObject. thought i'd mention it since it's counter intuitive and good to know

#

i wonder if a vehicle will face the same way a weapon does inside the model in objectBuilder

#

aka inside the p3d