#arma3_scripting

1 messages · Page 500 of 1

carmine abyss
#

Okay @still forum I have always been kind to you. If you don't have a kind response back then don't answer at all especially when you assume I haven't looked anything up. As a matter of fact I have the wiki open all the time and just because it's open doesn't mean that I can fully understand what I am reading. Do me a favor and don't reply to me unless you can learn how to be nice to people okay?

still forum
#

¯_(ツ)_/¯

waxen tide
#

@carmine abyss I always feel bad when someone like Dedmen answers me since he's an incredibly capable person who, when helping me, is always wasting his time. Time he should spend on way more complicated shit. But that's just me. If he says your stuff doesn't make any sense, then it doesn't. When he says read the wiki, hell son, go read the wiki. And you would probably get a way better answer if you explained EXACTLY what you want to do, because from your code, i sure can't tell.

delicate lotus
#

well I think he wants to spawn items into 3 crates...

#

but yeah, that code makes zero sense what so ever

still forum
#

I expected you to tell me why you thought it returning "nothing" doesn't matter. Or that you tell me what you are trying to do.
Sorry that I handle you like most people here who come along with such a pile of pure nonsense code, they don't read wiki, because if they did they'd see by themselves that it doesn't make sense

spark sun
#

for [crate1, crate2, crate3] do
This is python code, isn't it ?

carmine abyss
#

Well you guys can stop saying I don't read the wiki because I spend a lot of time on there. I am trying to put 5 pieces of random loot in 3 crates. All crates having different loot. You also seem to not understand that just because something is posted on the wiki doesn't mean I understand it. I am not an expert. I am just someone trying to learn and sometimes it's easier to get an answer with a different explanation from someone else. You seem to be bothered by easy problems. If that's true then don't answer. Instead go gather some social skills you seek to lack and maybe you can then encourage newbies like myself to learn so we can then teach others. Your snarky replies not only don't help anyone, but they turn people away from wanting to learn a tough thing like modding a game like Arma.

dusk sage
#

no @spark sun

still forum
#

Granted. You chose the worse type of for loop that exists, which is at the same time also the worst documented one.

#

But if you just look there. You see a thing. That takes an array with 3 code statements.

You can't just throw apples at a lasagna and expect it to turn into applepie.

The parameters literally tell the for loop
Count from this, until this condition is true, and do this every time you want to go to the next element.

You are trying to tell it

This is a object. Iterate until this object. Do object every time you want to go to next element.
Again. Doesn't make sense.

The answer to your question is. Stop using that type of for loop. Forget that it ever existed. It's the purest pile of shit that you can imagine.
Even if you someday figure out how to use it. It's still worse than all alternatives that you could use.

proven crystal
#

do i add that systemchat eventhandler the same way as others? im a little confused

#
_index = _object addeventhandler ["cba_events_chatMessageSent", {    
     params ["_message"];
    ///        compare string _message with bombcodestring                         
}];    
#

?

still forum
#

No

#

Cba events

proven crystal
#

damn

still forum
#

not Arma engine events

proven crystal
#

never did cba events

proven crystal
#

yea yea was just looking...

#

so no adding to some object, but running onclients

#

?

#

so i couldnt really use them for AI for example, could I?

#

wll in some ways i guess

#

hmhmhm

#

well first ill see if i can get me a message. thanks

still forum
#

AI can't write text messages

#

So... No. You can't use it for AI's

proven crystal
#

thats certainly true ^^

#

i guess i meant potential other cba eventhandlers that might or might not be useful for AI

peak plover
#

Anyone know what particle effect the one is when you hit the ground and it sprays dust up

still forum
#

not a definitive one. It's defined in the material that you shoot on. When you say dust I guess you might mean the default dirt one?

#

CfgCloudlets >> ImpactDust2 maybe? No idea. Not enough time to find it now

waxen tide
#

@carmine abyss You still didn't properly explain what you're trying to do. You should work on your communication skills. Maybe if you stop spending so much time on being offended you'll find time for that.

carmine abyss
#

" I am trying to put 5 pieces of random loot in 3 crates. All crates having different loot. " Is exactly what I said. Not sure how can mis understand that. You guys do realise not everyone is at your level of coding right? There is such a thing as being new to something. Not everyone starts off at your level.

waxen tide
#

Sigh. YEAH YEAH SNARKY COMMENTS. PFFFF.
First, i think in the first like you meant to do a foreach loop, not for. Because you're looping thru an array of elements. The elements seem to be the names you assigned to your crates? Those names should be strings? So you need to put "" around them. I THINK. Your for loop is supposed to run 5 times i guess? Never used that notation.

for "_i" from 5 to 0 step -1 do {

};

That's what i always use. Seems more clear. Idk.
I can't really tell how many items you want and what the chances shall be because your code to do that is totally messed up. but you need to first to the selectrandom stuff, and then do the additemcargo. you're first adding and then selecting nothing, like dedmen said. and that [] spawn _rndmLoot; .... i've got no clue what you're on about. you would need to define something like:

_rndmLoot = { *code* };
[] spawn _rndmLoot;

I think. It's fucking 3 AM.

still forum
#

Those names should be strings? So you need to put "" around them. I THINK. not if they are variable names

carmine abyss
#

Thank you for the explanation @waxen tide, but honestly I joined the discord because I thought I would get friendly advice. Not thrashed because I dont know as much as you guys or my questions arent hard enough for your expertise. See you guys later.

waxen tide
#
{
    for "_i" from 5 to 0 step -1 do 
    {
        private _rndItem = selectRandom ["30Rnd_556x45_STANAG", "SmokeGrenade"]; 
         _x addItemCargo [_rndItem,1];
    };
} forEach [crate1, crate2, crate3];
#

🤔

still forum
#

private _addedItem = remove that and you're golden

waxen tide
#

oh, right. doesn't return jack.

#

So is he offended and leaving forever and telling he'll see us later?

#

Personally i'm offended by the lack of logic evolution manages to pack into a single person.

still forum
#

How about a slightly different approach. Because I don't like for loops

{
    private _amount = floor random 5;
    _x addItemCargo ["30Rnd_556x45_STANAG", _amount];
    _x addItemCargo ["SmokeGrenade", 5-_amount];
} forEach [crate1, crate2, crate3];
#

you get 5 items. A random amount of magazines, and the rest smoke grenades.

waxen tide
#

oh so the 2nd param for addItemCargo is the amount 😛 (i didn't even look it up)

still forum
#

Essentially the same thing as the other code "5 items.... ehh... "a random mix of two items and that 5 times"
Yeah.. Can't even verbally explain the other code.

waxen tide
#

yeah, makes more sense this way around.

still forum
#

I guess mathematically the randomness of mine is very suboptimal.
Not random enough for a mathematician. But good enough for this purpose

waxen tide
#
// BIS_fnc_rnd
9
peak plover
#

i know that feel

#

A lot of times

#

it's better to have some fake randomness

waxen tide
#

i sometimes call shuffle array twice in a row 😱

peak plover
#

Not that

#

More like

#

Change the chance of outcome based on previous outcomes etc.

#

like if there are 3 options

#

and it lands on 1st one 3 times in a row

#

It can still be random

#

But it would be boring

limber rune
#

Hey can someone help me out with something I'm trying to do

wide hamlet
#

depends if you tell us what it is 😛

limber rune
#

so for my server I want it so when you press join the server you skip the lobby(Done) and then a loading screen starts and you are frozen until it is over and after that you can move but I'm not sure how to do that part

peak plover
radiant needle
#

Is there a way to turn off all HUD via script?

peak plover
#

yes

#
showHUD (shownHUD apply {false});
showChat false;```
radiant needle
#

Will this work if HUD elements are forced in description.ext?

limber rune
#

@peak plover that link you sent was that supposed to help?

still forum
#

https://community.bistudio.com/wiki/startLoadingScreen
https://community.bistudio.com/wiki/disableUserInput
Also don't try to crosspost into my PM's. I'm not some personal helper ape, you crosspost, you loose any help from me.
It's also kind of a bad move. Why would you crosspost? Because you think the people that you already asked here are just gonna tell you shit? Why even ask here then?

Also https://discordapp.com/channels/105462288051380224/105781923573456896/422366953269886986 yeah. How about not being a dick to the people that you are asking for help?

limber rune
#

Uh? crosspost???

#

I'm not trying to uh?

#

and by me saying ^ to "Tennessee" I see why that could be taken in a rude way I was just asking because I have read that and i didn't know if he was sending that to me

#

I love how he brought something that he didn't know the full meaning to and tried and throw it on me for saying "Hi" to him via PM

thorn saffron
#

How do you deal with recursive forEach? like I have forEach inside forEach inside forEach, mainly asking about the `_x" and if it has to be changed inside the recursive forEach

still forum
#

private _otherVariable = _x

limber rune
#

and @still forum Thanks for the links

still forum
#

then use the new name inside the inner loop

thorn saffron
#
{
_containersWeaponsAttachements append weaponsItemsCargo (_x select 1);
    {
        {magicalCodeUsing forEach _x}
    } forEach _containersWeaponsAttachements;
} forEach _source;```
#

Do I define the private inside the bracket with the magical code?

still forum
#

no

#

You set a variable to _x

#

you should do that in the place where _x is what you want

peak plover
#
{
    _vehicle = _x;
    {
        _crew = _x;
        systemChat (name _crew + ' is inside ' + typeOf _vehicle);
    } forEach crew _vehicle;
} forEach vehicles;
thorn saffron
#

I'm trying to call a function but I get error here, a generic error in expression. What exactly is wrong here?


params ["_weaponContainers"];

private _containerWeapons = [[],[]];
{
(_containerWeapons select 0) append ((getWeaponCargo _x) select 0);
(_containerWeapons select 1) append ((getWeaponCargo _x) select 1);
} forEach _weaponContainers;```
#

I get the error at the forEach. I used a hint and the box does get passed into the function fine.

delicate lotus
limber rune
#

What is the use of "!isNil"

unreal leaf
#

tests whether the variable defined by the String argument is defined

#

! turns true in false and other way around

thorn saffron
#

Ah I figured it out, I was passing a single instance instead of an array.

limber rune
#

I'm looking at that link

#

I get it now thanks Jeroen

#

where would you define the string at?

unreal leaf
#

How does one use params in a way to add optional arguments while still checking if its a valid input? I know you can use param ["_var",0] but it returns true even if you give it for example ObjNull.

#

when you use isNil you need to give it a variable, this variable needs to be given in the form of a string

#

"_var"

#
isNil "_var"//returns false
!isNil "_var"//returns true```
limber rune
#

If I do this

waitUntil{sleep 0.05;```
3 Times will it go through each one and count the time for each?
still forum
#

sleep doesn't "count"

#

doing that 3 times would be useless as 3 times sleep of 0.05 == sleep 0.15

#

@unreal leaf you can use params to only accepts object. but nullObj is a object

#

if you want to check for null you need to do that manually

limber rune
#

progressLoadingScreen "number";
that number that has to be between 0-1 thats time?

still forum
#

A progress bar is a bar that shows progress between a start and a end. Between 0 and 1. 0% and 100%

limber rune
#

so if the player is frozen
"disableUserInput true"
at the start before the loading screen is starting
and then
startLoadingScreen ["Starting Servers L-S System"];
but during the loading screen how do I automaticly make it stop the loading screen after the mission is loaded?

still forum
#

Well. What does "mission is loaded" mean to you?

limber rune
#

meaning all the basic stuff that needs to be loaded when you press the slot in the lobby of the server like the mission file but I'm wanting it to just do it in a loading screen not loading in the lobby if that makes since

still forum
#

You can't

limber rune
#

I can't? I have seen a server that you press what slot you want then you load but it skips the loading mission until it shows there loading screen and then downloads the mission

still forum
#

You can do some complicated/clever #arma3_config in a mod to hide the lobby

#

but not via scripting in a mission script or something

limber rune
#

how would I do it via a mod?

still forum
#

You can edit the lobby dialog via config edits.
No idea how you'd hide the "loading mission" or display a loading screen before that happens

limber rune
#

I are ready did it where it skips the lobby but what point in skiping the lobby will it download the mission?

#

I was thinking that it will download it while its showing the loading screen

#

since it skips the lobby

#

so the server skips the lobby and then theres that spand that it downloads the mission until you are in is there is there a way to just when the player connects it turns the loading screen on until its done downloading it?

thorn saffron
#

Ok so I have this bit, it works, but there is an issue when a gun is not loaded and the magazine is a null. I tried adding an if but then the whole code just does not do anything and there is no error:


{
    _x params ["_primary","_barrel","_side","_optic","_magazine","_bipod"];
    _strippedWeapItems_name pushback _barrel;
    _strippedWeapItems_name pushback _side;
    _strippedWeapItems_name pushback _optic;
    (_strippedWeapons select 0) pushback _primary;
    _stripedMagazines pushback [(_magazine select 0), (_magazine select 1)];
    if ((count _x) == 7) then {
        //_bipod here is UGL magazine
        _strippedWeapItems_name pushback (_x select 6);
        _stripedMagazines pushback [(_bipod select 0), (_bipod select 1)];
    } else {
        _strippedWeapItems_name pushback _bipod;
    };
} forEach _strippingArray;```
#

The version checking for null


{
    _x params ["_primary","_barrel","_side","_optic","_magazine","_bipod"];
    _strippedWeapItems_name pushback _barrel;
    _strippedWeapItems_name pushback _side;
    _strippedWeapItems_name pushback _optic;
    (_strippedWeapons select 0) pushback _primary;
    
    if (!isNil "_magazine") then {
    {
    _stripedMagazines pushback [(_magazine select 0), (_magazine select 1)];
    };
    
    if ((count _x) == 7) then {
        //_bipod here is UGL magazine
        _strippedWeapItems_name pushback (_x select 6);
        _stripedMagazines pushback [(_bipod select 0), (_bipod select 1)];
    } else {
        _strippedWeapItems_name pushback _bipod;
    };
} forEach _strippingArray;```
still forum
#

null != nil

#

what is it? a null type, or nil, or empty string or empty array? all of them are very different

thorn saffron
#

If I put empty weapon in it pushes [<null>, <null>]

#

I see the issue now, I think

still forum
#

Yes. magazine will not be nil

limber rune
#

@still forum ? can I do that?

still forum
#

¯_(ツ)_/¯

limber rune
#

i guess no answer

tough abyss
#

Any idea how people make the shade of Altis a lot darker?

#

When you press M

limber rune
#

what do you mean?

peak plover
#

@tough abyss Top right, toggle textures

#

I think you can edit the map control as well

#

@limber rune You are trying to make it so the game goes from the lobby into the game but without the loading?

#

I don't get it

#

You want a fullscreen overlay image while it loads?

tough abyss
#

See how the map is a lot darker?

#

Is that a mission.sqm thing or is it script thing? (Thanks for your fast response)

limber rune
#

so when you press join it skips the lobby and it goes strait into game but I want it so it has a loading screen while the that time when your going in-game there a loading screen

peak plover
#

@tough abyss Script thing and check out this thread

tough abyss
#

Thanks ill take a look.

peak plover
#

@limber rune

limber rune
#

I know how to skip the lobby

peak plover
#

Right

limber rune
#

I'm trying to know how to instead of the lobby theres a loading screen while the mission downloads for the players

tough abyss
#

I don't think that is possible unless you're moded.

peak plover
#

Dedmen gave you an answer before:

You can do some complicated/clever #config_editing in a mod to hide the lobby
but not via scripting in a mission script or something
You can edit the lobby dialog via config edits. 
No idea how you'd hide the "loading mission" or display a loading screen before that happens```
#

Yeah

limber rune
#

I know that FacePalm

peak plover
#

look at this

#

maybe this code will have what you are looking for

limber rune
#

ok

#

hmmm ill look at the code and see but from what I know thats the loading screen after you press what slot you are in the lobby

peak plover
#

So

#

You want the game to do this:

#

When a player clicks join on a server

#

It starts to download the mission/load the map

#

Now an image will appear

limber rune
#

yes but its not a image it has like a progress bar and idk the logo of the server etc. and the background is what the player your join in as. Like lets say theres a list of 100 Civs slots only and you skip the lobby it will automaticly put you as the first one and go down the list so as the player it puts you as you can see what it sees but you can't move or do anythingdisableUserInput true until the loading screen is done

peak plover
#

You can't do anything when the mission is downloading anyway

limber rune
#

can I do it before the mission starts downloading like the loading screen starts then the mission downloads

peak plover
#

disableUserInput?

#

You can change the image and the loading screen like Dedmen said

thorn saffron
#

if I have an array that is just empty [] how do I make an if condition to check if it's empty? if (!isNil "_magazine") then { does not seem to work

peak plover
#

There is no reason to disableUserInput, you can't do anything anyway when it's downloading.
Use chat and hit esc are like the only things

limber rune
#

oh ok

still forum
#

_array isEqualTo []

#

array is equal to empty array == array is empty

pliant shell
#

is there any scripting command to return the RPM of a vehicle that isnt a helicopter?

still forum
#

Multiple people asked that over the last couple months

#

I haven't seen any "yes" answer so far

pliant shell
#

bummer, thanks

still forum
#

looked into things like animation sources and sound sources. but no joy so far

pliant shell
#

rpm can be an animation source

#

🤔

#

hmmm

thorn saffron
#

yes it is

still forum
#

Actually.. Not sure if we talked about non-advanced flight model helicopters. Or vehicles in general

pliant shell
#

you might have given me an idea

#

no i mean vehicles in general

still forum
#

There was also some problem with helicopters and rpm

peak plover
#

Woudl that be possible with intercept @still forum

shadow sapphire
#

Does anyone know of a way to say basically If (!HC1) exitwith {}; to preface a script, where HC1 is a specific headless client?

still forum
#

sure..... with lots of work 😄

#

That in itself no

shadow sapphire
#

Well, the HCs are already named, but it's still not working. It throws an error when I use the above. I'll read about the profile name, but they already are named in 3Den and can be paged using the names given.

If I go with;

If (isServer) exitwith {};
If (hasInterface) exitwith {};```

Then it runs on every headless client, where the effect I need is to run on one headless client.
still forum
#

It throws an error which?

#

to preface a script which script? preInit?

shadow sapphire
#

The script is a function defined in the function hpp.

limber rune
#

so how do I do it? lol so the image mod you send @peak plover that is it Kinda but how do set it up so it skips the lobby and then how do I make it do the loading screen no one has told me how to do it thats my main question how do I make it do the loading screen

still forum
#

that doesn't tell me anything

#

function hpp is not any kind of native game thing

#

it could literally be whatever

shadow sapphire
#

It's loaded from the description.ext? I don't understand what you want to know.

still forum
#

Also doesn't tell me what it is

#

there a tons of native game things in description.ext and you can script whatever into there too

#

I want to know what you are using.

#

And whether it's preInit or postInit or anything special

#

and how the script is called and from where

shadow sapphire
#

The script is called with this from a trigger condition:

[ThisTrigger] remoteExec ["ASG_FNC_GIP1", HC1];```

It spawns an AI group.
still forum
#

So the script can only possibly ever execute on "HC1"

#

Why do you need a check then?

shadow sapphire
#

Because there are three headless clients, and it spawns the AI group on every headless client.

still forum
#

[ThisTrigger] remoteExec ["ASG_FNC_GIP1", HC1]; but that only executes on HC1

shadow sapphire
#

I don't know what you want me to tell you, but when I run that line, the group spawns once for each headless client.

#

It uses the BIS_fnc_spawnGroup; if that clarifies anything.

#
If (isServer) exitwith {};
If (hasInterface) exitwith {};

params ["_trigger"];
_Base = (getpos _trigger);
_HQ = [_Base, INDEPENDENT, ["I_officer_F","I_medic_F","I_officer_F","I_soldier_UAV_F"],
[],["LIEUTENANT","PRIVATE","SERGEANT","PRIVATE"],[],[],[],180] call BIS_fnc_spawnGroup;```
#

That's the whole test script.

still forum
#

So the issue is that your remoteExec command executes the code on every HC. Even though you told it to only execute on HC1?

shadow sapphire
#

Correct.

still forum
#

does the trigger execute on server? (server only trigger)

shadow sapphire
#

In fact, if I remove the isserver/hasinterface, then it runs on the server and every client as well.

I don't know how to tell where the trigger is executing. If it executes on the server by default, then yes, it's executing on the server. I don't think it's currently a server only trigger, but it may be. I'll check.

#

No, it's not set to server only.

still forum
#

there is a checkbox in the trigger for "server only"

#

if the trigger executes everywhere

#

that means every client (including HC's and server) are now telling HC1 to spawn the group

#

meaning HC1 is spawning the group multiple times

shadow sapphire
#

Got it. That's magic. Good stuff.

still forum
#

which is also why your HC1 condition doesn't change anything. Because the script does indeed only execute on HC1. It just does that multiple times

shadow sapphire
#

In fact, for some reason, that's the only trigger I have placed in my whole test scenario without server only checked. That's wild.

#

Anyway, thanks a ton.

#

Well, I hate to have to report that nothing appears to have changed after checking that box. It still runs for every client as well as the server.

#

Yeah, still spawning on everything every time, regardless of if box is checked.

still forum
#

add diag logs to the code.
And also log "remoteExecutedOwner"

#

to see who remoteExecuted the code

#

it should only log in HC1's log. And remoteExecutedOwner is probably different for each execution

shadow sapphire
#

Forgive my ignorance, but I don't know how to do that.

still forum
#

in your script
diag_log ["ASG_FNC_GIP1 executed", _trigger, remoteExecutedOwner] Just as first line

shadow sapphire
#

I think I'm going to have to tell it to log this somewhere specifically, the headless client logs look like trash. I can't even identify the diag log.

still forum
#

just open the logfile in a editor and search for ASG_FNC

thorn saffron
#

How do I get backpacks that are in a box? I the getItemCargo does not return backpacks, I need their classnames and the count

limber rune
#

@still forum So how would I setup the loading screen?

still forum
#

¯_(ツ)_/¯

#

@thorn saffron everyBackpack
combine with typeOf

#

or is there a backpackCargo command maybe?

thorn saffron
#

ok backpackCargo returns the backpacks one by one, good enough

limber rune
#

@still forum ?

still forum
#

You don't know what it means when a human shrugs his shoulders?

limber rune
#

-_- thanks for the help

shadow sapphire
#

@limber rune, he can't help everyone with everything all the time. In fact, I think he's a bit too helpful, too many of us never learn how to adequately troll the wiki, the information is all there, just requires the time and willingness to dig through everything, then trial and error it all out. You shouldn't be ungrateful because he doesn't have all of the answers. Dedmen isn't the nicest or most patient person on the Discord, but he's certainly among the most helpful. I'm not trying to bitch you out, I'm just trying to get you to take a moment to think about what you seem to be doing.

still forum
#

for such advanced stuff as what he is trying to do. The information is probably not there.
It's a VERY nieche things. And you need to have advanced knowledge about many things to make such a thing

shadow sapphire
#

Anyway, @still forum, these are the only relevant logs I could scrape:

From my client/server log:

 8:12:16 Error in expression <[ThisTrigger] remoteExec ["ASG_FNC_GIP1", HC1];>
 8:12:16   Error position: <remoteExec ["ASG_FNC_GIP1", HC1];>
 8:12:16   Error Type Any, expected Number, Side, Object, Group, String```

From the headless client log:

```SQF
 8:12:16 ["ASG_FNC_GIP1 executed",6: <no shape>,0]
 8:12:16 ["ASG_FNC_GIP1 executed",6: <no shape>,0]
 8:12:16 ["ASG_FNC_GIP1 executed",6: <no shape>,0]```
limber rune
#

ya google for arma isn't the best

still forum
#

Could it be that your trigger executes before HC1 is done joining?

shadow sapphire
#

That's double tough. How good is the search engine for Killzone Kid's blog, haha?

#

Typically no, I am triggering it manually only after the headless clients have completely loaded and joined the mission. In fact, I don't even start the mission until they are all completed loaded in.

However this one time, I closed them, deleted their log files, then reopened them, and may have beaten them to the punch, but I gave them plenty of time.

#

Based on the number of AI spawned, I think the headless clients were all fully loaded for even the latest test.

still forum
#

,0] from your logs tells me either there is an error. Aka not remote executed. Or.. Dunno

delicate lotus
#

Short question, how would I use a function, like BIS_fnc_jukebox with remoteExec?

still forum
#

parameters remoteExec ["BIS_fnc_jukebox"]

delicate lotus
#

hmmm

#

I actually tried that and It didnt work. I guess I just have an syntax error or something.
Thing is though, BIS_fnc_jukebox uses an Array datatype as parameter, and this error contains a string, and then another array

still forum
#

"this error" ?

shadow sapphire
#

@still forum, thanks for putting me on track. I'm going to leave it alone for a while, but thanks a ton for the help this morning.

limber rune
#

@still forum do you know GUI Classes?

still forum
#

No

delicate lotus
#

nvmd Dedmen, got it working now.

#

Guess I just wrote too many [] at some of the tests

#

¯_(ツ)_/¯

knotty arrow
#

how can hide commanding menu , With showhud in description its bugged and hide addactions too

#

😦

pure blade
#

what is bugging? showhud works fine for me

thorn saffron
#

How do I set up the params so I can later select something like select _weaponCount instead of (taroShopInventoryArray select 0) select 1)

taroShopInventoryArray =
[
[[],[]], // weapon' class names and count [[classnames],[count]]
[[],[]], // magazines' class names and count [[classnames],[count]]
[[],[]], // items' class names and count [[classnames],[count]]
[[],[]] // backpacks' class names and count [[classnames],[count]]
];```
pure blade
thorn saffron
#

I tried making this, but it didn't work sadly,

taroShopInventoryArray params
[
["_weaponClass","_weaponCount"], // weapon' class names and count [[classnames],[count]]
["_magazineClass","_magazineCount"], // magazines' class names and count [[classnames],[count]]
["_itemsClass","_itemsCount"], // items' class names and count [[classnames],[count]]
["_backpacksClass","_backpacksCount"] // backpacks' class names and count [[classnames],[count]]
];```
delicate totem
#

I don't think you can use nested params like that. Is there any reason you're using subarrays instead of just one array with weaponclass, weaponcount, magazineclass, magazinecount, etc etc?

thorn saffron
#

So I have just one global being around

delicate totem
#

I mean why use

taroShopInventoryArray = [["_weaponClass","_weaponCount"],["_magazineClass","_magazineCount"],[etc],[etc]];

when you could just use

taroShopInventoryArray = ["_weaponClass","_weaponCount","_magazineClass","_magazineCount", etc, etc];
thorn saffron
#

ah the subarays are for recounting the items and being compatible with the addXCargoGlobal syntax

delicate totem
#

Ah yep. You could easily pull that data out for those commands as needed via select. In a bit of a rush at the moment sorry mate.
With what you were trying to do the first time I think you'd have to

_weapondata params ["_weaponClass","_weaponCount"];
_magazinedata params ["_magazineClass","_magazineCount"];
etc
#

Which doesn't seem efficient at all.

thorn saffron
#

Yeah, at least the array works, its just a bit harder to read the various selections.

dim owl
#

hi guys, so I have a problem.
I want to close a display with a button.
Here is ym code:

private _display = findDisplay 46 createDisplay "RscDisplayEmpty";

private _b = _display ctrlCreate ["RscButtonMenu", -1];
_b ctrlSetPosition [(0.325 * safezoneW + safezoneX),(0.35 * safezoneH + safezoneY),(0.14 * safezoneW),(0.22 * safezoneH)];
_b ctrlSetBackgroundColor [1,0,0,1];

_b buttonSetAction format ["(allDisplays select (allDisplays findIf {_x isEqualTo %1})) closeDisplay 1;", _display];

It says error zero dividor. Is there any other way to close the display on button click?

still forum
#

it says zero divisor because your findIf returns -1 because a display cannot be equal to a heap of garbage

#

you cannot just "format" things into a string and expect it to work

#

There are some things that happen to work when you turn them into a string. But they are the exception

#

solution is to store the display you want on your button as a variable

#

and then retrieve it again in the code

#

Don't know where this notion comes from that "format" actually inserts some magic kind of reference to any type of variable into a string

#

a string is a array of letters. There is no place for any magic variable references. That's not how that works.

dim owl
#

okay, thanks. I will store it temporarily as global var

proven crystal
#

can i not pass arguments wen i add an ace eventhandler somehow?

#

for some reason i dont like gobal variables

radiant needle
#

Anybody know why this isn't working?

waitUntil {!alive _Vehicle};
{
_Vehicle = vehicle _x;
_x action ["Eject",_Vehicle];
[_x, true, 99, true] call ace_medical_fnc_setUnconscious;
Sleep 3;
_x allowDamage true;
} forEach _Passengers;
#

If I test with _Vehicle setDamage 1 and _x setDamage 1 it works properly

winter rose
#

@radiant needle yes, waitUntil {!alive _Vehicle}; first line: _Vehicle is not yet defined!

#

tick "show script errors" in A3 launcher options for easier debug

radiant needle
#

sorry, that wasnt the whole script I pasted

#

_Vehicle is defined prior and does read out correctly when I do systemChat str _Vehicle

winter rose
#

don't re-define it… also, is _Passengers var defined?
pastebin your whole script plz

radiant needle
#
null = [(_this select 1)] spawn {
_Vehicle = vehicle (_this select 0);
_Passengers = fullCrew _Vehicle;
Sleep 10;
_Vehicle allowDamage false;
Sleep 1;
_Explosive01 = "DemoCharge_Remote_Ammo_Scripted" createVehicle position _Vehicle;
_Explosive01 attachTo [_Vehicle,[5,4.25,4]]; 
_Vehicle setDamage 0.75;
_Explosive01 setDamage 1;
_Fire01 = "test_EmptyObjectForFireBig" createVehicle position _Vehicle; 
_Fire01 attachTo [_Vehicle,[5,4.25,4]];
Sleep 0.75;
_Explosive02 = "DemoCharge_Remote_Ammo_Scripted" createVehicle position _Vehicle;
_Explosive02 attachTo [_Vehicle,[5,4.25,4]]; 
_Explosive02 setDamage 1;
_Fire02 = "test_EmptyObjectForFireBig" createVehicle position _Vehicle; 
_Fire02 attachTo [_Vehicle,[10.15,4.25,4]];
Sleep 3;
_vehicle allowDamage true;
systemChat str _vehicle;
waitUntil {!alive _Vehicle};
{
_x action ["Eject",_Vehicle];
[_x, true, 99, true] call ace_medical_fnc_setUnconscious;
Sleep 3;
_x allowDamage true;
} forEach _Passengers;
deleteVehicle _Fire01;
deleteVehicle _Fire02;
};
winter rose
#

also, sleep is wrongly placed

#

@radiant needle use pastebin.com next time plz (keep this one here)

radiant needle
#

It's executed through ares achilles by clicking on the plane

#

that's what (_this select 1) is

winter rose
#

also what works, what doesn't?

radiant needle
#

So the plane goes boom, receives the damage, but upon crashing it says type array expected object on the _x action

#

Systemchat is saying B ALpha 1-3:2 or whatever

winter rose
#

fullCrew returns… an array of arrays

#

use crew instead

radiant needle
#

LEt me test that

#

Doesn't seem to be working

winter rose
#

also for info, nowhere in your script are the passengers allowDamage false so they may die with the additional explosions (unless it is done in another script)

#

Doesn't seem to be working
→ what is the issue? the error message? the bug?

radiant needle
#

No error message, but they are not being removed from the vehicle and set unconscious

#

and yeah I was setting allowDamage manually, but I can easily throw that in the script

#

Maybe if I try vehicle _x in the action

#

instead of _Vehicle

winter rose
#

well, at least it reaches your code =)

just use _vehicle, don't redefine it

radiant needle
#

So I tried with (Vehicle _x) just incase and it still doenst work

#

So I have this for my script

#

and it runs through all the dismounts

#

but yet they stay in the vehicle and dismount 1 by 1 slowly

#

and aren't set unconscious

tulip hare
#

any scripts that prevent a vehcile from using certain ammo types? like disabling AT rockets for LAVs

radiant needle
#

So the problem seems to be with the eject action, beacuse if I replace it with setDamage 1 they do all die

west venture
#

@tulip hare removing a vehicle weapon's ammunition works, so long as there are no ways to rearm. Forgot the commands for that, though.

tulip hare
#

thank you I didn't know what to search in google.

radiant needle
#

Yeah this is definitely and issue with the eject action

#

No code errors though, it just doesnt eject them

#

Seems getOut works

peak plover
#

@radiant needle instead of using eject

#

You can use setpos

#

just set them right under/next to the vehicle

radiant needle
#

I actually used getOut and it worked as it did before

#

Seems like their behaviors got switched sometime between when I last used the script

minor moth
sweet ridge
#

Does anyone know of a better, less laggy way to implement walkable vehicle interiors? Ive tried WMO but wondering of there is another option.

limber rune
#

lol

#

what is a walkable vehicle interior?

west venture
#

It's where you can walk around in a moving vehicle. Specifically the moving part.

limber rune
#

oh like the thing in ace where you can move the tire to repair the vehicle?

west venture
#

No.

#

Like standing on the back of a moving truck or in the hold of a flying C-130.

limber rune
#

oh

#

ok thanks for explaining that to me

#

isnt another way is if your ping is like 0 to the server lol

#

lol

calm bloom
#

Hi guys. Do you know if arma can handle a simple object as the target for remoteexec ['function',>>target<<,false]?

digital jacinth
#

yes, it has ot be local to some machine

peak plover
#

You can walk on moving objects with this mod

calm bloom
#
remoteexec ['function',>>target<<,false]

ok i recon that the simpleobject can not be a source for remoteexec target comand, so i decided to pass the owner in a global object variable:

_trench setVariable ['pzn_trenches_owner',clientOwner,true];

How do you think, guys, is there any gains in terms of network optimisation instead of just making regular createvehicle and make it not damagable?

molten imp
#

Hey guys, i got kicked because of reasons.. so my post is gone as well :P

I asked if there is a way to disable the debug messages that pop up in the middle of your screen, specificly talking about VCOM in combination with other mods, since i am trying to record videos, it gets rather annoying.

Thank you!

digital jacinth
#

run the game without showing script errors

molten imp
#

how do i do this? 😃

digital jacinth
#

remove the start parameter "-showScriptErrors"

molten imp
limber rune
#

That happens at the start when you first load in

#

give me a sec to look into it ill see if i can help you

#

debugMessages.sqf?

#

@molten imp If I'm right it mite be the sqf
debugMessages.sqf

molten imp
#

thanks mate appreciate it, so i experimented a bit, and when i call in a gun Run, with certain airplane types this error occurs 😄 however after figuring out which planes i can use and which not, this is not a big problem for me anymore 😃

still forum
#

can i not pass arguments wen i add an ace eventhandler somehow?
@proven crystal You can pass arguments to CBA eventhandlers. Don't know what a ace eventhandler is supposed to be.
@molten imp don't run in editor. It force enables showing script errors.

proven crystal
#

i meant the CBA one

#

do you really read the entire chat here? i mean that question was a while ago. just wondering, thanks a lot though.

#

so to get the eventhandler on th eclient i run

#
fez_bombcodeentry = ["cba_events_chatMessageSent", {
                        ["cba_events_chatMessageSent", fez_bombcodeentry] call CBA_fnc_removeEventHandler;
                        
                        params ["_message"];
            blabla
                    }] call CBA_fnc_addEventHandler;
#

so it removes itself after it fires

#

how could i pass that eventhandlerID into the eventhandler without a global variable?

#

fez_bombcodeentry

#

so i can keep it a private variable

#

there are a few others that i want to pass to that EH too

still forum
#

CBA_fnc_addEventHandlerArgs

#

you already get the eventhandler ID as a variable inside the handler

proven crystal
#

ah wunderbar

proven crystal
#

yea nice that will do. many thanks

quartz blade
#

Can someone make a script that when a city is attacked the IDAP intervenes by sending ambulances and supplies? It will be very cool because of IDAP don't have a real sense in the editor

tough abyss
#

ok so i made this script

#

but it doesnt work idk why

still forum
#

I don't know either

#

And I can't find out because I can't see it

digital jacinth
#

It is easy, you just change this line and it will work until the next error

weary pivot
#

When doing multiple animations do I still use the [this, “animtype”, “none”] call BIS_fnc_ambientanimation

obtuse cosmos
#

No

#

You can use playMove, etc if you wish

#

playMoveNow will cancel all previous animations though. See Wiki for more info.

quartz blade
#

What do you mean?

civic oyster
#

How would I go about setting up an xp and money system that can be used to unlock and buy guns, vehicles, etc?

still forum
#

You start from scratch. And build it

#

I don't know what you are trying to ask

#

what you are asking about is a multiple hundred line system with maybe UI's added onto it too.
It's not a simple 2 minute "how" job

ruby breach
#

Unless you wanted examples of basic math to add/subtract and booleans to check if someone has enough dollarydoos

#

(I really just wanted an excuse to use the word dollarydoos)

still forum
#

dollarinoes

peak plover
#

@civic oyster set up functions for transactions and keeping money

#

I made variable names based on playerUID and use server to change anything with the money

#

Players can access that variable but I never change it from anything other than the serve

peak plover
#

When I want to buy something, I save the code I want to run when transaction succeeds on the client and ask server to make the transaction

#

If the transaction succeeds then the server will return the transaction id and client will run the code

knotty arrow
#

@pure blade sorry for not answering u... I was busy...

#

how can hide commanding menu , With showhud in description its bugged and hide addactions too

#

addactions hide too

#

when u set to true hide commanding menu

simple solstice
#

Is it better to make loops using CBA_waitandexecute or via the scheduler?

#

I've seen that ACE doesn't use spawn but that instead.

still forum
#

depends on what you need

#

if you don't care about precision then scheduler

simple solstice
#

A looping function every second, that's it

still forum
#

although, it then also depends on how many you have.
But you say one. So scheduler.
If you don't care that it also takes 2 or 3 seconds sometimes

simple solstice
#

And if I need lots of them?

#

The precision doesn't matter, it's more about performance

still forum
#

scheduler goes through all scripts to check if their sleep timeout is over. It does that VERY fast as it's all directly in engine code.
CBA sorts the entries once. And then only iterates so long till it finds a function that shouldn't yet run and then stop.
Meaning cba only checks atmost 1 single function per frame of the functions that should not run, whereas the engine checks all of them.
CBA checks are in SQF tho and thus much slower than the engine side scheduler stuff, but it checks less scripts. And CBA also has to sort them, and the sort time depends on the amount of entries.

#

So the answer is: it depends.
But I'd say go with scheduler if you don't care about precision

simple solstice
#

alright, thanks!

warm hedge
#

Is there a way to detect a grenade explodes via like event handlers?

short trout
#

scan for #explode entities? :3

tender root
#

Do you just want to check whether any grenade exploded or a specific grenade? @warm hedge

warm hedge
#

A specific, like the thing I just thrown

tender root
#

access the "projectile" via the EH

warm hedge
#

Ah no worries, I know how to get the object

tender root
#

and as far as I know most explosives explode by setDamage 1 so adding a Damage EH to that would maybe be a solution

#

not sure if thats true for grenades tho

#

and i don't know if the EH even fires for explosives

#

but worth a try I guess 😄

eager prawn
#

Something I've been wondering for a while: why does "AttachTo" always cause the vehicle/object to move slightly when automativally getting the offset? Does it round the pos/axis values? It's incredibly annoying to attach something perfectly, only to have it rotate just right of center.

warm hedge
#

Tried with both of "Dammage" and "HandleDamage" but looks no luck

tender root
#

@warm hedge 🤔 maybe wait until it's equal to objNull?

eager prawn
#

I have but I don't want to 😂

tender root
#

@eager prawn 😂

eager prawn
#

Plus I use attachTo from debug a lot

#

Putting that all in debug is a hassle

tender root
#

well I guess you don't really have a choice 😅 if you want the object to stay exactly where it is 😄

warm hedge
#

It worked, but I gotta do some tweak to get the position. Thanks @tender root !

tender root
#

np 😊

keen bough
#

Quick Questions: Do i have to name my function-script-sqf's "fn_name.sqf"? A tutorial did not, two did. One was old, two were older.

pure blade
#

yes

#

fn_ is hardcoded

#

but only if you use the Function Libary from Arma 3

keen bough
#

so if i would use the functions just to do my biddings, i dont have to use fn_?

still forum
#

CfgFunctions requires that naming (except if you set the filename manually, which you can afaik do?)
If you do anything by yourself then the name doesn't matter at all. You might aswell have Nar_fnc_MyFancyFunction inside WhatDoICareBoutNaming.Trololol

civic oyster
#

@still forum is there any thing I can read to do this or is it something that I just have to make

still forum
#

Second one I guess

#

or try to look in some Life/Exile code as example

#

especially life mods have lots of such stuff

keen bough
#

Thakn you a lot @still forum helps. So, for matter, to finalize it for myself to understand it, if i use cfgfunctions (what is shown in the tutorials) i am forced to use fn_ names, when i dont use the "features" of cfgfunctions, i can do whatever me pleases?

Both things arent really too relevant but i guess functions are a alternative to dozens of sgf files doing the same thing over and over again

still forum
#

yes yes

keen bough
#

alrighty, thanks agin ^^ i watched many tutorials and read a lot about functions. Still was bit unsure because many never mentioned it clearly what you have to do and what not ^^ Glad i got here 😃

proven crystal
#

hmm im messing around with particles for the first time. how can i make them move with the wind

#

?

#

have a script here from armaholic and trying to figure out how it does what it does

#

patches of fog. there seems to be one type, which has movement, the other is rather static

#

and what does bounceonsurface do?

young current
#

means if the particle goes through water if I recall right

#

there should be at least partially commented particle info pack somewhere on the wiki

#

And possible in the Arma3 configs too

minor lance
#

😦

peak plover
#

I don't see anything here

#

so I don't think so

#

Why don't you just create some buttons?

tiny wadi
#

How do I take the output of that function and load it into a crate/vehicle with every weapons attachments?

#

I cant seem to figure it out

#

There is no return value for addWeapon so I cant get a reference to the object to be able to add the attachments in a loop

#

Worse case scenario I could just put the attachments in as items but it'd be nice if they load on the weapon

ruby breach
#

There’s no way to directly add attachments to a weapon in a container

west venture
#

Untrue, but I'm not sure if it's accessible from the editor. (RHS AKs often have DTK attachments preinstalled, for instance.)

tiny wadi
#

Problem is it cant be from editor

#

well actually if it works in editor it probably works in script

peak plover
#

no @ruby breach

#

You can create a unit

#

and add the weapon to him and the attachemnts

#

And then make that unit drop it inside the container

tiny wadi
#

Is it possible to make him invisible?

peak plover
#

Sure

#

Is this for multiplayer?

tiny wadi
#

yes

peak plover
#

yeah u can just create the unit on the server and hideObject the unit

#
[_unit,true] remoteExec ['hideObject',-2];
tiny wadi
#

Sweet

#

Do you believe there will be any significant performance issues with this?

#

or nah

peak plover
#

It will take some time

#

And probably not compared to other things that will affect performance

#

The unit dropWeapon action

#

takes like a second or sth

#

because he has to do the animation

tiny wadi
#

ah ok

peak plover
#

I would just put the attachments in the container

#

If anyone wants them they can take them 1 by 1

#

Ever played the most popular game on steam?

#

PUBG also does this, when you kill someone, the attachments fall off

tiny wadi
#

Ah yeah it does

#

Alright, thank you!

peak plover
#

No problem

ruby breach
#

@peak plover You didn't read. There’s no way to directly add attachments to a weapon in a container

#

Yes, spawning a unit and all of that will work. But it's still not an addItemToWeaponCargo command (or would it be addItemToCargoWeapon) 🤔

peak plover
#

I don't deal in absolutes.
Where there's a will, there's a way

#

My mind must have slipped and I just ignored the part where it said no

tiny wadi
#

^

#

It works 🤷

#

Anyway I can tell when the unit is finished with an action?

#

That way I can delete him

#

Nevermind just threw in:

#
    deleteVehicle _unit;```
tender root
#

Arma 3 Inventory system at its best 😄
Added stuff like attachments to the arma series over five years ago... still no functions / commands for scripters / modders to use them properly

high marsh
#

What do you mean?

tender root
#

@high marsh and now try to add a weapon (including attachments) to a cargo container

#

not as a unit's primary weapon

#

if you want to add a weapon with attachments to the players backpack / vest / uniform you can use setUnitLoadout although that command is broken aswell 😅

#

adding a weapon with attachments to any other container is straight not possible

#

and letting a unit drop its weapon into a container is imo no solution. More like a "hacky workaround" 😅

high marsh
#

So you've come to complain?

fleet hazel
#

Hi guys. What is preStart, preInit, postInit. Please explain. I read Wikipedia but didn't understand anything(. What starts first. Explain the boot order.

inner swallow
fleet hazel
#

@inner swallow I read Wikipedia but didn't understand anything

inner swallow
#

well, that's not wikipedia

#

but i assume you mean the BI wiki

#

did you read that link? because it explains the boot order

#

then if you read the event scripts page, it explains what each of the files do

tender root
#

The first link @inner swallow postet has the exact order 😄 wont get much clearer than that

#

and preStart is just as it states on the Function Library Page called upon Game Start

#

1 to call the function upon game start, before title screen, but after all addons are loaded (config.cpp only)

unreal leaf
#

Anyone knows how to get vehicles seat names(pilot, driver,commander)?

#

I only need them if they contain a turret. So no back seats

ruby breach
#

Not sure exactly what you need

#

But fullCrew with the “turret” param might get you close

tender root
#

@unreal leaf what do you mean by "seat names" ?

peak plover
#

driver gunner and commander are special, they have their own commands for putting people in them

#

you can isKindOf to find out if it's air

copper raven
#

Hello, i'm trying to create tasks through the taskCreate function, and attach it to objective module(so zeus can edit it). I got it working, but i got a display issue, the logic at first doesn't update the description/title in the GUI, it only does after zeus sets it after, i mean it's a minor issue, but would be great if anyone knows a way to update the logic.

        case "s_task":{
            _block params["_state","_desc","_pos","","","_type",""];
            private _logic = _logicGroup createUnit ["ModuleObjective_F", _pos, [], 0, "NONE"];
            [_logic] call SHR_fnc_addObjToZeus;
            [side shr_curator,_varname,_desc,[_logic,true],_state,0,false,_type]call BIS_fnc_taskCreate;
            //[_varname,_type]call BIS_fnc_taskSetType;
        };

http://prntscr.com/ll5avj http://prntscr.com/ll5b03

still latch
#

Hello here.
Is it possible to edit existing diary?

eager prawn
#

Which dairy would you like?

Skim? Cream? Half/half? Whole?

still forum
#

Whole please

#

with strawberries

still latch
#

And now?

grave torrent
#

lol

tender root
#

@still latch don't mind those guys 😅
I don't think it's possible. But I havent worked much with the diary yet.

fleet hazel
#

Hi guys

#

How to hide proxy in real time on my mask

eager prawn
#

@tender root it's very possible

#

But what you have to do

#

Remove record and make new one from same format

still latch
#

This is obvious. How to read existing entry?

eager prawn
#

Read it?

#

Don't bother reading it. Just overwrite it.

proven crystal
#

i have a moment of confusion, how do i make sure that i add an eventhandler to all players on mission start?

still forum
#

initPlayerLocal?

proven crystal
#
[player,["FIRED",{    
    _shooter = _this select 0;
}]}] remoteexec ["addEventHandler",0,true];
#

yea initplayer local would be a way but i have it all sort of bundled somewhere where things will only execute on server at mission start

peak plover
#

😦

still forum
#

that will never work

#

or does it?

#

you want to add the EH to one specific unit? not every player?

#

Wait

#

execute on server? yeah will never work

#

you are sending over the value that the "player" command returns. Which will be nullObj

peak plover
#

yup

#

cba XEH

still forum
#

you probably want to execute player command on the receiver side

peak plover
#

Why do you need to remote exec it?

#

I don't get it

proven crystal
#

i launch all my stuff through one line in the initserver. most things do run server side

peak plover
#

Why

eager prawn
#

initPlayerLocal is bundled in mission. Just use that.

peak plover
#

Yeah exactly

eager prawn
#

A remoteExec at mission start (beyond the problems originally stated) would not work on players that join late either way.

peak plover
#

It would, it's got the jip flag

#

but it wouldn't work because of player

proven crystal
#

i have a slightly messed up idea

still forum
#

I do too

peak plover
#

use init or InitPlayerLocal or a function with initPost

#

delete this

still forum
#

🤢

proven crystal
#

hehehe ^^

#

ok

peak plover
#

If the code is in the mission

#

There is no reason to remotExec it right there

proven crystal
#

but at one point i would like to make this a server side thing and i would like to keep it in the one line to run the whole pack :(

tender root
#

@eager prawn thanks. Nice to know.

simple solstice
#

@proven crystal publicVariable the function /s

still forum
#

or just remoteExec the whole code via call or spawn

peak plover
#

save your code into a variable (function) and then remote exec that

still forum
#

COOKIES 🍪

peak plover
#

I'm sure that you can build a system which saves functions into the profilenamespace

#

Make it with version managment

still forum
#

functions -> profilenamespace ==bad

peak plover
#

Nah

#

Just store them there once you play on the server

still forum
#

┬─┬ ノ( ゜-゜ノ)

peak plover
#

When you join server

#

Grab list of functions required from server and versions

#

See if you need any new ones and publicVariableClient the ones that need updating

#

Before asking for the new ones, check profilenamespace

#

hmm

#

but I guess that can be abused

proven crystal
#

wait a minute

#

could i not just attach that EH to all playableunits?

still forum
#

minute is over.
yes.

proven crystal
#

that is probably the easiest way

simple solstice
#

@peak plover why just not store them client-side?

#

if you care about thieves, you can obfuscate the mission. it will make it very tidious for someone to recover it

peak plover
#

nah that was a stupid idea

#

The best way is to make the functions and publicVariable them from the server

#

I'm thinking more along the lines of someone would edit the profilenamespace and change the functions to do malicious things

vague hull
#

You could hash them to check for validity (serverside ofc)
but really.. not a good idea to begin with

peak plover
#

How

still forum
#

send the function from server to client. To store it in it's profileNamespace.
And then always send the function from client to server to check that it's right..
Sure. but.. why? Why so ultra overcomplicated? Just keep doing it how it's been done for years

#

No need to reinvent a wheel with sharp corners instead of curves

exotic tinsel
#

can server side addon call a mission object by its variable name?

peak plover
#

yes

exotic tinsel
#

im trying to apply an addaction to an object from a server side addon. i set he object var name in the mission file. can someone provide an example on how to do this? referencing the object by its var name isn't working.

peak plover
#

in your serverside addon

#

Check for the variable

#
waitUntil {
    !isNil 'ten_car'
};
call ten_fnc_car;
#

in debug console

#
// when looking at a car (local exec)
missionNamespace setVariable ['ten_car',cursorObject,true];
exotic tinsel
#

thx mate

peak plover
#

Anyone ever made a circle that can fill up on the ui?

#
_ctrlMap ctrladdeventhandler [
    "draw",
    format [
        "
            with uinamespace do {
                _map = _this select 0;
                if (time > uinamespace getvariable ['RscMiniMap_refreshTime',0]) then {
                    _display = ctrlparent _map;
                    _ctrlGrid = _display displayctrl 1002;
                    _ctrlGrid ctrlsettext (mapgridposition vehicle player);

                    _ctrlTime = _display displayctrl 1003;
                    _ctrlTime ctrlsettext ([daytime,'HH:MM'] call bis_fnc_timetostring);

                    _ctrlHeading = _display displayctrl 1004;
                    _ctrlHeading ctrlsettext str (floor direction vehicle player);
                    RscMiniMap_refreshTime = time + 0.1;
                };
                {
                    _map drawLine [position _x,position player,%1];
                } foreach groupSelectedUnits player;
            };
        ",
        /* %1 */ _colorSelect                    
    ]
];
#

🤔

peak plover
#

Wouldn't make sense to send the whole function back and forth

#

It would be easier to check the size or sth like that

#

To accuse me of stealing this person would have to prove that my code is the same as his 'tho

#

He wouldn't have access to my code in any way that could be used as proof

high marsh
#

does

with namespaceBlah do {
_var = 1;
}

set var as a valid variable to retrieve from nameSpaceblah?

short trout
#

I need to make not major wounds to not reopen in ACE Medicine. Does anyone has any expirience in modifing ace? Is it even possible to rewrite some of it's functions by custom addon?

digital jacinth
#

Yes it is. I added several functions to ace by adding a mod ontop of unmodified ace. such as tons of tweaks to the medical menu and making tourniquets show up. Your starting point should be the treatment actions, there the callback function is defined. you simply high jack this config entry of the function for bandaging and run your own code instead of aces.

short trout
#

great, thanks

digital jacinth
#

if you need a pointer in which variable to look for the bandaged and possible reopening wounds, take a look at the unit using

_unit getvariable ["ace_medical_bandagedWounds",[]]

// returns array of bandage informations (these are not ordered!)
// [ID, classID, bodypart, percentage treated, bloodloss rate]
short trout
#

got it!

still forum
#

@high marsh you know how local variables work right? So you know that, that can't be the case

high marsh
#

Not entirely, no.

#

What's the point of doing so is likely my question here.

still forum
#

well local variables are not in any namespace

#

so it doesn't matter if you have a with..do

high marsh
#

Stored in memory?

still forum
#

They are stored in the scope

#

Starts at { ends at }

high marsh
#

Right

still forum
#

you can use setVariable to set variables with underscores at start to a namespace
but you can only retrieve them with getVariable

high marsh
#

Right. That all makes sense. But why would you ever need a with namespace do control structure?

still forum
#

If you want to save all your variables in uiNamespace, but don't want to write set/getVariable everytime

high marsh
#

Ahh. I see. This is what I was curious of, good to know.

tough abyss
#

Does anyone have any of the good old "Hill climb gear" scripts laying around? I miss being able to go up a hill without having to speed up like Evel Knievel.

frigid raven
#

Can I have a little advice here in regards of how to create a proper mod structure?
https://github.com/CoopR-Mod/CoopR-Altis/tree/refactor/separation_mod_mission
Please see this branch. I try to extract my mission script code into a standalone mod. Therefore I created the addons/myTag_component/ layout. In the root dir I have reusable macros and constants defined in variables.hpp (I know stupid name, subject to change), testing.hpp and debug.hpp for instance. These need to be available in ALL functions. Do I have to #include them at every script files top lines? Or is there a more convenient way to bring them in as aspects to all functions/scripts?

still forum
#

Do I have to #include them at every script files top lines? yes

#

If you look at CBA or ACE. You will see it in every single script file

#

It's usually more convenient to just put a "script_component.hpp" (that's what it's called in CBA/ACE/TFAR/ACRE) into your scripts folder with the content
#include "..\script_component.hpp" that way you don't have to worry about the ..\'s in your script files

frigid raven
#

Yea I just saw that and was a bit confused

#

But I see the benefit

#

thx buddy

silent bough
#

Hey guys, a little question, when I try to show the result of the "distance" command, I have nothing, like if the function doesn't return anything, am I blind with something with this command ?

tough abyss
silent bough
#
metter = player distance object;
hint toString[metter];
tough abyss
#
_metres = player distance object;
hint format ["%1", _metres];
silent bough
#

Yeah I tried with something clean, but the problem isn't to show this value, it's to use it in a if.

hollow thistle
#

make sure "object" is not nil. Also that is a really bad global name, you should tag your globals with some prefix.

tough abyss
#
if (player distance object > 50) then {}; 

if the player is further than 50 metres away it returns true

silent bough
#

Ok, I'll explain better, I want to execute something only if a unit is close enough to another one.

frigid raven
#

@still forum
regarding mentioned mod structure context: #include "\z\ace\addons\main\script_mod.hpp"
Is this an ACE fancy thing or valid for basic arma3 mods as well? I mean is z referring to the root when I use this in my non-ACE mod ?

tough abyss
#

replace the > with <

#

that would make it if player is closer than 50 metres it returns true.

#

@frigid raven
inside ACE $PREFIX$
"z\ace\addons\cookoff"

silent bough
#

So I had roughly
if (unit1 distance unit2 < 3) then {something};

tough abyss
#

yes, that's functional. If unit1 is closer than 3 metres to unit 2 it returns true and runs "something".

silent bough
#

And this something wasn't executed

tough abyss
#

Well, did you run it before (unit1 distance unit2 < 3)?

silent bough
#

But when I put a else... Thé code un the else don't run...

tough abyss
#

How do you run this code?

silent bough
#

I replaced every instructions with hint, for thé debug.

#

In thé init field.

#

Of my units.

tough abyss
#

Show us your code. I can't help you unless you upload that somewhere. Preferably in a spoiler or some way that doesn't spam this chat.

waxen tide
#

```sqf
<code>
```

tough abyss
#

wait, sqf is supported?

waxen tide
#

no. i just made this up. sqf ofc isn't supported. and if you even TRY to use this, your pc will explode and shrapnell will kill you.

tough abyss
#
if (sqf) then {systemChat "SQF"} else {123};
waxen tide
#

that's it. you're ded.

tough abyss
#

damn

#

am ded, sorry can't help anyone anymore

silent bough
#

M'y computer is off, I'll show you something a bit later

tough abyss
silent bough
#

I'll check your link, but it really looks like the fonction returns nothing, and all I saw during my researches don't tell my syntax is false.

#

So I think I'm juste forgeting a stupid little detail.

still forum
#

@frigid raven if that's your prefix. then that will work for you too. If that's not your prefix. That won't work for you

peak plover
#

Has anyone ever made a circle that will fill up UI element?

simple solstice
#

Why is HandleDamage EH selection reporting so broken?

#

HitPart works wonderfully, but HandleDamage just spits out same selections (head,body,legs) EVERY time. on vanilla.

#

Am I missing something there? ACE is using HandleDamage AFAIK, and it works fine

#
// Deal with the new hitpoint and selection names introduced with Arma v1.50 and later.
// This will convert new selection names into selection names that the medical system understands
// TODO This should be cleaned up when we revisit the medical system at a later stage
// and instead we should deal with the new hitpoints directly
_selection = [_unit, _selection, _hitPointIndex] call FUNC(translateSelections);
_this set [1, _selection]; // ensure that the parameters are set correctly

// If the damage is being weird, we just tell it to fuck off. Ignore: "hands", "legs", "arms"
if (_selection != "" && {!(_selection in GVAR(SELECTIONS))}) exitWith {0};
#

it does sth like this w/ selections. does that fix anything?

pure blade
#

what do you mean with "spits out same selections", its normal that handledamage triggers multiple time on one bullet hit

simple solstice
#

uhm yeah, but it spits head,legs,body when the bullet clearly hits the leg

#

what I want is to get is a precise name of what selection got hit by the bullet.

#

HitPart gives me that, but it works on the shooters PC.

peak plover
#

hitPart is good

#

I used hitpart

simple solstice
#

I know, but

#
While you can add "HitPart" handler to a remote unit, the respectful addEventHandler command must be executed on the shooter's PC and will only fire on shooter's PC as well. The event will not fire if the shooter is not local, even if the target itself is local. Additionally, if the unit gets damaged by any means other than shooter's shooting, "HitPart" will not fire. Because of this, this event handler is most suitable for when the shooter needs feedback on his shooting, such as target practicing or hitmarker creation. 
pure blade
#

but normal you don't have only one part that got dammaged, mostly are twice or more parts are dammaged with one hit

simple solstice
#

@pure blade I refuse to acknowledge that if I shoot someone in the foot, he gets a hole in the head.

#

I need precise information about WHICH part got HIT by the bullet, not DAMAGED

peak plover
#

    // remoteExec the hp update to the target
    [_unit,(-_totalDamage),true] remoteExec ['health_fnc_hpUpdate',_unit];

    private _hp = _unit getVariable ['unit_health_hp',5000];
    _hp = _hp - _totalDamage;

    if (_hp < 1) then {
        _unit setDamage 1;

        if (!isNull _killedBy) then {
            _unit setVariable ['unit_health_killedBy',_killedBy,true];
        };
    };
#

hitPart works fine for me

simple solstice
#

Yeah... guess I will need to use that and broadcast the "holes"

pure blade
#

search the part that got the most damage

simple solstice
#

@pure blade HandleDamage doesn't give precise information

#

there is no rightleg, leftleg

#

only legs

peak plover
#

hitPart has 3 parts for each leg

simple solstice
#

yup, and thats wonderful and what I need!

peak plover
#

it also gives you _position

simple solstice
#

@peak plover how do you add it to all units?

peak plover
#

CBA

#

["CAManBase", "HitPart", {_this call health_fnc_onHitPart;}, true, [], true] call CBA_fnc_addClassEventHandler;
simple solstice
#

And it runs on init of every player?

peak plover
#

runs in postInit for everyone

#

including server/hc

#

If you don't use functions you can just put that in init.sqf

simple solstice
#

I do, thanks!

#

And for confirmation: it fires on the shooters PC, right?

peak plover
#

yes

frigid raven
#

Alert! classical question incoming. Sorry I was not able to find wiki or docs or google results for it because I am dumb. I want to test my mod without packing it - so I can make file changes while I see bugs etc.

#

I think I remember it is rather trivial to accomplish that - but couldn't figure it out as always

still forum
#

-filePatching

#

and put your modfolder directly in arma folder

#

so when your prefix is "test" have a "test" folder in arma folder next to arma3.exe

#

then it will load scripts from there first. before loading from pbo

#

you still need to restart mission tho to recompile funcs I think

frigid raven
#

yea am used to that but thx gonna try that asap

#

and god beware u lied to me... god beware

still forum
#

afaik you still need to pack it. But it will load files from folder instead of pbo

frigid raven
#

wait

#

still have a packed @naive oak folder in armas addons folder?

#

Or the one besides arma3.exe should contain unpacked AND .pbo files?

still forum
#

"@mod\addons\test.pbo"
and test\config.cpp

frigid raven
#

ok got it

#

fuck I already said ok got it
how to ask another questions without drawing wrath onto my humble person

still forum
#

throws wrath

frigid raven
#

test\config.cpp ... this at arma3/ or also @mod

#

gosh

#

dodged

drowsy axle
#

Would someone be able to help me? CODE: https://pastebin.com/GPZcHLmV

I have a loop.
I need something to only run once, at the start of the loop. // !!!!!!!!!!!! This to only run on first pass.
I need something to NOT run for the first pass and then TO run indefinitely. // !!!!!!!!!!!! This doesn't exist, until after the first pass.

ruby breach
#

If then else with an iterating variable

drowsy axle
#

I was thinking of an _i count.

pure blade
#

_forEachIndex

drowsy axle
#

it's a while loop @pure blade not forEach

peak plover
#

Also there should be a recompile button in the function browser

pure blade
#

and why you don't run code directly in front of the loop?

drowsy axle
#

Because It needs to be within the loop, for it to happen continuously. As it applies to something inside the loop. I cannot have it outside.

pure blade
#

create an integer outside and count it up inside?

#
_i = 0;
while {true} do {
    _i = _i + 1;
};
peak plover
#

You can define the lights outside of the while loop

#

What do you mean by
it needs to be within the loop

pure blade
#

yeah do it so

drowsy axle
#

I sorted it.

pure blade
#

or if you don't need the index you can create simple boolean firstrun

drowsy axle
pure blade
#

create the variable local in the spawned script handle

drowsy axle
#

What variable

frigid raven
#

Hey guys! I AddonBuilder won't build my addon because it cannot find the path defined by $PBOPREFIX$. There is a screener of the folder structure incl. the hpp/cpp files https://imgur.com/a/o8UcbFs

#

I tried to find a typo but not luck

radiant needle
#

And not becoming unconscious?

austere granite
#

Because you don't move out the units till the vehicle is destroyed

#

Also MP syncing time probably doesnt help either, like the unit might technically still be in the vehicle for a little bit, so keep that in mind when you just move the allowDamage line down

radiant needle
#

I added this

#

null = [_x] spawn {Sleep 10;_Passenger = _this select 0;_Passenger allowDamage true;};

#

and it still has issues

austere granite
#

units will get messed up if you kill the vehicle they are in either way

#

move out the units first, only then allow destruction of the vehicle

radiant needle
#

Shouldn't they survive if allowDamage is false?

austere granite
#

ALso i highly recommend you stay away from getPos/setPos combos, the setter and getter don't work the same way, use something like setPosASL/getPosASL instead

radiant needle
#

Does getPosASL allow the alt syntax?

austere granite
#

no, but math works wonders

#

like if you're on top of an object (lets say a pier, could be realistic sceanrio with your script), then getPos will return 0 height

#

but setPos will put you at 0 terrain height instead, which will be inside said pier

radiant needle
#

Also it seems like the passengers are not becoming unconscious

waxen tide
#

@digital jacinth

 I added several functions to ace by adding a mod ontop of unmodified ace. such as tons of tweaks to the medical menu and making tourniquets show up. Your starting point should be the treatment actions, there the callback function is defined. you simply high jack this config entry of the function for bandaging and run your own code instead of aces.

Is that some public project? Sounds very interesting.

radiant needle
#

Ha I found the issue, they were unconscious, animation was just glitched

peak plover
#

it's gonna be in the next ace

#

Ace is a public project

#

check his github

#

maybe something there

waxen tide
#

thx

vivid locust
#

Is there a way to retrieve a boolean from a config?
Found this:

Use getNumber to get boolean values from a config file. 1 equals true, 0 equals false and if no value is found (when a valid variable is undefined) 0.67 is returned. 

Do you need to define that 0 equals false and 1 equals true somewhere?

radiant needle
#

Is there a way to use nearObjects with multiple classes

peak plover
#

@vivid locust Not really

#
private _result = getNumber (<CONFIG>);
if (_result == 1) then {
    systemChat 'Result was true';
} else {
    systemChat 'Result was false';
};```
#

That's how one would use it

chilly wigeon
#

Iirc config doesn't even support a Boolean type

peak plover
#

@chilly wigeon yeah, I guess people just use 0 and 1 instead 🤷🏻

#

or string

eager prawn
#

@radiant needle either filter nearestObjects for the classes you want, or compare multiple uses of nearObjects

frigid raven
#

Anybody can help me out with the AddonBuilder? https://i.imgur.com/4U7E5t6.png
I would like to pack my different addons but am unable to, since they all refer to the core addon. I did not figured out how to tell where dependencies lie

digital jacinth
#

@waxen tide the tourniquet stuff will not be in the next ace update but th eone after that, Check the milestone it is attached to
The are more changes which are tailored to the group i made it for

Blood bags carry more volume and the apply time is shorter
bandages across the board have the same healing values
PAK is heavier
Epi now works kind of like the epi in basic
medical menu is changed that you do not click on any body part, but you are dynamically presented an action to bandage a limb that is bleeding, tourniquets will be applied "smartly" as in applies to the limp that is bleeding the most.

Basically the whole thing is to simplify a few things and tailored to less "medical downtime"

robust hollow
#

@frigid raven either disable binarize or change the include to #include "..\core\script_mod.hpp". It is giving you that error because its processing the include when packing the pbo instead of when you load it to your game, so it doesnt know the prefix.

still forum
#

@frigid raven P-drive?
Also stop the spam please

#

It probably can't find the include because you don't have a p-drive setup.
It looks for the file at P:\x\coopr\addons\core\script_mod.hpp

#

Also afaik your prefix shouldn't have a leading \. Just like ACE/CBA

frigid raven
#

@still forum
First of all, sorry for the spamming.
Aye the P-Drive thing again - did not thought about that before.
Well the leading \ I thought it is a convention therefore I applied it

still forum
#

for #include yes.
for pboprefix no.

#

The root filesystem starts at \. Thus if you wanna include from there, you gotta put that down.
But your mod path is made up of root+prefix+path inside your pbo.
thus you'd have \\x\coopr\addons\core
double backslash at start. As root already has it

frigid raven
#

alright got it

proven crystal
#

do i have to re-add "respawn" eventhandler after a unit has respawned?

#

i seem to be loosiing fired eventhandlers, when i respawn, so i figure i need to use a respawn evethandler to add my fired eventhandler, but then hao about that respawn eventhandler?

digital jacinth
#

It should stay. I never had the issue that it is gone after a player Respawned

proven crystal
#

the fired or the respawn eh?

#

or both?

#

thing is i add the EHs to the units on mission creation. so its not happening locally.

#

i think somewher it says that some EH stays, when it is locally added

astral dawn
still forum
#

you really only have the keyDown EH

#

but you cannot check if the key belongs to a inputAction

astral dawn
#

Problem is, I'd have to update it if player remaps his keys in game... still better than nothing

still forum
#

but you cannot check if the key belongs to a inputAction

#

Read the first note on the bottom of that page. AND the second.

proven crystal
#

CBA keybinds are very nice

still forum
#

CBA keybinds are really the only option you have. But they only work for custom keybinds. Not to detect vanilla ones

proven crystal
#

could you not just use the same keybind to fire 2 commands?

still forum
#

you could bind it once for CBA. and again for the vanilla key.. But.. That means the user has to do very specific things for your mod/script to work

astral dawn
#

Oh I see the problem with the bit fields and modifiers as well... it's pretty dammaged

frigid raven
#

Is it any problem having the same class definitions for CfgFunctions and CfgPatches ?

class CfgFunctions {
        class coopr_character {
            file = "x\coopr\addons\character\functions";
            class createCharacterState {};

and

class CfgPatches {
    class coopr_character
    {
        // Meta information for editor

Both have coopr_character but in different scopes right? Shouldn't be a problem in my eyes

still forum
#

yes

#

they can't see eachother

frigid raven
#

ok thanks - one step clother to the final solu... ehm... goal

frigid raven
#

Okay last question before I get drunk. I managed to have my .pbo loaded and could access 3DEN. Now checking for my functions in the Function Viewer I acutally saw the function names but they had no functions body - empty preview of the scriptcode.
I double checked everything for typos and such but could not find anything suspicious in my eyes.
Here is the specific addon I am testing with: https://github.com/CoopR-Mod/CoopR-Altis/tree/refactor/separation_mod_mission/addons/core
config.cpp seems fine for me and so does CfgFunctions... what else could I've been missing out here?

still forum
#

did you check putting the function name into debug console watch field to check if the variable has been set?

#

did you check RPT for file not found errors?

frigid raven
#

#1 I thought what the watch field resembles the same the function viewer yields?
#2 Nope will do now

still forum
#

A mod could break the function viewer. I've done that in the past ^^

frigid raven
#

well I only have my mod and CBA loaded...

#

this is the result - I don't get why the display is broken

still forum
#

do you only have the core pbo? do you have things that modify ui things?

frigid raven
#

I pulled it down to a myFunc function now and removed the dependency to CBA

#

now I am curious

#

well weird message is gone but still not function bodies visible

still forum
#

well do they work in debug console or not?

frigid raven
#

yes

#

but nothing happens there

#

I think I need to reread the whole docs about func definition again

dry inlet
#

["AmmoboxInit",[this,true]] spawn BIS_fnc_arsenal;
is there a way to get an item list from this BI Arsenal?

tough abyss
#

exhaustIntensity

#

For planes

#

Stuff

still forum
#

cursorTarget addWeaponWithAttachmentsCargoGlobal ["arifle_Katiba_F", "muzzle_snds_B", "acc_flashlight", "optic_aco" , "", 1] HYPE

#

Chances are very good that it will make it into Arma soon :3

pure blade
#

woooow, last week i made a workaround for this -.-

still forum
#

Many people made workarounds for that.
Next task is a boundingBox command that only takes geo/view LOD into account. Current one takes memory lod into account which causes it to be off by alot

pure blade
#

hahah

#

where did you get the information?

still forum
#

I wrote that command myself. And just got it tested by a BI dev after begging for it for over a year 😄

tame lion
#

so ACE_Throwing does not fire off the "Fired" event handler. Does anyone know if there is an event handler setup in ACE for throwing? Or would I have to script one? I'm looking on the ACE website and they don't have one for throwing

still forum
#

ACe has their own fired eh afaik sec

proven crystal
#

nicely done Dedmen. persistence rules

still forum
tame lion
#

thanks @still forum you're my hero lol

proven crystal
#

can you also get them to put the simpleObject tickbox back into object attributes?

still forum
#

🤣

proven crystal
#

i mean the tooltip of dynamicSimulation says it doesnt work with simple objects, and that option is not even there anymore. supersimple would be nice to have too

#

i dont even know how to get an object with supersimple object by script....

still forum
#

createSimpleObject with p3d filepath is super simple

#

with classname is normal simple

proven crystal
#

but how do i replace editor placed objects with supersimples? for normal simpleObjects i could at least consider to use the function to replace the object

pure blade
#

you need to make a script that convert your editormap into an array or string or whatever and then you can spawn all objects in this array after mission start

short trout
#

Many people made workarounds for that.
I feel lazy to google it, but what is it? (inb4: action 'dropweapon')

still forum
#

yeah.. That is about the only thing. Spawning a AI or an agent. Adding weapon to him. and telling him to drop it

#

DROP IT KEVIN!

#

Well there are 0 guarantees that we'll get it..
kllrt could compile and test it. He still has to forward it for code review and get it merged
up next
boundingBoxVisual
boundingBoxVisualReal
geometryCenter

#

Btw addWeaponWithAttachmentsCargo doesn't support magazine or ammocount in magazine. Is that really important for anyone? or can we live with that?

pure blade
#

^ that's how i did it

snow cipher
#

Ive managed to put music on helis but the songs distort a lot

peak plover
#

@still forum HYPE

still forum
#

Actually expanding on it a little more. Current one can't do magazines
container addWeaponWithAttachmentsCargoGlobal [weaponClassname, muzzle, side, top, bipod, [(primaryMagazine), (ammoCount), (secondaryMagazine), (ammoCount)], (count)]
in parenthesis are optional
This should be better

#

Does secondaryMagazine need ammoCount? That's only grenades in grenade launchers right?

#

Ah whatever. Edited.

proven crystal
#

yea well. would be nice to be able to grab a gun fully loaded with grenade in GL

still forum
#

next up. removeXXCargoGlobal... Remove a specific weapon filtered by classname and attachments. Or a specific backpack.. magazine.. so on...
I can see why BI didn't want them. It's a chore

proven crystal
#

if i use skiptime (24 - daytime + 4.20); in my initserver.sqf it works. it does not seem to do it if i put it into a file that i call from the initserversqf. why could that be?

pure blade
#

do you checked if the code was excuted on your other files with diag_log or something? because it should not make a difference in which script do call this code

proven crystal
#

i added a bunch of diag_logs because i thought so too. but all seems to be ok.

#

but i created a completely separate file for the skiptime command for test as well,

#

if i run the command from initsqf, it works. if i run the file that contains that command only, it doesnt work

still forum
#

how do you "run" that file

proven crystal
#

execvm

#

[] execVM "settime.sqf";

edgy dune
#

not sure if I should put in #ip_rights_violations or not, but if I find a script say on the BI forums or armaholic forums, how would I go about citing the forum and wat would I need permission wise from them to use that script?

still forum
#

Technically. You do need permission directly from the author that you are allowed to reuse it

#

And if you are already talking to the author anyway to ask about that, you can also clear up how you need to attribute him

edgy dune
#

aye thx

frigid raven
#

I want to use my unpacked mod so I can develop it while testing it. Therefore I put the @Mod folder here steamapps\common\Arma 3\@Mod. Within there is the addons folder with all .pbo files so it will be recognized as mod. Besides this the addon folder has it's unpacked content as well. Not after starting it still prefers the packed functions. I have file patching activated

still forum
#

Besides this the addon folder has it's unpacked content as well that's wrong. I told you what to do yesterday. And as far as I heard, you did it correctly yesterday

frigid raven
#

sounds like my mum 😄

tough abyss
#

Does anyone know why

_xSize = getNumber (configFile >> "CfgWorlds" >> "Altis" >> "Names" >> "Kavala" >> "radiusA");

works but

_xSize = getNumber (configFile >> "CfgWorlds" >> "Takistan" >> "Names" >> "Rasman" >> "radiusA");

doesnt?

Possibly another way to get the size of an area (doesn't have to be too exact)?

still forum
#

Because you don't have Takistan? Or the Area name is wrong?

#

check config viewer

tough abyss
#

I've tried

_area = nearestLocation [ getPos player, "nameCity"];
_xSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "Names" >> (text _area) >> "radiusA");
systemchat format ["%1", _xSize];

Altis: 500
Takistan: 0

frigid raven
#

Is there a guide how to load a mod unpacked? I still can't find anything - you guys had to read it by ourself and one point in time ^^ where is this magic resource

still forum
#

"you guys had to read it by ourself and one point in time" or we just knew how arma works and could figure it out by ourselves

#

as I said.. I told you yesterday

frigid raven
#

I re-read that part

tough abyss
still forum
#

what is your problem then?

frigid raven
#

arma3\@mod\addons\component.pbo
and
arma3\@mod\component\<sources>

That what I did according to

@mod\addons\test.pbo"
and test\config.cpp

Where I assumed ur last statement meant to be @mod\test\config.cpp

tough abyss
#

tfw your question gets buried 😦 @still forum could you kindly teach a special person how to check the configviewer in worlds?

still forum
#

Debug console. Has a "config viewer" button below it

tough abyss
#

@frigid raven why can't you just pack/unpack your mod everytime you need to change something in it btw?

still forum
#

That what I did according to Apparently you didn't

frigid raven
#

@tough abyss because I change 40 things a minute

still forum
#

I told you to

@mod\addons\test.pbo
component\config.cpp

And you did

@mod\addons\test.pbo
@mod\component\config.cpp

Can you see the difference?

#

Also component here needs to be your full pbo prefix

frigid raven
#

hm - I was unsure if really all of my 15 folders have to reside within the arma3 directory

still forum
#

so you have a x folder. Next to your arma3.exe and your other stuff further in there

frigid raven
#

so its x\component\config.cpp then?

still forum
#

you need your full pboprefix

#

if your prefix is x\component then yes

frigid raven
#

there - now I got it

still forum
#

you replicate the in-game filepath in your arma directory.

frigid raven
#

ok let the magic begin

tough abyss
#

not to ruin your guys fun but how would I go about pasting configFile >> "CfgWorlds" >> "Takistan" >> "Names" >> "Rasman" >> "radiusA"
into the config viewer? Or would I have to manually find it?

still forum
#

manually afaik

tough abyss
#

Alright, thanks!

tough abyss
#

Is there something like "text" that you can return a locations class with? IE:

text _location; //"Rasman"
class _location; //"City_Rasman"
tough abyss
#

aaah, thank you!!! I tried typeOf already

#

sadly cup maps don't work as well because the sizes are all 1:1 instead of being more exact. I'm able to do my stupid mission now though. 😄

tough abyss
#

While I'm at it. Does missionNamespace remain the same over server restart? IE:

_data = 123;
missionNamespace setVariable ["data",_data];
#SERVER SHUT DOWN
#SERVER STARTS UP
_data = missionNamespace getVariable "data";

I'm trying to do a stat save without setting up a database.

still forum
#

no

#

only profilenamespaec

tough abyss
#

Ok, thanks. I thought there was a serverNamespace but I guess that doesn't exist. Could profileNamespace be used on server?

#

to save to servers profile?

still forum
#

yes

tough abyss
#

alright, thanks for the quick replies by the way! 😃

still forum
#

yes

frigid raven
#

How to migrate the defines.hpp (GUI dependency file) from a mission's Description.ext to a mod structure? Why do I ask? Because I am stupid and I want to migrate to a mod as you might have figured out already and included the defines.hpp only at those addons where I use a GUI. However it breaks the arma3 GUI somehow. The error message after I started Arma yields:

23:30:37 Warning Message: No entry 'bin\config.bin/RscMsgBox/Bottom/CA_ButtonOK.type'.
23:30:37 Warning Message: '/' is not a value

This is one of plenty of them.
Yet I was not able to find a tutorial that did not showed how to use defines.hpp and GUIs in a Mod. All tutorials only showed how to make it work in a mission and a Description.ext
PS: I #included the defines.hpp in the config.cpp of my addons at the very top

astral tendon
#
class CfgSounds
{
    sounds[] = {};
    class CombatArea3
    {
        //
        name = "CombatArea3";
        // filename, volume, pitch, distance
        sound[] = {"dub\CombatArea3.ogg", 2, 1, 100};
        titles[] = {0,""};
    };
};

Is there a easy way to do this with many files? Its anoying have to to this manualy with each file name

still forum
#

don't redefine classes that already exist in vanilla @frigid raven
As to how to find out which ones are already in vanilla... Look each one up manually in config viewer

#

@astral tendon Not really.. You have to do every file. You can use macros though

astral tendon
#

any recomendations? never use that

frigid raven
#

@still forum uh ok - thought it would be something wrong with the load order of the .hpp

still forum
#
class CfgSounds
{
    sounds[] = {};
#define SOUND_DEF(soundname) class soundname { name = #soundname; sound = {#soundname, 2, 1, 100}; titles[] = {0,""}; };

SOUND_DEF(CombatArea3)
SOUND_DEF(otherSound)
};
#

That too

#

you should have correct requiredAddons

astral tendon
#

each SOUND_DEF is the name of the file?

still forum
#

yeah

frigid raven
#

Meh I don't get it - I did not redefined existing ones the error messages RscX classes are not inside the defines.hpp I include

#

therefore they might be really missing... but

#

gosh makes no sense

still forum
#

Yeah. The errors are not in a hpp file

#

Arma doesn't even know that the hpp file exists

#

just look if you have RscMsgBox anywhere in your code

frigid raven
#

I really did

#

nuttin

#

It only happens when I include this defines.hpp which worked fine in my mission setup before

#

and without it - ye my gui.hpp files are about to cry

still forum
#

Let's roll back a bit

#

read that

#

Almost all of your defines.hpp is redefining vanilla classes. Which you shouldn't do

#

change the definitions to declarations

frigid raven
#

🤔 k give me a sec

#

k looks like this now

class RscStructuredText;
class RscPicture ;
class RscEdit;
class RscCombo;
class RscListBox;
class RscButton;
class RscShortcutButton;
class RscShortcutButtonMain;
class RscFrame;
class RscSlider;
class IGUIBack;
class RscCheckBox;
class RscTextCheckBox;
class RscButtonMenu;
class RscButtonMenuOK;
class RscButtonMenuCancel;
class RscControlsGroup;```
#

my gui.hpp now cries for the missing RscText. I need to make that one defined now, aye?

still forum
#

no

#

you did