#arma3_scripting

1 messages · Page 413 of 1

lone glade
#

riiiiiiiiight

subtle ore
#

Unreal Engine > Totally not worth BI using

austere granite
#

2:14 AM] X39: simply because there is non of those today

#

what is pillars of eternity

#

what is that other game from obsidian that i cant recall the name of now

rancid ruin
#

people indiscriminately shit on unity games these days alganthe, same with asset flips

austere granite
#

what is divinity OS

river meteor
#

I don't know about that. If I remember correctly, Talos Principle just used the default unreal AI, same animations and everything for their enemies

austere granite
#

i think people shit on unity / UE because it all looks the same

river meteor
#

Gameplay is more important than assets

subtle ore
#

Ecape from Tarkov is made in Unity Pro if anyone knows

#

That's a pretty decent example of a non asset flip game

lone glade
#

honestly EFT is a fucking work of magic data wise

#

it's insanely compressed, but in return the system calls are through the roof

still forum
#

Pff.. RV engine only engine

queen cargo
#

@rancid ruin asset store still is useful
thing is: just do not just copy assets blindly in
there are more then enough games only containing bought assets
but they utilize them well and got actual gameplay

austere granite
#

i really want enfusion to be good 😦

still forum
#

I only want it to be fixable

#

way more worth than being "good" IMO

#

The ability to fix everything that BI overlooked

#

Because they will overlook stuff

queen cargo
#

@austere granite all not available on consoles and especially not on the nintendo switch (which is the actual platform i care about, path of exile for example is a game i already play but is not so enjoyable due to it being F2P and that means no character changes depending on character)
also most of them are not what i seek simply because they are mostly just "hack n slay" with main focus on slay

#

no interesting spells etc.

#

must agree to that what Dedmen said about enfusion

austere granite
#

pls embed 4 me furboi

still forum
#

BI has the choice of going full Assasins Creed DRM bullshit on A4 now that BI is more successful than ever.

subtle ore
#

No.

unborn ether
#

but c++ is way more work than c# died.

queen cargo
#

more important is that they do not fuck up EnScript

unborn ether
#

comparing a fork to spoon is the best

still forum
#

I don't care about EnScript. I can make my own

queen cargo
#

@unborn ether c++ is more work then c# is

austere granite
#

honestly forks are useless

rancid ruin
#

comparing them within the context of gamedev

austere granite
#

i dont use them

rancid ruin
#

c++ is obviously more work

unborn ether
#

C++ is better than Java 😄

queen cargo
#

everything is better then java

#

even python

rancid ruin
#

not fair comparisons

#

c++ is in a league of it's own

queen cargo
#

rule of thumb for that would be: c++ for the engine stuff, c# for the scripting stuff (reasoning being that c# can be recompiled anytime)

still forum
#

Same for LUA and Python 😉

#

And SQF

unborn ether
#

C++, same as Java and C# is just a tools dude.

#

Each has a purpose

#

You can't just compare them, only against your requirements

rancid ruin
#

agreed, and c# is an easier tool to use than c++

#

like a hammer vs something more complicated

still forum
#

Depends on what you want to do though 😉

unborn ether
#

If ever touch some Windows apps scripting, i'd rather touch them C# just because easier (not math dependant things)

still forum
#

There are things that C# just can't possibly do. Which probably aren't relevant on game dev

unborn ether
#

Launcher for the game is the best result of C# job

rancid ruin
#

you'd have a hard time writing a good engine from the ground up in c# yeah

still forum
#

jup

rancid ruin
#

but it's really nice to work in with unity

#

unreal c++ is a nightmare imo

austere granite
#

there's python on Epic's roadmap for UE4

rancid ruin
#

python's just way too slow for game dev

still forum
#

python isn't thaat slow

rancid ruin
#

think the EVE online guys used some faster version of python for their game though

#

it's pretty fucking slow, look at PyGame

austere granite
#

you don't use it for engine

#

obviously

#

but no one is talking about that?

rancid ruin
#

pygame's an engine that you can script in python with

#

thought we were talking about that

queen cargo
#

C# actually can do everything that can be done in C

#

and a game launcher should not be done in C# unless only target platform is windows

#

as WPF will not work on any other platform

#

the moment WPF is available on ALL platforms though, WPF and with it C# should be the one language all use when developing desktop applications

#

why should one do that?

rancid ruin
#

doesn't mono work fine for cross platform c#?

unborn ether
#

Well gaming apps is mostly used on Win (not considering console games)

still forum
#

I already commited to do it. But not fully switch

#

Gotta learn to hack around to be ready for A4

rancid ruin
#

i'm excited for the possibilities of dayz modding but am gonna wait and see how the scripting is

still forum
#

@queen cargo thiscall function hook with C#

river meteor
#

Isn't A4 still like 3+ years away?

rancid ruin
#

i'm ok with giving it a pass if EnScript or whatever it's called is totally fucked or too much work to learn

queen cargo
#

@still forum not sure what you mean with thiscall

rancid ruin
#

apparently it's like java, and i have about 0 experience with java

still forum
#

See

#

C++ calling convention

unborn ether
#

According to BIS, A4 gonna be A3++ 😄

queen cargo
#

ahhh ... now i understand @still forum
indeed, that stuff would require one to use c++ in conjunction with c# (or not ... could also be wrong as i am not using those c# libraries capable of doing that often)

still forum
#

I already checked and C# doesn't support inline assembly. Atleast I couldn't find a way after an hour of searching

queen cargo
#

nope, no inline assembly
that is correct

#

all has to work in the CLR stack

#

though, there are unsafe blocks and methods, those still just get compiled into .net code

#

that might get compiled into actual assembly if the CLR decides to do so during runtime

still forum
#

C# actually can do everything that can be done in C
Do anything completly without the CLR and .NET

lone glade
#

that sounds fun...

still forum
#

You said it's possible

#

Well.. no actually you didn't

#

what. no you did

#

I need sleep can't even read

lone glade
#

welcome to the club 😄

queen cargo
#

you can hook C/C++ methods which is enough to do all you want with C#

still forum
#

So you can do anything you want in C#. By just not using C# for the things that C# cannot do

#

Well.. That works I guess?

unborn ether
#

Why would you hook instead of using it purely ^

queen cargo
#

a language running in a VM cannot do assembly without using a non-vm language ...

unborn ether
#

C# is just faster to develop, again, for the specific purpose.

#

If you wish to manage something really huge and important on "maths" - thats not that tool exactly.

queen cargo
still forum
#

A.. So C# cannot do everything that C can?

#

But didn't you just say it can do that?

unborn ether
#

C++ is cross-platformed (mostly) while C# is W-oriented

queen cargo
#

C# is depending on CLR which is available for all systems
only the windows related stuff like WPF is not available on non-windows systems

still forum
#

People often tell me C# is better than C++ because it's cross platform

lone glade
#

wat

rancid ruin
#

i like the look of rust and D, i hope they take off

still forum
#

well.. Then run a C# .exe on Linux for me.

queen cargo
#

ohh ... wait ... that is the IDE

still forum
#

You telling me I need to recompile a Linux version then?

lone glade
#

nah

queen cargo
lone glade
#

make it in electron

#

huehuehue

unborn ether
#

No, C# and anything non-windows is a bad idea

austere granite
#

ATOM BEST

lone glade
#

JAVASCRIPT SHALL RULE THE WORLD

still forum
#

It already does

austere granite
#

ATOM BEST

queen cargo
#

ok ... now you crossed a line @lone glade

lone glade
#

I know 😦

still forum
#

No that's spam now

unborn ether
#

@lone glade Im smart, i code HTML 😄

lone glade
#

spits

unborn ether
#

well now people can tell that and be a bit of a true

halcyon crypt
#

mono can run a Windows built C# exe just fine (without WPF anyway... 😁 )

unborn ether
#

jeez

#

since HTML now looks like it

#

😄

lone glade
#

like most of the channels

still forum
#

@unborn ether What do you expect? 3000 people all telling you "no" ?

rancid ruin
#

this is the only good channel on the server

unborn ether
#

Ok, anyways anybody knows how to fight that HC might change port in the middle of reconnecting to a server?

lone glade
#

o.O

#

that's new

unborn ether
#

up to occupying the actual server port

#

+2

still forum
#

HC shouldn't listen on any port

lone glade
#

yeah, it's a client

still forum
unborn ether
#

Thanks for advantage, never knew

#

And yes it does. Ok whatever.

still forum
#

As I said. If you ask a question. Don't expect thousands of people to tell you that they don't know

lone glade
#

especially on a specialized subject like that

tough abyss
#

I smell subjectivity

subtle ore
#

but whatever guys

halcyon crypt
#

¯_(ツ)_/¯

unborn ether
#

Well since its dead it was just an attempt to ask it here.

#

You may just stop mentioning that 😄

subtle ore
#

Seems to be the excuse by everyone

queen cargo
still forum
#

I remember how I loved waiting for you Arma to start

lone glade
#

I still do, because from time to time (even vanilla) it decides to just wait before launching it.....

jade abyss
#

boring video, no boobs

lone glade
kindred bane
#

How can you edit the main menu screen? 😃

still forum
#

I think there is a wiki page about it

kindred bane
#

thanks, didnt notice the channel

#

ill look

warm gorge
#

Does anyone know a way I could find out the model of a road im on? I thought nearestTerrainObjects would pick it up but it doesnt

meager granite
#

Can't recall if getModelInfo actually returns road model though

winter dune
#

what does QGVAR stand for in ACE3?

#

as a macro

#

I can't find the macro file where it's defined ../

peak plover
#

search for #define QGVAR

#

depends which one tell me which u want?

winter dune
#
createDialog QGVAR(ProgressBar_Dialog);
#

this is the code with the macro

#

don't know if I answered your question

peak plover
#

"ace_common_ProgressBar_Dialog"

#

Q means qoutes

winter dune
#

can you tell me where it's defined

#

in which file

peak plover
#

no clue

#

I know GVAR makes a variable based on ace_<pbo name>_<variablename>

winter dune
#

thanks

barren magnet
#

@warm gorge do you need the model or the type of the road ? Aka if it is a highway or a small dirt road ?

#

You can not get any more info than that about a road. You don't know which texture, which actual p3d model etc etc. You can only find out how wide the road is with scripting

warm gorge
#

Alright all good, cheers for the info

candid jay
#

Is there any way to disable ACE markers?

peak plover
#

yes

#

delete ace_markers.pbo from ace 3 addons folder

candid jay
#

ouch

#

My main purpose is to disable group channel markers

#

so I'm trying something like:

private _null = [] spawn {
    private ["_display"];

    disableSerialization;
    
    while { true } do {
        waitUntil {_display = uiNamespace getVariable ["RscDisplayInsertMarker", displayNull]; !isNull _display};
        if !(currentChannel == 5) then { _display closeDisplay 0; };
        sleep 1;
    };
};
#

unfortunately this does not work

rancid ruin
#

why not just delete the markers themselves

#

or yeah, do what nigel says

#

which is what you want

candid jay
#

i want to disable them only on specific channels

#

but enableChannel does not work for group

rancid ruin
#

just loop over allMapMarkers and delete the ones on channels you don't want

#

easy

lone glade
#

that was my solution to map drawing before you could disable it 😄

candid jay
#

wait, you mean that now you can disable it?

#

ok will use allMapMarkers.

#

thank you

quartz coyote
#

Hello enableEnvironment has to be executed Client side or Server side ?

still forum
#

clientside

quartz coyote
#

Ok thanks

still forum
#

there are no ambient animals or sounds on the server

quartz coyote
#

I guess it's the same for enableSaving

still forum
#

No Idea. Why don't you just use the Mission attributes?

quartz coyote
#

Good question 😉

cloud thunder
#

Is there a way to disable Ace Cookoff on one object and leave enabled for all others?

peak plover
#

yes

cloud thunder
#

mind sharing?

still forum
cloud thunder
#

sweet, thank you

open vigil
#

Has anyone seen Norrin around lately?

still forum
#

Norrin, also known as Norrie disease protein or X-linked exudative vitreoretinopathy 2 protein (EVR2) is a protein that in humans is encoded by the NDP gene. Mutations in the NDP gene are associated with the Norrie disease.
Huh? #arma3_questions
What ya mean?

rancid ruin
#

norrin the scripter

#

nub

open vigil
#

@still forum don u knoe de wae?

still forum
#

No. That's why I ask

open vigil
#

Norrin, amazing scripter, been around for years.

still forum
#

Don't know the name. Was probably before my time

open vigil
#

He's probably taking a break like all good Arma-ists do from time to time.

#

One of his most famous is the "Air Taxi" script

austere granite
#

Are you saying everyone that doesn't take a break is not a good arma-ist? 😦

lone glade
#

😭

still forum
#

I take a break every night

lone glade
#

were is nkey ded ? 😄

still forum
#

That counts

lone glade
#

you stowed him away in a dungeon?

still forum
#

No. He's online right now. Dunno what he's doing

open vigil
#

Speaking of taxi, I have to play one right now.

rancid ruin
#

norrin did a revive script that was hot around arma 3 release as well

#

everyone was using that shit

unborn ether
#

@rancid ruin He is just not worth for ded attention, so stfu 😄

thorn saffron
#

Say I have a box with a filled vest inside, when I use the "everyContainer" command I get array with stuff like this:

["V_PlateCarrier1_rgr",2bc06b00# 163955: dummyweapon.p3d]```
How can (via scripting) get the array of items and such in the vest so I can empty the vest and "move" the items to the box with the vest.
still forum
#

The second element in that array is the vest

#

You just use any of the container commands on the vest like you would do with the box

thorn saffron
#

Yeah I kinda get how I can put staf in and out of the box/vest. I'm having trouble in accessing that vest array

lone glade
#

first one is the classname of the vest, second one is the container ref

thorn saffron
#

2bc06b00# 163955

#

^ this one I presume

lone glade
#

the whole thing is a ref, do not use it as a string

#

it's it's own datatype

unborn ether
#

@thorn saffron Just select it with a step

lone glade
#

use params, select, or whatever, and use the cargo commands on it

thorn saffron
#

oh ok, just a question: how can I get the array to coppy into a clipboard?

lone glade
#

oh

thorn saffron
#

or whatever I want copied from the console

lone glade
#

you mean the content of the vest?

thorn saffron
#

just in general

lone glade
#

copyToClipboard

still forum
#

copyToClipboard can't copy arrays though. Only strings

lone glade
#

that's why str exist 😄

still forum
#

And if you want to copy stuff from the console like you said. just CTRL+C

thorn saffron
#

That I kind of figured out myself 😛

kindred lichen
#

Is there a reliable way to move zeus spawned units to be local to the server? We sometimes have issues where a zeus will be laggy, and all the units will start teleporting around.

#

Ideally, something like a zeus can spawn some ynits, give them waypoints, then pass them to to dedicated server.

rotund cypress
#

obj setOwner 2;

lone glade
#

no simzor

kindred lichen
#

Will that preserve waypoints?

lone glade
#

mittens, check the ACEX headless module

#

you can have some leads from it

rotund cypress
#

Why no?

lone glade
#

because it simply won't work

rotund cypress
#

Its lierally what it does, transfers the locality of an object to server.

#

Why will it not work?

lone glade
#

because it doesn't work like that with groups....

rotund cypress
#

He said units

#

Not groups

lone glade
#

and units are in what again?

#

GORUPS

#

hell, i'm fairly sure there's a warning about that on the page

rotund cypress
#

Srsly though, why does it not work?

lone glade
#
Since Arma 3 v1.40, this command should not be used to transfer ownership of units with AI (agents are an exception to this rule). Using command in an unintended way will display an on-screen warning and log a message to .rpt file.
To transfer ownership of all AI units in a group properly, use setGroupOwner instead. 
``` oh, it does
#

because it doesn't work.

#

and setGroupOwner also has issues

#

waypoints and behavior aren't passed properly with it

rotund cypress
#

Ehm, AI's should be handled by server or a headless client.

lone glade
#

setOwner doesn't work at all.

rotund cypress
#

And still same principle, even if its setGroupOwner instead of setOwner.

lone glade
#

just checked, ACEX headless module handles waypoints @kindred lichen

thorn saffron
#

Warning! Incoming scripting stupidity and ineptitude!

_containerArray = everyContainer box1; 
{ 
_containersItems = getItemCargo [(_containerArray select 1) select _forEachIndex]; 
} forEach (_containerArray select 1);

Trying to get the array of items in vests that are inside a box. I just get generic error in expression. Eh...

still forum
#

select _forEachIndex??

#

Just use _x

#

The wiki page for forEach tells you how that works

tough abyss
#

Nah that entire loop is messed up

still forum
#

getItemCargo takes a object not an array

#

everyContainer returns array of arrays. Not array of two arrays of arrays. Read everyContainer on wiki

#

you have 3 errors. And all of them are solved by reading the wiki pages for the things you are trying to use

tough abyss
#
_containerArray = everyContainer box1; 
_containersItems = [];
{ 
   _containersItems pushBack (getItemCargo (_x select 1)); 
} forEach _containerArray ;
still forum
#

Still wrong @tough abyss

#

getItemCargo still takes object.

#

_x select 1

tough abyss
#

ahh select 😛

#

Or you might want to use append instead of pushBack, depending on what you are doing with the array etc

lone glade
#

ded, i'm at the point where I should decide if I make the stats control EH driven (and thus modifiable by third parties) or not.... the lazy ass within me is telling me no.

still forum
#

What speaks against it?

lone glade
#

the fact that I know for sure people won't bother using it, ever

#

looks at most of the wiki 😭

still forum
#

TFAR will display stats about Radios

#

With a little push ACRE will probably do that too

lone glade
#

oh, that does't need a modification of how i'll add those

#

it's already planned

#

it's "page" based, first page is vanilla

still forum
#

I don't know what you mean then

lone glade
#

you told me to make it so 3rd parties could hook their own controls

still forum
#

But.. Adding own pages for TFAR n such.. is own controls? You are really confusing me

lone glade
#

no, it isn't :D, there's 5 of each:
title
bar
text (within bar)

#

wait, i'll modify some things and show you what I have right now

still forum
#

You mean. Only support these types of controls?

lone glade
#

yes

still forum
#

Instead of leaving third parties do whatever?

lone glade
#

they wouldn't be able to unless I use CBA EHs to update and show / hide it

still forum
#

Well TFAR needs only text I guess. And AB needs a table n stuff

thorn saffron
#

https://i.imgur.com/xjJTtch.jpg
~~ BIS ~~ modders could solve one of the biggest gripes people have with the inventory: the fact weight and volume is a combined value. "All" that would need to be done is to split it and have the volume fill the vest/uniform/backpack while the weight of the items fills the total gear weight at the bottom. This way you could have small but heavy items, or big but light ones. C-mags could weight the same as the MX 100rnd mag, but take more volume. Also the compatibility could be solved like this: keep the old mass config value and use it in case item has no weight or volume defined, if it does then use that instead, you can still use mass if say weight was defined, but not volume, in that case you use the mass in place of whatever was not defined. This would ensure compatibility with mods.

lone glade
#

a shit, guess i'll go with the EH route then 😭

#

they can't

still forum
#

@thorn saffron weight doesn't exist

lone glade
#

the won't change / add such a major thing this late into the game

#

this would be even worse for modders than the marksmen platform update

thorn saffron
#

😄

#

Too bad BIS didn't went that route from the start

lone glade
#

fun fact:
types are still written as such "2 * 256" by BI even tho it's not needed anymore

#

the 2 was the volume it took.

thorn saffron
#

I like to use X* Y makes it easier to mass edit all of the values in one go

lone glade
#

it's resolved to 512 anyways

#

unless you mod for A2 and A3 at the same time it's not needed

still forum
#

At runtime. cough cough

thorn saffron
#

yeah, but I can quickly swap say 2 to 1.75 for all the multipliers

lone glade
#

....

#

that's not how types work

thorn saffron
#

Oh sorry, I thought it was talk about configs

lone glade
#

yes, types in configs, such as cfgWeapons and cfgMagazines

thorn saffron
#

Well I edited the Blastcore to double the lifetime of all particles by replacing "lifetime =" with "lifetime =2* " and bam! couple of thousand edits in one go on many different values.

still forum
#

I don't see how that's related to what @lone glade is talking about

thorn saffron
#

I have no idea what I'm talking about, I'm just trying to sound smart (and apparently I'm failing 😛 )

unborn ether
#

You just gave them the fuel for their imperfection 😄

rancid ruin
#

@unborn ether what?

#

@oneoh He is just not worth for ded attention, so stfu :smile:

unborn ether
#

@rancid ruin Thats was a sarcasm, nvm, not to you exactly 😄

thorn saffron
#

Damn, everyContainer does not cover the rifles or other weapons.

still forum
#

Uhm yes.. because they are not containers

thorn saffron
#

Oh nice, weaponsItems can read stuff from the box instead

unborn ether
#

@thorn saffron Containers are only uniforms,vests,backpacks

lone glade
#

^ any supplyXX class

thorn saffron
#

I need to check what happens if you put a pistol with attachements into vest in a box and run that everyContainer command

lone glade
#

that includes "boxes"

#

you get the ref of the container taro, use the weaponCargo command and weaponItems

unborn ether
lone glade
#

didn't we go through this a day ago already?

thorn saffron
#

possibly 😛

cedar kindle
#

mission today had like 800 objects at [0,0,0]

#

the supply140/200 etc

#

5 fps

#

is it worth monitoring stuff there and deleting them?

candid jay
#

can “line drawing” be disabled for a specific channel?

#

or is it at least returned in allMapMarkers?

subtle ore
#

allMapMarkers returns which user placed it

#

allMapMarkers returns which user placed it

#

^^ Or rather, if it was user placed or placed in editor / script

thorn saffron
#

Ok so using

_containersMagazines = []; 
{  
_containersMagazines append getMagazineCargo (_x select 1);  
} forEach _containerArray ;```
results in this:
```sqf
[["B_IR_Grenade"],[2],[],[],["30Rnd_556x45_Stanag","16Rnd_9x21_Mag","SmokeShell","SmokeShellGreen","Chemlight_green","HandGrenade"],[6,2,1,1,2,2], ["30Rnd_65x39_caseless_mag","3Rnd_SmokeRed_Grenade_shell","Titan_AA"],[1,1,1]]```
With I imagine is kinda hard to use to add the items to the box. So I would need to create custom arrays for holding the classnames and the item number. Or use some crazy contraption with checks if the subarray is even or odd 😄 .
timid olive
#

I've got question about keeping a presassigned load out after a respawn. For example, I give units clothing weapons, inventory items etc. I can set it up to keep their current loadouts after respawn but keeps what they had when they died.

#

Also I tried to setup role selection on respawn and failed spectacularly lol

unborn ether
#

@timid olive You need to confirm teh state of the loot with setVariable + getUnitLoadout. Once unit respawns, just getVariable + setUnitLoadout.

timid olive
#

Would that work from a loadouts.sqf? Or is something else needed? Im far from well versed in Arma code, but I can do it, in a pinch.

unborn ether
timid olive
#

Right, I'll give that a read when I can get to my computer. Ideally I'd like to use an addaction on say a laptop with loadouts to choose, if that fails or is massively convoluted I might try to use role selection on respawn.

#

I think saving might not actually be what I'm looking for after reading what I just put lol

subtle ore
#

@timid olive You can export an arsenal loadout with CTRL + SHIFT + C ->

river meteor
#

Is there a limit to how many Event Handlers can be on the EH stack at a time? My code is seeming to just completely ignore my attempts to add a new EH. No errors or anything

subtle ore
#
if(local player) then
{
    //change (this to player)
    //your arsenal export here
};
timid olive
#

@subtle ore That works for respawn? Or just to define the kit on initial spawn?

subtle ore
#

@timid olive

if(local player) then
{
    player addEventHandler["Respawn",
    {
        //arsenal export
    }];
}:
#

depends if you have respawnOnStart set to 1 in the description.ext

#

if you don't then you'll need some sort of init script.

if(local player) then
{
    //arsenal export for initial execution
    player addEventHandler["Respawn",
    {
        //arsenal export for after respawn
    }];
}:
#

you can toss that in a init.sqf script or something

timid olive
#

That would be new territory for me, I got some learning to do.

subtle ore
timid olive
#

I can setup description.ext fairly easily, and init.sqf as well when it comes to scripts I've downloaded. This looks like a whole new bag of cats.

meager heart
#

Also you can check Respawn templates and what is cfgInventory with cfgRoles

subtle ore
#

One thing I recommend you do: Try and do it yourself, you'll understand how to create these scriptsi later on instead of relying on others

timid olive
#

That's the plan, I just needed pouring in the right direction

#

Pointing

subtle ore
#

@meager heart Wouldn't matter if you were to run checks after the player has been spawned, unless the new respawn sets the player [0,0,0] ?

#

Yeah, hopefully that'll get you a leg up in all of this farsight

#

Becuase as far as I can tell the player doesn't exist yet at the respawn menu sldt1ck

meager heart
#

yes but menu inventory works with cfgInventory

subtle ore
#

Right, I understand that. But from farsight has expressed so far he hasn't been using the respawn menu

#

but if he is

#

then the CfgInventory + CfgRoles is the way to go yes

#

if you want people to choose from a select range of inventories

meager heart
#

that is a bit pain lol

subtle ore
#

¯_(ツ)_/¯

timid olive
#

I tried to once, it failed in amazing fashion. I picked a loadouts I assigned and became a bird lol

subtle ore
#

Respawn type

#
respawn = "BASE";
#

in your description .ext

#

or

respawn = 3;
timid olive
#

Yup, I changed it to something else, and it went back to the spawn menu, changed it again, spawned under the map so I gave up lol

subtle ore
#

No respawn points? There must've been something you were doing incorrectly

#

did you have a respective respawn_west or respawn point marker / module placed?

timid olive
#

Usually is lol, I understand the logic of coding but fail in the execution . I used empty markers with respawn_west

meager heart
#

you need also MenuPosition template

timid olive
#

I'll check these out when I can, thanks for the assist, I'll let you know how badly I mess these up lol

subtle ore
#

Lol, it's all part of it

#

I see it as, you either nail it the first time or fail until you get it nailed.

timid olive
#

Oh I've noticed, it took me weeks to figure out multiple spawn points until someone said just copy past the marker and change the names

subtle ore
#

Lol

river meteor
#

Does anyone know why a ctrlAddEventHandler would return -1? (meaning it fails to add)

timid olive
#

Indeed, my skill with mission design is laughable at best, but the fails are great

unborn ether
#

@river meteor This happens when you try to add EVH not supported for the argument, i.e ctrlAddEventHandler will fail if added to display. Also fails, when the argument doesn't support that EVH.

willow kayak
#

anybody have any idea why when i start arma 3 it disables my windows audio. Which at that point i cant reenable it without a restart. This happens with and without a headset

lone glade
#

how to get banned 101

subtle ore
lone glade
#

read the rules and stop reposting in every channel possible

subtle ore
#

You've posted everywhere

willow kayak
#

not everywhere just some places

subtle ore
#

"Just" in some

willow kayak
#

yep

subtle ore
#

Why do you think that's okay? Read #rules

willow kayak
#

I only joined this discord to get help on matter didnt even read them

subtle ore
#

@willow kayak That doesn't make you exempt from having to follow the rules

timid olive
#

That should be the first to do with anything surely ?

subtle ore
#

No one is going to help you if you do something like that

willow kayak
#

no most discords dont have rules

#

i have stopped posting everywhere so since this is the scripting channel you guys should get back to scripting talk

subtle ore
#

This one does, and it's pretty obvious under "Information"

river meteor
#

@unborn ether I'm adding a "ButtonClick" event to a button type object. It's pretty straight forward code and I do virtually the same thing elsewhere, so it really doesn't make sense to me why it would fail to add

unborn ether
#

@river meteor Interesting, is that RscButton or something custom?

river meteor
#

@unborn ether Custom

unborn ether
#

@river meteor Check it with ctrlType. As far as i remember ButtonClick is only applicable to type = 1

river meteor
#

@unborn ether It's a type 1. I've done the exact same control event not for this exact ctrl, but for this ctrl's parent. So the only thing unique about this control is the idc and the x,y,w,h. I'm storing the control is a variable that looks something like this _myControl = findDisplay DISPLAY_IDD displayCtrl CTRL_IDC;

unborn ether
#

@river meteor 🤔 Check if its not controlNull this way.

river meteor
#

@unborn ether Can I print the variable value to find this or do I need to do a comparison?

unborn ether
#

@river meteor _myControl will give a result

#

@river meteor It will be either No control or Control ###

river meteor
#

so it is no control @unborn ether

unborn ether
#

@river meteor Well that means that findDisplay or displayCtrl fails to find what you need.

river meteor
#

@unborn ether I think I forgot to include my .hpp file that contains the parent classes when I made the display

lone glade
#

hahahahha

#

yes, don't forget defines have to be included everywhere you wanna use them 😄

river meteor
#

Unbelievable man. Super shocked that I got no error, and the display looked like I expected it too as well

unborn ether
#

@river meteor Well both findDisplay or displayCtrl return NULL-objects on failure.

river meteor
#

Yeah but I figured the display would throw an error due to referencing parent objects that weren't defined

lone glade
#

nah

river meteor
#

Just like pointers man. Program makes you think you are ok for a while until it drops the floor out from under you

#

Thanks for the help @unborn ether

#

So a followup question since I need to figure out my includes, where should I include my defines if multiple .hpp files need to use the same defines.hpp file

#

To avoid redefining it in the description.ext?

lone glade
#

doesn't matter

#

only mikeros tools complain about redefs without undefs

#

preprocessor doesn't care.

river meteor
#

when I load in the game I get a popup about it though

lone glade
#

circular defs ?

#

include it once on the hpp file that is above the rest

#

or include it before the other includes in description.ext

river meteor
#

does description.ext need to include everything else though?

lone glade
#

what do you mean by "everything else" ?

river meteor
#

So I have we can say 5 displays each in their own .hpp file. I was under the impression that I would need to do a #include for each file in the description.ext or include a file which includes another file, but make sure that the tree starts with description.ext as the trunk and everything branches outward

lone glade
#

include merges the file into the target one

unborn ether
#

@Mnaason if you #define in the same body where you #include another data - this will share, as preprocessing has an order. But that will not work for spawn call execVM as this is scripted part already.

river meteor
#

Ah I see, so I can include the definitions in one and it will apply to all of them as long as I include them in the one I included the defines

lone glade
#

yes

#

think of include as preprocessor copy and pasting the included file where the include line is

thorn saffron
#

Cooked this one myself. This way I get an array with same format as the one you get from getItemCargo, so I can reuse code.

_containerArray = everyContainer box1; 
_containersMagazines = [[],[]];
{
(_containersMagazines select 0) append ((getMagazineCargo (_x select 1)) select 0);
(_containersMagazines select 1) append ((getMagazineCargo (_x select 1)) select 1);
} forEach _containerArray;```
```sqf
[["30Rnd_65x39_caseless_mag_Tracer","11Rnd_45ACP_Mag","ClaymoreDirectionalMine_Remote_Mag","CUP_MAAWS_HEAT_M"],[1,1,1,1]]```
uneven prawn
#

Does anyone know if its possible to disable the join/leave messages in sidechat?

rotund cypress
#

If you are referring to the disconnected/connected then no

#

Its battleye and only thing that could come close would be showChat false

still forum
#

Yes it's possible. No you can't.

#

Why is it so quiet today? I thought I'll miss loads of stuff while sitting here with no interwebz.
I only missed one spammer and some smalltalk about the preproc

lone glade
#

trying to figure how to retrieve the stats without destroying perf

peak plover
#

everyone writing their community DLC scripts

#

No time to mingle

lone glade
#

just got back in front of my pc too 😄

still forum
#

What are you doing that you can feel the stats on perf 😮

#

It's just a couple config lookups :U

lone glade
#

nothing yet

still forum
#

Oh. Good! Thinking ahead is good thinking

lone glade
#

i'm debating wether doing it while I retrieve them in scanConfig and then do the "3rd party" ones on arsenal opening or doing it when the item is selected and using pre-defined min-max for the bar progress calculation

still forum
#

I don't think the perf is worth all the memory you waste for that

lone glade
#

so second one it is?

still forum
#

min-max? That's something you can do in scanConfig. But like. Don't cache all stats in scanConfig while 90% of them are probably never accessed

#

Did you find a solution for custom controls? like the AB table?

lone glade
#

nah, CBA EHs don't work in 3DEN

still forum
#

Do you know why?

lone glade
#

postInit not running

still forum
#

Why do they need postInit?

#

Mods can register their stuff in config instead

#

like XEH

lone glade
#

hm :/

#

i'll try something and get back to you, might fix it, might not

still forum
#

I don't see why local events wouldn't work without postInit

#

Otherwise just do the basics now but leave the API open enough so that can be added later

lone glade
#

that's what I'm planning to do

#

nope, CBA EH really doesn't wanna run in 3DEN :/

#

also fun fact: running ctrlShow true on a control group unhides all child controls for it

peak plover
#

moving cached units

#

Is there any reason they used squares instead of circles?

lone glade
#

easier to calculate?

peak plover
#

How come?

#

less float?

lone glade
#

well, it's a square and not a circle for one

peak plover
#

Hmm

#

Yes

#

I guess

#

Save 4 points around cached units and that will form a square and then inAreaArray then from the player :\

#

Actually squres suck

young current
#

@peak plover that looks like a grid

#

squares just represent the tile(s) the unit is in

tough abyss
#

Anyone know of a way to detect if the player is looking through a magnified optic of some sorts? Binoculars, weapon sights, vehicle optics, etc?

meager heart
tough abyss
#

Perfect, thank you.

peak plover
#

@young current I thought squares represent the check, and that they'd be combined with nearby groups, they would make a bigger one, so there'd be less checks total

young current
#

could be

#

but they look like a grid to me

peak plover
#

Hmm

#

I need to run tests and see if it's a lot faster to use inarea with square

#

Maybe inpolygon 😐

tough abyss
#

Is Commy.... dead?

still forum
#

Why?

lone glade
#

nope

tough abyss
#

Haven’t seen him

#

Must be the lack of blue

queen cargo
#

not everyone can deal with the fact that they contributed but lack the prestige in public

inner swallow
#

not everyone who's gone is dead, more importantly 😛

queen cargo
#

death is a common thing amongs modders

#

though ... most time it is the project that faded away

still forum
#

member medical rewrite?

lone glade
#

member the heat death of the universe?

queen cargo
#

which one youre talking about? AGM, ACE or XMedSys rewrite? think CMS also wanted to do one before they announced ACE

lone glade
#

CMS rewrite was done, it's called the ACE medical system now

queen cargo
#

it died for CMS

#

so ... nothing rly happening here

lone glade
#

I have 0 drive to make / finish ACE Arsenal stats, 90% of them are bullshit

still forum
#

I'm really only interested in the AB stuff

#

Not needing to delve deep into configs anymore to configure your ballistics calculator will be awesome

candid jay
#

how quickly does items _unit get updated in MP? I’m checking client side whether a specific other player has a specific item (“ACE_DAGR”) and the mileage varies a lot, sometimes it results as held even when it has been dropped on the ground for a long time (>5 minutes)

meager granite
#

Updates about remote objects to certain client are sent depending on distance from that object to client's camera

#

Better idea would be to make player send notification when certain item is dropped or taken, depends on what you're doing though.

candid jay
#

I basically want to track users on a map depending on whether they have / don't have the "ACE_DAGR" item in their inventory. BTW we were standing 10m apart.

#

I was thinking to do the whole EH circle, it just seemed a little... off.

meager granite
#

Just have each client setVariable their units when they drop or get the item

candid jay
#

yeah got that

#

I thought to ask here first if that was normal, because I didn't expect it.

meager granite
#

Yeah it is normal, network optimization with infrequent updates on information of secondary importance (compared to say position, damage, etc.)

candid jay
#

ok, thank you

#

another question...

#

_USER_DEFINED #<PlayerID>/<MarkerID>/<ChannelID> is MarkerID a counter on a / player basis?

#

because I'm seeing weird behaviors

meager granite
#

Yes each player has their own counter

candid jay
#

ah-ha

#

that's why then.

#

gotcha

#

so the key is the combination of all 3 I guess (to be on the safe side)

meager granite
#

Yeah its just network-unique name which also holds some info about the marker and its origins

thick ridge
#

Anyone know why setWaypointStatements's condition statement would execute repeatedly when WPs are assigned to the player's group, yet not have the same behavior when assigned to an AI's group's WPs?

#

e.g If I put a hint message in the condition, the AI will just walk over to where the move WP is, but the hint is never shown

#

yet if it's the player's group's WPs, the hint message gets shown repeatedly while the player is moving to the WP's position

candid jay
#

I've only used setWaypointStatements on AI groups, and it does fire only once... Never used on a hybrid group of players / AI, sorry

#

Beware that setWaypointStatements will fire on each connected player

#

So if you're doing some remoteExec logic in there (including functions with global effect) you'll end up cross-firing 😃

#

(just sayin'... it bit me once)

thick ridge
#

oh that's annoying

candid jay
#

UNLESS it's a local trigger

#

createTrigger by default creates it local, unless you specify differently. Triggers in EDEN will be global.

thick ridge
#

k thanks

#

how's the chair lift?

candid jay
#

done, and pure MAGIC 😄

#

as in... poetry 😃

thick ridge
#

Nice

candid jay
#

@meager granite I only see the put and take EH but they refer to putting / taking an item from a container... not the ground (at least, according to docs). Are you aware of other EH that would also cover dropping the item or passing it to another soldier in their bag?

lone glade
#

CBA has inventory EHs afaik

candid jay
#

I can't seem to find a list

queen cargo
#

Uhm... The ground also is a Container that gets created

lone glade
#

found it scar

candid jay
#

ah ok then all good. The docs referred to "containers" and give as example (vehicle, box, etc.) 😄

lone glade
#

loadout EH

candid jay
#

oh nice

#

What does this adds on top of take and put though, if the ground is a container... do you happen to know?

lone glade
#

not having to do it yourself ? 😄

still forum
#

loadout playerEH is not take/put. Not at all

#

it's getUnitLoadout each frame and comparing to the loadout of last frame

candid jay
#

I understand that, hence I'm asking what is this supposed to give more thatn take and put if the ground is considered a container...

still forum
#

It's way easier to use

#

But it only works on the local player

#

so it kinda is a completly different thing

candid jay
#

that's fine

still forum
#

and no the ground is not a container

#

If you drop an item then a weaponHolder is created on the fly

candid jay
#

I have to set a global variable anyways, given that items apparently does not get propagated as I would have expected

still forum
#

iterating over items to find something will get pretty bad pretty quick btw

#

Especially with ACE when some medic might have hundreds of items

stable wave
#

how to get the selectionumbers of a model?

candid jay
#

@still forum that's why i'd rather use take and put IF they work for objects put/taken from ground and from other backpacks too

#

I just have to try, was only reading docs for now

still forum
#

@stable wave numbers?

#

selections have names

candid jay
#

I'd have the same issue with CBA's loadout since I'd still have to loop the loadout

still forum
#

put/take works if you have nothing adding/removing stuff via script. Like Arsenal

stable wave
#

I mean the 0 and 1 in ```sqf
_objectname setObjectTexture [0, "\pboname\texture.paa"];
_objectname setObjectTexture [1, "\pboname\texture2.paa"];

still forum
#

That is the hiddenSelections array in the config of your object

stable wave
#

what are hiddenSelections used for?

candid jay
#

to allow you change to a custom texture

still forum
#

They are selections that you can set the texture on

#

Just like the script you just posted

stable wave
#

How do I know which selection represents which part of the model?

still forum
#

Try setting it's texture and use your eyes to see what changed

stable wave
#

OK

#

Is there a way to know how many hidden selections a model has?

still forum
#

a model doesn't have any hidden selections

#

a model has selections

#

I think Elitness can show them. Not sure

candid jay
#

you can take if from the config of the model

still forum
#

The config doesn't say anything about how many selections there are

#

Are you done editing?

still forum
#

That is not the config of the model

#

that is a vehicle config

candid jay
#

yes

#

oh you are referring to model.cfg?

still forum
#

says nothing about how many or what selections there are

#

yes

#

and I think model.cfg also doesn't need to contain them all

candid jay
#

indeed, model.cfg does not

#

maybe I am not understanding what Jermin wants to do 😃

still forum
#

As I said. Elitness might be able to display them. Not sure and don't have it handy right now

candid jay
#

anyway, what do you want to do with it Jermin.

#

If you want to know which ones you can change the texture of, that's what hiddenSelections is for, and it is a CfgVehicle setting of the model

stable wave
#

I want to texture a vehicle but I don't want to miss any parts

#

some scripts specifically texture the third hidden selection and leave the others in tact

#

I want to figure out why the programmer did that

still forum
#

He probably tried. And saw that he only wants to change the third

#

The vehicle creator decides what selections exist and which are exposed as hiddenSelections.
He can have a single hiddenSelection that allows you to change the texture of one nut on one of the wheels.
Or he can have hundreds that allow you to change everything you'd ever want. Or just none.

stable wave
#

OK

meager heart
#

also getObjectTextures will return path to all hidden selections if they exist, Jermin

stable wave
#

OK

#

Is it possible to texture a gun?

still forum
#

no

#

well.. yes.. obviously. As.. You know. Guns have textures...

stable wave
#

Why? Is it an engine restriction?

still forum
#

Kinda

#

You need to pass an object to setObjectTexture.

#

You can't get the weapon object though

stable wave
#

Alright then

inner swallow
#

out of curiosity, when you place a weapon on the ground, is that not an object?

still forum
#

no

inner swallow
#

especially if you place it through editor?

austere granite
#

No

lone glade
#

ground holder

still forum
#

it creates a invisible box and places the weapon inside it

inner swallow
#

aha

lone glade
#

same as the one on your character

inner swallow
#

BI hax

lone glade
#

your uniform is a body
your vest / backpacks are attached to you by special containers, so are your weapons
your wrist is a weapon throwing nades

#

it's also a weapon to "put" mines on the ground

inner swallow
#

lol

#

yeah i knew about the weapons

#

(and weapon stone is actually a grenade that doesn't explode)

meager heart
#

and there is no actual body at all

inner swallow
#

didn't know about the rest

fleet wind
#

Ive got a hopefully simple question. howdo you make the nearestobject look for a player the position is a sign for example and i want to know who is the closest player. nearestObject [position, type] is the syntax wouldent the script then be

#

nearestObject [Testsign1, player]

still forum
#

no... the syntax wouldn't even be close to that

inner swallow
#

type should probably be "Base_man" or something

still forum
#

Scripting is not magic. It's logic following a syntax

#

It takes a position or object. And a classname

#

so you have a syntax error there

#

_nearestPlayer = nearestObject [Testsign1, "Man"] That would kinda work. But also return AI's

fleet wind
#

Returning AI's is not an issue thanks for the help

river meteor
#

Why are numbers so small memory wise, and what are some strategies to work with larger digit numbers in sqf?

still forum
#

Explain please

#

memory wise?

river meteor
#

Numbers start losing precision at digit 8 if I remember correctly, and they will also be displayed in scientific notation after digit 6

still forum
#

you can use toFixed to display them correctly

#

Yeah. They are single precision floating point numbers

#

if you need better then store them as string

#

Or use more than one number

#

Or change your logic to not need big numbers

river meteor
#

Thanks for the toFixed. That helps one problem, and I think for the other I'll just consider it a creative limitation.

little eagle
#

toFixed doesn't make them more accurate though. It only helps displaying them without further losing precision. Unless you convert them to STRING at some point in your logic, they will just be as inaccurate.

rancid ruin
#

but surely when you come to use that string'd number it doesn't make any difference

#

you can't get around single precision floats just by storing them as a string

inner swallow
#

isn't the losing precision thing a consequence of binary to decimal conversion, etc?

indigo snow
#

precision of the mantissa and the exponent

#

float = mantissa*2^(exponent)

unborn ether
#

Well at the point where they are lost its not a big value against its size actually, 1000015 -> 1000020, is not a big loss. You can trim it by Number->String->Number to make anything after 6 digit to be 0 for your operations

rancid ruin
#

not a big deal in arma yeah

#

unless you're doing some non-map-related stuff

#

like to run in to float precision problems with a terrain it'd have to be ridiculously big

#

i ran in to issues with single precision floats in a little game i made, using real world mapping data on a global scale. had to use double precision because yeah, the world's a big place.

little eagle
#

Floats are pretty bad in Arma. Just look at how jerky attachments on weapons are.

peak plover
#

I always wondered about thay

#

Shaky shit

unborn ether
#

You mean that stuff when your gun moves badly against your hands?

peak plover
#

U stand still, scope moves

#

Seen it

unborn ether
#

Oh yeah, since scope view is an actual object, found some while was scrolling simple objects

umbral oyster
#

Guys, Is it possible to change the speed of reloaded weapons at the scripts?
Anyone have example?

unborn ether
#

@umbral oyster No, you cant change reload speed of a gun, as its based on animation speed. You can only change such things as: firing speed, recoil, sway.

candid jay
#

simple question: does a minimap have the standard map interactions available, or do you need to custom code them in?

#

i couldn't find an example on which functionalities are available

unborn ether
#

@candid jay The one from GPS you mean?

candid jay
#

actually I am thinking about the microDAGR from ACE, or a simple tablet for instance

#

so satellite / mix

unborn ether
#

@candid jay Well the only base control that simulates any map (actual engine map) comes from RscMapControl type. So if you find a control itself, you can apply EVH same as for any map control.

candid jay
#

ok so if you want to use it to add markers for instance you need to code that in yourself?

young current
#

@umbral oyster did you look into the scripting commands

umbral oyster
#

Yep, I look, and nothing found

young current
#

you need better glasses

rotund cypress
#

@umbral oyster setAnimCoefSpeed can work too

umbral oyster
#

that working on players?

rotund cypress
#

But then all anims will be that speed

umbral oyster
#

@rotund cypress nope, not work

unborn ether
#

setWeaponReloadingTime doesn't increase the reaload of infrantry guns same as setAnimCoefSpeed

umbral oyster
#

setWeaponReloadingTime working only on vehicles, right?

rotund cypress
#

player setAnimSpeedCoef 10 will make it really fast to reload weapon. It does work. @umbral oyster

unborn ether
#

@rotund cypress Did you actually check this?

umbral oyster
#

@rotund cypress nope, I trying, that not work

rotund cypress
#

Ehm yes, otherwise I would not have told him about it.

young current
#

what are you after @umbral oyster ?

rotund cypress
#

It does, you are doing something wrong then. @umbral oyster

umbral oyster
#

@young current ?

young current
#

what are you trying to do

unborn ether
#

@rotund cypress Pity, but it doesn't actually, exactly around realoding anims. Simply because reloading is considered as gesture, as you can move that time.

umbral oyster
#

player setWeaponReloadingTime [player, currentMuzzle player, 0.5];

#

correct @young current ?

young current
#

no idea. look what the command page says and try it out.

unborn ether
#

@rotund cypress ```SQF
(findDisplay 46) displayAddEventHandler ["KeyDown",{
params ["","_code"];
if (_code in (actionKeys "reloadMagazine")) then {
player setAnimSpeedCoef (random 10);
reloadStart = time;
};
}];
player addEventHandler ["Reloaded",{
reloadFinish = reloadStart - time;
systemChat str(reloadFinish);
player setAnimSpeedCoef 1;
}];

This shows it doesn't affect it.
#

@umbral oyster setWeaponReloadingTime only affects a speed of fire of infrantry guns, and some weapons of type "Cannon". You can't make unit weapon to reload faster.

fiery lynx
#

Just wondering if there is a script for grass cutting other then the eden editor ones, as I need to cut a large area of grass? Any help would be great!

unborn ether
#

@fiery lynx You can createVehicle these types of objects at specific coords

class Land_ClutterCutter_large_F : Thing
class Land_ClutterCutter_medium_F : Land_ClutterCutter_large_F
class Land_ClutterCutter_small_F : Land_ClutterCutter_large_F
cerulean whale
#

Hey, just a quick question, sure I could figure it out in a few minutes but can't really be bothered and just want to see if anyone can help. -- I'm making a custom main menu for a mate who asked for one and I'm just wondering how to change the place that the camera is spawned on main menu? I assume it's CFGWorlds or something ( I'm talking about like what you see behind the main menu, sometimes it's a heli, sometimes a dock, etc)

#

If noone can help I'll just research it and share what I find here afterwards

lone glade
cerulean whale
#

thanks dude

thorn saffron
#

how can I get an object's p3d model name for a thing I'm looking at

rancid ruin
#

@thorn saffron modelInfo

#

sorry, getModelInfo

#

_modelInfo = getModelInfo cursorObject;

thorn saffron
#

Thanks, will try it now

cerulean whale
#

@thorn saffron for objects that are map placed just do cursorObject and it'll be in the stuff there

thorn saffron
#

Yup, got it to work

gaunt hamlet
#

Hia guys - back after some time away from ArmA III where last I was working on learning to script etc..
With this new EDEN editor, it looks like a lot of stuff that we had to code before has now been "automated" - or made drag and drop, is this correct?

#

Like setting up multiple respawn points with a ticket system literally required no coding

thorn saffron
#

EDEN editor is full 3D

gaunt hamlet
#

not talking about 2D vs 3D

#

talking scripting vs drag n' drop (in EDEN)

#

example is ticket based respawn system

thorn saffron
#

Yeah there is a lot of that

gaunt hamlet
#

so a lot of stuff has been "normalized" into modular components instead I guess?

#

but this is not mutually exclusive right?

#

you could if you wanted to - still do it the "old" way?

thorn saffron
#

like script stuff?

gaunt hamlet
#

yes

thorn saffron
#

Yeah totally

gaunt hamlet
#

ok

thorn saffron
#

Eden completely replaced the old editor

gaunt hamlet
#

really struggling to just get some knowledge about the API and setup"

thorn saffron
#

of what?

gaunt hamlet
#

well example...

#

making a mission with 1 spawn for east and one for west - then a hill in the middle with a sector control

#

each side has 200 tickets - if one side owns the sector control, then I want the opposing side to bleed tickets

#

this seems like it is possible to do without actually writing any script - with EDEN editor

thorn saffron
#

I seen a tutorial to do that. It's just a couple of modules and some triggers

indigo snow
#

Just as possible as before

gaunt hamlet
#

and probably a lot easier too

indigo snow
#

Eden didnt introduce new modules for it - to my knowledge

gaunt hamlet
#

hmmm might be a "zeus" thing then?

#

they are not vanilla these modules

thorn saffron
#

Zeus is in mission game master

gaunt hamlet
#

they have the "zeus" logo next to them

#

these modules

#

I'm totally new so not saying anything against what you say 😄

indigo snow
#

Yea they migtve been introduced or modified with the curator dlc

thorn saffron
#

man you've been out of the loop for some time

gaunt hamlet
#

I didnt get so far last time lol

indigo snow
#

But yea they can do a lot of basic setup for you

#

If you wanna handle the details, script

gaunt hamlet
#

but question: if I drag the "ticket bleed" module in - do I need to also have a sector control module and then sync them?

#

and do I need to sync the bleed module to the respawn modules?

#

(well other way around I guess)

thorn saffron
#

The setup is exactly the same

gaunt hamlet
#

(also - I have looked a LOT for help before asking)

#

thanks!!

indigo snow
#

They removed the infopanel for modules sadly.

thorn saffron
#

yeah that one sucked

indigo snow
#

I think some still have some info but not all

gaunt hamlet
#

here is a problem I run into a lot - get a lot of video's - but they are not in "EDEN" format, and used a different approach it seems - a much more scripting based approach

indigo snow
#

You almost always have to mix and match in the end

gaunt hamlet
#

ok

thorn saffron
#

But you can do exactly the same thing, the modules are the same etc.

gaunt hamlet
#

there is no documentation for the "new" more UI based approach?

indigo snow
#

Theyre the same just the editor looks different

gaunt hamlet
#

I don't wanna do stuff in a hmmmm deprecated way

indigo snow
#

Some changes with modules, since they can now have their own areas

#

See the cover map module

gaunt hamlet
#

yeah was a question I had too - like would the ticketbleed module with a radius do the same as a sector control module?

#

so it's like 2 in 1 module

#

handles dominance at the same time within it's own area

indigo snow
#

Id think not

#

Try it

gaunt hamlet
#

ok so have to sync with a sector control

#

did - but not sure I get right results lol

#

did not work

#

but maybe it just doesnt work coz some other mistake I made 😄

#

can I upload an image of my modules?

#

well guess I can - will you look at it is more what I mean 😃

indigo snow
#

You could link imgur but i wouldnt be able to help you either way

gaunt hamlet
#

damn, thought I was in that room WTF

#

lol

#

well - you guys are a helpful lot - I'll say that, nice discord server!

thorn saffron
#

Don't worry we will be massive dicks to someone else, to keep the world in balance 😄

gaunt hamlet
#

no need I just beat my dog to compensate

still forum
#

Yey fun

gaunt hamlet
#

it had to be giant ehh....

still forum
#

Yeah. What fun is it to beat someone with a straw? 😄

#

Not everone here is that nice. Beware of me

gaunt hamlet
#

huge would suffice was my point

#

@thorn saffron thanks for the links, last one was really good!

inner swallow
#

@gaunt hamlet there's a sector control module tutorial video in the old format that works fine in the new editor, I tried on the weekend.

gaunt hamlet
#

Got the sector control to work

#

and got bleed to work based on sector control

#

just get default values of bleed 😦

#

Just had to sync both the Sector Control module and the Ticket Bleed module to a Game Logic

#

Seems the Sector Control module can proxy sync with side logics on behalf of the Multiplayer Sector thingy if you just sync them all to the control module

#

which was pretty cool

#

Question: For end game logic - Do you just add some evaluations to an event of some kind and call a arma function that ends the game and takes a side as argument for winner?

#

like as a trigger or something

inner swallow
gaunt hamlet
#

will do - thanks for help guys

rotund cypress
#

Hey guys, is there any scripting command that will trigger the "Unload all cargo"?

#

For example, to script unloading of a vehicle inside a blackfish

#

I suppose, maybe it has to be done via an action?

still forum
rotund cypress
#

Oh, I missed that part 😉

#

Well thank you.

vague abyss
#

hey, I keep getting the issue where it says that the base class is undifined, altough it is? If been trying but nothing works... help?

still forum
vague abyss
#

okay, my bad

fleet wind
#

Hello boys and girls just need help with a hopefully simple thing. Ive got a variable called ColorRed and is equal to 0.5 I would like to use that in this script _veh setObjectTexture [0, "#(rgb,8,8,3)color(0,1,0,1)"]; and make the first one in 0,1,0,1 be equal to ColorRed (0,5). Simpley what i am asking how do i use a variable the script. This was my first attempt _veh setObjectTexture [0, "#(rgb,8,8,3)color(ColorRed,1,0,1)"]; But it did not work.

#

I am very new to this whole armar scripting thing and scripting in general....

cedar kindle
#

find format in the biki for examples

fleet wind
#

trying to figure it out with the help of that... What confuses me is the format syntax is ? format [formatString, var1, var2 ...] and the ´setObjectTexture´ also uses [] do i then have to use both something like _veh setObjectTexture format [[0, "#(rgb,8,8,3)color(%1,1,0,1)"],ColorRed];

indigo snow
#

no, since format itself returns a string, and not a string within an array

#

["arraystring"] = [format [formatString, var1, var2 ...]]

cedar kindle
#

close, you just put the format in the array instead

indigo snow
#

Keep in mind that it doesn't "use" []: rather it uses arrays, which are denoted with []. They aren't random magical special brackets, so to say.

cedar kindle
#

_veh setObjectTexture [0, format ["#(rgb,8,8,3)color(%1,1,0,1)", ColorRed]];

fleet wind
#

The variable ColorRed is taken from a Slider inside of a dialog and there for is equal to something like [Control #1900,0.7]Where the last part (0.7) is the part i want the variable to be in order to change texture of the car. How can i remove everything els....

winter dune
#

if you slider range is from 0 to 255

#

just do

#

and you should have a string with 4 values from 0 to 255

#

my mistake, one sce

indigo snow
#

0 to 1, for arma RGB

winter dune
#

now it's from 0 to 1 xD

indigo snow
#

seems the slider is already from 0 to 1, with a value of 0.7

#

but i digress

winter dune
#

if it's from 0 to 1, select 1 will be enough

indigo snow
#

Yea. So take value from controls array > format into proper format for procedural texture > Profit

fleet wind
#

The yourSliderCtrl part would the be what i have named my slider or the idc?

winter dune
#

you can have extract the value from a slider with two methods

#

either you use sliderPos IDC

#

or do ((finddisplay) displayCtrl sliderIDC) select 1

#

sliderPos is more simplier to do

unborn ether
#

sliderIDC ?

winter dune
#

sliderPosition idc

#

his idc

unborn ether
#

oh its just a number ok

winter dune
#

yes

unborn ether
#

thought you talking about command

#
// Extract value #2
_yourSliderCtrl = ((findDisplay yourDisplayIDD) displayCtrl sliderIDC) select 1;

Thats faulty, as displayCtrl returns a Control not Array

lone glade
#

shhh, keep watching dismal

winter dune
#

👍

lone glade
#

the whole conversation got me hooked

unborn ether
#

okay

indigo snow
#

neither really matters until @fleet wind replies either way

winter dune
#

if im thinking, its pretty fucked up lol

#

my code

fleet wind
#

My brain is melting. im just trying to hint _MyRGB like this and i get an error saying Error select: typr Number, Expected array,string,config entry error says to be on row 11 ```sqf
_yourSliderCtrl = sliderPosition 1900;
_myRGB = format ["%1,%2,%3,%4", _yourSliderCtrl select 1, _yourSliderCtrl select 1, _yourSliderCtrl select 1, _yourSliderCtrl select 1];

hint format["Slider RGB %1",_myRGB];

winter dune
#

don't follow my code

fleet wind
#

Row 11 = _myRGB = format ["%1,%2,%3,%4", _yourSliderCtrl select 1,

winter dune
#

use sliderPosition to retrieve the current position of your slider

fleet wind
#

So slider position will return a number only?

indigo snow
winter dune
#

yes

fleet wind
#

fantastic im on to something now Hahhaha Thanks for all the help you guys have provided 😉 Not easy being noobie trying to code.

#

Yes!!!! Ive got my little reskin cars thing to finally work Thanks alot for the help.

thorn saffron
#

ok so, the "weaponsItemsCargo" returns me arrays in this format:

[["arifle_OSR1_F","muzzle_snds_H","acc_pointer_IR","optic_ACO_grn_smg",["30Rnd_65x39_caseless_mag_Tracer",20],["3Rnd_HE_Grenade_shell",2],"bipod_01_F_khk"]]```
With basically boils down to this:
```sqf
//rifles, with UGL
[["weapon","muzzle","siderail","scope",["mag",ammo],["UGL mag",UGL_ammo],"bipod"]]
//launchers and pistols and rifles without  grenade launcher
[["weapon","muzzle","siderail","scope",["mag",ammo],"bipod"]]```
Now, I would need to "disassamble" every weapon to get out the weapons, the items and the magazines separately. The issue is twofold: first, it must work for both rifles with and  without UGL (+ other weapons), second I have little to no idea what am I doing.
#

I kludged up this:

_weaponsAndAttachements = weaponsItemsCargo box1;
{
private _count = count _weaponsAndAttachements;
if (_count == 7) then {
private _weapon = _weaponsAndAttachements select 0;

box1 addItemCargoGlobal [(_weaponsAndAttachements select 1), 1];
box1 addItemCargoGlobal [(_weaponsAndAttachements select 2), 1];
box1 addItemCargoGlobal [(_weaponsAndAttachements select 3), 1];
box1 addItemCargoGlobal [(_weaponsAndAttachements select 6), 1];


box1 addmagazineCargoGlobal [((_weaponsAndAttachements select 4) select 0), 1];
box1 addmagazineCargoGlobal [((_weaponsAndAttachements select 4) select 0), 1];

} else {

box1 addItemCargoGlobal [(_weaponsAndAttachements select 1), 1];
box1 addItemCargoGlobal [(_weaponsAndAttachements select 2), 1];
box1 addItemCargoGlobal [(_weaponsAndAttachements select 3), 1];
box1 addItemCargoGlobal [(_weaponsAndAttachements select 5), 1];


box1 addmagazineCargoGlobal [(_weaponsAndAttachements select 4), 1];

};
}forEach _weaponsAndAttachements;```
river meteor
#

you are resetting the count every loop of the forEach @thorn saffron Count never appears to change either. You can use _forEachIndex to get the index of what the forEach loop is doing and do away with _count in the first place

thorn saffron
#

I get a zero divisor error

#

I'm trying to "dissemble" this:

[["arifle_OSR1_F","muzzle_snds_H","ACE_acc_pointer_green","optic_ACO_grn_smg",["30Rnd_65x39_caseless_mag_Tracer",30],["3Rnd_UGL_FlareCIR_F",3],"bipod_01_F_khk"]]```
indigo snow
#

why is the same array outside and inside the for loop?

thorn saffron
#

@river meteor look above, the _count can be either 6 or 7

river meteor
#

@thorn saffron Do you understand the concept of a 2D array?

thorn saffron
#

Not in a bit, I suck at scripting.

river meteor
#

each set of "[]" is an array

thorn saffron
#

that I do know

#

this is what I try to dissemble:

//rifles, with UGL
[["weapon","muzzle","siderail","scope",["mag",ammo],["UGL mag",UGL_ammo],"bipod"]]
//launchers and pistols and rifles without  grenade launcher
[["weapon","muzzle","siderail","scope",["mag",ammo],"bipod"]]```
#

ah I think I know what I'm doing wrong

river meteor
#

so the first one is a single array, and within that array you have another single array, and then within that array you have 7 items

#

so if you take the count of your array, you get 1

#

if you take the count of your array select 0 you still get 1

#

oh no excuse me, if you take the count of your array select 0 you should get 7 for the first array

#

right now in your code _count will always be 1

#

also change this: _weaponsAndAttachements = weaponsItemsCargo box1; to _weaponsAndAttachements = weaponsItemsCargo box1; select 0

thorn saffron
#

Tried this, but fucked up somewhere:

_weaponsAndAttachements = weaponsItemsCargo box1;
{
private _count = count ((_x select 0) select _forEachIndex);
if (_count == 7) then {
private _weapon = _x select 0;
box1 addItemCargoGlobal [((_x select 1) select _forEachIndex), 1];
box1 addItemCargoGlobal [((_x select 2) select _forEachIndex), 1];
box1 addItemCargoGlobal [((_x select 3) select _forEachIndex), 1];
box1 addItemCargoGlobal [((_x select 6) select _forEachIndex), 1];


box1 addmagazineCargoGlobal [(((_x select 4) select _forEachIndex) select 0), 1];
box1 addmagazineCargoGlobal [(((_x select 5) select _forEachIndex) select 0), 1];

} else {

box1 addItemCargoGlobal [((_x select 1) select _forEachIndex), 1];
box1 addItemCargoGlobal [((_x select 2) select _forEachIndex), 1];
box1 addItemCargoGlobal [((_x select 3) select _forEachIndex), 1];
box1 addItemCargoGlobal [((_x select 5) select _forEachIndex), 1];


box1 addmagazineCargoGlobal [(((_x select 4) select _forEachIndex) select 0), 1];

};
}forEach _weaponsAndAttachements;```
river meteor
#

get rid of the loop entirely

#

you don't need it, and your code was fine the way it was before

thorn saffron
#

I need to do this for every weapon in a box

river meteor
#

ah ok

thorn saffron
#

or weapon inside a vest, uniform or backpack that is inside a box. Its containerception. Right now I'm just trying to do that for a weapons in a box

#

So, I have a box, a container, where player can dump all his stuff, weapons, uniforms, backpacks etc. Its supposed to be a sell box that allows you do dump stuff in and sell it all in one go. The selling is basically reading the contents of the "sell box", adding exactly the same items to shop inventory and removing the items from the "sell box". To do that, the script has to know what are all the items inside. The issue is the vests, backpacks and the uniforms are themselves containers (so its like having box inside a box), and can have items inside (mags grenades etc.). Also the weapons can have attachments and magazines so are kinda like a container themselves. Note that you can put a weapon (with attachments) inside a backpack and then put that into a box, so you have the boxception of a: (kinda) box inside a box, inside a box.
I have the uniforms, vests and backpacks kinda figured out as they are considered the same kind of container.
The weapons are a bit different beast as they are not really a container, the items are "attached" to it (+ the magazines) and the "weaponsItemsCargo" command returns an array in that weird format I showed above.
So I'm basically dissembling everything inside the "sell box"

river meteor
#

ok, so where you do all the select _forEachIndex, put those values back to what they were

#

once you are inside the array of a specific item, the weapon name is always going to be _x select 0

#

doesn't change relative to where you are in the higher level array

thorn saffron
#

if you have more than one weapon inside the box it looks like this:

[["hgun_Pistol_heavy_01_F","muzzle_snds_acp","","optic_MRD",["11Rnd_45ACP_Mag",11],""],["CUP_hgun_Glock17","muzzle_snds_L","CUP_acc_Glock17_Flashlight","",["CUP_17Rnd_9x19_glock17",14],""]]```
#
[["weapon","item","item","item",["mag",11],""],["weapon","item","item","item",["mag",14],""]]```
river meteor
#

I understand that yes

#

you have a 2D array, aka an array of arrays where each inner array represents another weapon

thorn saffron
#

with another array inside for good measure

river meteor
#

sort of

#

the _x is representing a specific weapon

#

so when you do _x select 0, you always get the name

#

so if you want to get "muzzle_snds_acp" it's _x select 1

#

does that make sense?

thorn saffron
#

All right, I got it kinda working working, for some reason it does not add the bipod to the box

_weaponsAndAttachements = weaponsItemsCargo box1;
{
private _count = count (_x select 0);
private _weapon = _x select 0;
if (_count == 7) then {

box1 addItemCargoGlobal [(_x select 1), 1];
box1 addItemCargoGlobal [(_x select 2), 1];
box1 addItemCargoGlobal [(_x select 3), 1];
box1 addItemCargoGlobal [(_x select 6), 1];


box1 addmagazineCargoGlobal [((_x select 4) select 0), 1];
box1 addmagazineCargoGlobal [((_x select 5) select 0), 1];

} else {

box1 addItemCargoGlobal [(_x select 1), 1];
box1 addItemCargoGlobal [(_x select 2), 1];
box1 addItemCargoGlobal [(_x select 3), 1];
box1 addItemCargoGlobal [(_x select 5), 1];


box1 addmagazineCargoGlobal [(_x select 4), 1];

};
}forEach _weaponsAndAttachements;```
river meteor
#

count should be = count _x

thorn saffron
#

ok, got it working properly now

river meteor
#

nice @thorn saffron Can you teach me how to do syntax highlighting?

thorn saffron
#

tilde tilde tilde sqf

#

'''sqf

river meteor
#

sqfhint "test";

#

sqf hint "test";

#

I can't do it 😦

#

'''sqf hint "test";

#

It's a tilde right?

thorn saffron
#

you need new line after sqf

river meteor
#
hint "test";
#

I did it

#

Thanks for the help, that's been bugging me for a while

fleet wind
#

In the armar 3 Gui editor how do you get up new prodjects or paste in code you already got? Or is that even a thing

thorn saffron
#

Ok I have a small problem: how can I remove the weapon from the box? removeWeapon does not seem to work, I can add a "stripped" rifle, but I need to delete the one with stuff on it.

_weaponsAndAttachements = weaponsItemsCargo box1;
{
if ((count _x) == 7) then {

box1 addItemCargoGlobal [(_x select 1), 1];
box1 addItemCargoGlobal [(_x select 2), 1];
box1 addItemCargoGlobal [(_x select 3), 1];
box1 addItemCargoGlobal [(_x select 6), 1];


box1 addmagazineCargoGlobal [((_x select 4) select 0), 1];
box1 addmagazineCargoGlobal [((_x select 5) select 0), 1];

} else {

box1 addItemCargoGlobal [(_x select 1), 1];
box1 addItemCargoGlobal [(_x select 2), 1];
box1 addItemCargoGlobal [(_x select 3), 1];
box1 addItemCargoGlobal [(_x select 5), 1];


box1 addmagazineCargoGlobal [(_x select 4), 1];

};
box1 removeWeapon (_x select 0);
box1 addWeaponCargoGlobal [(_x select 0), 1];
}forEach _weaponsAndAttachements;```
river meteor
#

why don't you just delete all weapons from the box after storing the array?

thorn saffron
#

true

river meteor
#

you can use ```sqf
clearWeaponCargoGlobal box1

#

There are a few separate clear commands to get rid of other items like magazines, backpacks, and generic items

thorn saffron
#

I know, I focused on stripping down weapons as it was important and complicated, I got the code for items figured out

#

ok that got it done

#

however the issue might be with weapons that inside vests and such, I might need to append the _weaponsAndAttachements first with any of those

river meteor
#

I recommend you take weapons out of vests before doing your script

thorn saffron
#

The point is for player to be just dump all the stuff in and have script deal with that

river meteor
#

The way I said that sounded wrong, what I meant to say was I recommend you write a script to take weapons out of backpacks and vests before running the script you have now

thorn saffron
#

yeah, but if I use clearWeaponCargoGlobal I need to know every weapon that is inside of the box first

#

so I don't lose anything on the way

river meteor
#

right, which is why you need to take everything out of vests and weapon carriers and put it inside the box before even storing the array of weapons

thorn saffron
#

yes, the issue is to do that I need to run weaponsItemsCargo on the potential weapons inside vests and stuff. It would be much easier if I could specically say: "removeWeaponGlobal arifle_AK12_GL_F" and don't worry about deleting something by mistake.

#

I will deal with that when the time comes I guess

#

The easiest way would be to first build the _weaponsAndAttachements and append it with any weapon that could be inside any boxception, then run the function for stripping all of them down

river meteor
#

you can use commands like backpackItems and everyBackpack to have a small script that loops through the backpacks and stores the items in the box

thorn saffron
#

not really, i will lose the info on what is attached to those weapons if I try to move them to the box first

#

odd, my script does not add the magazines for pistols and such, it does use the "else" part, something bugs out there

#

nvm I forgot to add a bit

#
private _sellBox = box1;

_weaponsAndAttachements = weaponsItemsCargo _sellBox;
clearWeaponCargoGlobal _sellBox;
{
if ((count _x) == 7) then {

_sellBox addItemCargoGlobal [(_x select 1), 1];
_sellBox addItemCargoGlobal [(_x select 2), 1];
_sellBox addItemCargoGlobal [(_x select 3), 1];
_sellBox addItemCargoGlobal [(_x select 6), 1];


_sellBox addmagazineCargoGlobal [((_x select 4) select 0), 1];
_sellBox addmagazineCargoGlobal [((_x select 5) select 0), 1];

} else {

_sellBox addItemCargoGlobal [(_x select 1), 1];
_sellBox addItemCargoGlobal [(_x select 2), 1];
_sellBox addItemCargoGlobal [(_x select 3), 1];
_sellBox addItemCargoGlobal [(_x select 5), 1];


_sellBox addmagazineCargoGlobal [((_x select 4) select 0), 1];

};
_sellBox addWeaponCargoGlobal [(_x select 0), 1];
}forEach _weaponsAndAttachements;```
#

^ the final form more or less

#

@river meteor Also, I dumb. I forgot that unforms, vests and backpacks are actually containers with you can do stuff like any other box. I just need to change target those instead of the sellbox. I can already do that. I just need to turn this script into a function for stripping weapons and have it be called during this:

_containerArray = everyContainer box1; 
_containersWeaponsAttachements = []; 
{  
_containersWeaponsAttachements append weaponsItemsCargo (_x select 1);  

};
} forEach _containerArray ;```
river meteor
#

@thorn saffron Yeah that makes a lot more sense then what I was telling you to do. Good job

fleet wind
#

Hello people!

I want to add a box in my mission where players can enter text and that text then becomes a variable.

I tried using the RscEdit but was unable to figure it out. Was unable to find a defines for it.

If anyone happens to sit on some code to make this happen that would be appreciated. A box where you can write things in a dialog and save them as a variable.