#arma3_scripting

1 messages Β· Page 353 of 1

daring pawn
#

Yea nah, its being odd. Single line stuff. No worries. Multiline is also find

#

but if its got Tabbing in it now

waxen tide
#

goes fix stuff dedmen commented on

daring pawn
#

it just breaks

little eagle
#

Is there // in your code?

daring pawn
#

nope I just checked that. Thats always broken it

#

Code that 100% was working prior to LoW update

still forum
#

That was fixed now btw. You can now use // in debug console.. Atleast you are supposed to

daring pawn
#

Wasn't fixed most recent update

#

and well, its not now cause it won't work

little eagle
#

I don't get why it wouldn't work with multiple lines.

#

What's the code?

peak plover
#

wha, that's sick

#

// in debug truley feels like 2017

waxen tide
#

dedmen 7 days ago
what does the 1 : mean?

little eagle
#

In 50 years it will support #include

waxen tide
#

i think mainly it means i can't count to 0

still forum
#

you can link the comment.

#

That number usually indicates which element the returned value is in if you return an array

#

You neither return array. Nor do you have more than 1 element

daring pawn
#

hmm it is working now. Musta buggered something

little eagle
#

This would make them more dense in the center

#
_position = _position getPos [_radius * sqrt random 1, random 360];
waxen tide
#

Dedmen, i've just seen that people list their parameters with their position and copied it.

#

like:

#

Parameter(s):
0 : ARRAY - Position
1 : SCALAR - Spawnradius
2 : SCALAR - Count

#

i didn't necessarily think much about it.

still forum
#

yeah that is correct. but your return value starts at 1 instead of 0

#

inconsistency

waxen tide
#

yes. because i chained like 5? functions in a row to solve a problem and changed all 5 of them 9000 times.

#

b-but i'll fix it right away.

little eagle
#

Counting is so easy, but informaticians fucked it up anyway.

waxen tide
#

well at one point there was an element 0

#

i just decided to not need it and deleted it

little eagle
#

hurr durr, let's make 0 the first number

#

zerost

#

zerond

waxen tide
#

I would like to declare dedmen evil?

peak plover
#

Ohmy god the watch boxes stop checking when you are editing now. That' awesome

waxen tide
#

I just looked at my scripts he commented on, and they shouldn't work. But they do.

little eagle
#

That' awesome
I hope this is sarcasm.

peak plover
#

What? I love this, it's a lot better, does not spam my log anymore when I'm writing a command in there

still forum
#

No.. Stop checking while editing is awesome... But that they don't start checking when you stop editing is bullshit

little eagle
#

🀦 Worst thing that happened to Arma 3.

peak plover
#

write

cursorObject <hit tab >

No issues....

austere granite
#

i kinda like it tbh

peak plover
#

<shift + tab> to go back to editing

#

It even continues where the cursor was

#

I literallly can't think of any reason the old one was better

little eagle
#

You didn't have to press tab and you'd see live update of your code

peak plover
#

ohh ok gotcha, for ex

allUnits select 6

Might be slightly faster when old watch, but pressing tab / shift-tab is not too much for me

#

It'd be a bigger issue if cursor would reset... but it does not

little eagle
#

KK also fucked up BIS_fnc_isDebugConsoleAllowed and my hack to enable the debug console in the VA in SP doesn't work anymore.

simple solstice
#

KK is working for BIS? or am I getting this wrong

slender halo
#

don't know what he really does for BIS but he wrote/optimized a lot of functions

peak plover
#

An offsite contractor ?

still forum
#

He was

little eagle
#
/*
    Author: 
        Killzone_Kid

    Description:
        Returns true if debug console is allowed in current context

    Parameter(s):
        NONE

    Returns:
        BOOLEAN
*/
#
// == SP MODE ==

if (!isMultiplayer) exitWith
{ 
    allDisplays find findDisplay 313 in [0, 1] // 3DEN preview
    ||
    {allDisplays find findDisplay 26 in [0, 1]} // 2DEN
    ||
    {(configFile >> "enableDebugConsole") call {isArray _this || {isNumber _this && {getNumber _this >= 1}}}} // allowed by mod
};
#

#logic

#

Nothing that can't be fixed tho

slender halo
#

2DEN

peak plover
#

Damn, the 3d editor is awesome

#

Forgot this was not a thing earlier

#

same with zeus, nice

waxen tide
peak plover
#

How can I check max load of a vehicle?

#

Inventory wise

#

Do I have to use getNumber

#

I also assume transportMaxWeapons has no effect/ not configured properly in amra 3?

little eagle
#

getContainerMaxLoad 😦

peak plover
#

πŸ’”

little eagle
#

Do I have to use getNumber
Yes
I also assume transportMaxWeapons has no effect/ not configured properly in amra 3?
Yes

slender halo
#

Currently works only with uniform, vest and backpack classes.

little eagle
#

getContainerMaxLoad doesn't work for anything other than backpacks, vests and uniforms.

peak plover
#

😦

little eagle
#

Yup.

peak plover
#

maximumLoad is nearly the same for everything...

#

What's a good way to automatically detect a couple of types of cargo i should add to certain vehicles, containers?

little eagle
#

first aid kits

peak plover
#

πŸ€”

#

πŸ’‘

#

Genius, that's a very good idea

little eagle
#

Thanks.

#

Can never have enough first aid kits.

solemn mason
#

is it possible to access macros within a call compile "WARNING('blalba');" ?
These are commands send by an extension and I don't want to check for it's content cus it's trusted.
compile "#include '-' " doesn't work ... is there any other way to get the preprocessor working on a string?

still forum
#

You guys were looking for that Orange DLC effect when the instructor teleports right? The corrupted memory kinda look? @peak plover @tough abyss
That is in BIS_moveInstructor variable. It calls BIS_fnc_VRSpawnEffect which is what that is I guess

#

@solemn mason no.

#

If the string comes from an extension. Then do the preprocessing in the extension before you send it out

little eagle
#

@solemn mason
Yes.

call compile 'WARNING("blalba");'
still forum
#

No commy. The string comes from an extension. as he said

solemn mason
#

well the command comes from a webpage and the extension only passes it throu and the macros are allready defined in game but I gues thats the only way.

still forum
#
    //Force re-plan for AI
    _gate hideObject true;
    _gate hideObject false;

Interesting

little eagle
#

I don't get it, but you do need your file to go through the Arma preprocessor for macros to be resolved.

still forum
#

Not possible with strings that come from an extension

little eagle
#

preprocessFileLineNumbers or any framework that uses it.

solemn mason
#
#include "\z\ace\addons\main\script_macros.hpp"

call compile "WARNING('TEXT');";

doesn't work.

little eagle
#

preprocessString in 10 years. No worries.

solemn mason
#

run as [] execVM "name.sqf";

little eagle
#
#include "\z\ace\addons\main\script_macros.hpp"

call compile 'WARNING("TEXT");';
#

single

still forum
#

@solemn mason You retrieve the string from an extension right? not from a sqf file in a pbo that is there at game start?

little eagle
#

quote

#

marks

solemn mason
#

yes it's by extension

still forum
#

Then the answer is NO.

#

Not possible

#

well...

little eagle
#

But he said execVM

still forum
#

actually

#

Yeah.. It was just to show us an example. Which failed miserably

little eagle
#

execVM uses the preprocessor

solemn mason
#

I would then pass the string to an func that compiles it

#

the execVM is only for fast testing in editor

still forum
#

@solemn mason If you enable filePatching. You can make the extension write the script to a file. and then execVM that file. That would work

solemn mason
#

πŸ˜› nasty

little eagle
#

execVM or preprocessFile(LineNumbers) are required to resolve macros.

#

So you always need a file.

astral tendon
#

car2 doMove (["marker2","marker2_2"] apply {getMarkerPos _x});

#

what is wrong in this one?

solemn mason
#

ah well thats what I feared (thanks everyone)

still forum
#

doMove doesn't take an array..

astral tendon
#

there is a equivalent command?

still forum
#

No...

#

Telling someone to move to two positions at the same time.. doesn't make much sense

astral tendon
#

one that makes AI desobay group formantion and stop following?

still forum
#

remove the AI from the group

astral tendon
#

well, if i do that they will not go on convoy

tough abyss
#

Can we just undo the whole security thing KK did to the debug console, now that he's gone?

#

I'm sensing a "the guy who wrote this is gone, it's running everywhere" situation...

spice kayak
#

When using the debug console, is anyone else unable to see their most recent statements? Like, I can click previous to see all the ones from the other day, but any during this session aren't saved there. That was earlier though, currently not playing the game.

still forum
#

I heard that that feature is broken. Will be fixed in next CBA update

spice kayak
#

Oh, I didn't realize that was part of CBA.

peak plover
#

I've not had any issues 'tho

spice kayak
#

Just so used to playing Arma with it, I don't think I've ever turned it off.

peak plover
#

Ohh wait

#

Yeah

spice kayak
#

On that note, what mods do you guys consider as a must? Like, for me it's CBA, TFR and Shacktac HUD.

peak plover
#

same issue

tough abyss
#

@spice kayak - my own πŸ˜›

still forum
#

TFAR FTW!

spice kayak
#

Oh, I thought it was TFR, not TFAR. I was wrong.

#

But yeah, it's amazing.

peak plover
#

I've mistaken it for TFR as well...

still forum
#

Make sure to use the 1.0 beta tho :3

spice kayak
#

I remember the first time I ever used it a few years ago. I was blown away by hearing people around me and on the radio at the same time.

peak plover
#

1.0 beta with dead can hear alive is sick

spice kayak
#

Wait, isn't TFR and TFAR the same thing, @peak plover ?

#

omg, there is a beta?

peak plover
#

Task Force Radio
Task Force Arrowhead Radio

still forum
#

I guess people think that because the folder is named like that. But it was made by Task Force Arrowhead. Not by Task Force. It's Task Force Arrowhead's Radio mod. TFAR

peak plover
#

It's the same thing, wrong name

still forum
#

just putting arrowhead into the folder name would've made it too long

peak plover
#

TFR is better πŸ˜„

#

or TFAR

still forum
#

But official naming is TFAR. And I'm the one making the decisions here! πŸ˜„

little eagle
#

@spice kayak Press enter instead of clicking LOCAL EXEC. The enter button still saves it.

spice kayak
#

Ah, thank you.

peak plover
#

Yeah, it's just that annoying limit of mod lenght with arma 3 launcher, which means it won't display mod list when looking at server

#

tfar is better than task force radio

little eagle
#

The issue comes from them changing the idc of the LOCAL EXEC button from IDC_OK to a custom one.

spice kayak
still forum
#

It is TFAR. Officially. But many people call it TFR inofficially

peak plover
#

they are both the same thing

spice kayak
#

Oh, so here I was getting confused over nothing haha.

peak plover
#

yeah

spice kayak
#

Also, I see @still forum in the credits!

still forum
#

Uhm...

peak plover
#

credits, more like blame

spice kayak
#

Eeeehh, semantics.

#

Close enough :P

#

But yeah, I just meant that I saw your name at the bottom of the front page, under 'Many thanks to..' :D

still forum
#

I also did 98% of the work on TFAR 1.0. And I am responsible for every release since 0.9.12

spice kayak
#

That's pretty amazing, I honestly didn't know.

still forum
#

Yeah commy. I know. Will do soonTM

little eagle
#

Yeah? But I have a blue name. You are a nobody.

still forum
#

You didn't write what I expected you to write

little eagle
#

No, but I would've written it next.

#

Release 1.0

spice kayak
#

Wait.

#

༼぀ β—•_β—• ༽぀ GIB 1.0

#

Better.

still forum
#

Indeed

#

That is now the #general channeltopic in TFAR discord πŸ˜„

spice kayak
#

\o/

peak plover
#

nice

still forum
#

Someone ask a #arma3_scripting question please so we get atleast a little bit on topic

peak plover
#

Uhm, ughh

queen cargo
#

Anybody ever checked if double nesting the same array is possible

spice kayak
#

Let me just start designing a new mission that will be ridiculously annoying to make and I'll get back to you!

queen cargo
#

Directly adding arrays to themselves is not possible

still forum
#

_myAray = [];
_myAray pushBack _myAray;

Afaik that is possible yeah.. but... doesn't end well

queen cargo
#

PushBack has no check?

still forum
#

commy knows

little eagle
#

It says something like error expected 89529529 elements , encountered 758937252

spice kayak
#

commberbatch knows all.

peak plover
#
16:06:36 Recursive array
16:06:36 Error in expression <_myAray = [];  _myAray pushBack _myAray;_myAray>
16:06:36   Error position: <pushBack _myAray;_myAray>
16:06:36   Error -432031512 elements provided, 1964269232 expected
little eagle
#

MINUS

#

YES

queen cargo
#

Lol

little eagle
#

You did it!

atomic epoch
#

Wtf?!

queen cargo
#

Signed unsigned error btw

little eagle
#

It also says Error recursive bla above these lines

spice kayak
#

Oh yeah, did anyone figure out what was behind that glimmer effect for the memory interactions from Laws of War yet?

#

I remember you guys talking about it before, and I do have the DLC, so if there is anything I could do on my end to access it, I'd love to take a look.

little eagle
#

You can always do this:

_myAray = [];
_myAray pushBack + _myAray;
queen cargo
#

What if you nest the array first?

little eagle
#

Example?

queen cargo
#

[] pushBack array

#

And then push that into the other array

#

On mobile right now so... Cannot Rly type code

little eagle
#

Does nothing, because you have no array reference to that array.

peak plover
#

pushback edits original

little eagle
#

Just reports 0.

queen cargo
#

Gah... You Rly make me to

still forum
#

@spice kayak I thought I posted it here already. Check above. I mentioned Quiksilver and nigel BIS_fnc_VRSpawnEffect

queen cargo
#

Arr = [] ;
Arr pushBack [arr]

little eagle
#

Probably recursion error again.

peak plover
spice kayak
#

BIS_fns_VRSpawnEffect was the effect I was playing around with, not the memory glimmer effect.

still forum
#

pushbackback is no a command πŸ˜„

peak plover
#

ayylmao

still forum
#

But that is the effect that's played when the Instructor is teleported.

spice kayak
#

Ohh, no no. I don't mean that effect.

#

I mean, the glimmering the object has before he interacts with it.

still forum
#

can you screenshot maybe?

spice kayak
#

Like, the shimmering / warping effect surrounding it.

#

I'll try and find someone's video containing it.

atomic epoch
#

Is the effect similar to a mirage? I can help you with that

#

Like the heat coming off a metal surface

spice kayak
#

But yes, basically.

little eagle
#

The debug console itself errors 🀦

still forum
#

What is that mission?

spice kayak
#

I mean, I'd love to try and create a cloak using it, though I feel there's probably thousands of different cloaking scripts out there. Just wanted some different tech behind my operators. I already have the EMP, wanted to try cloaking as an alternative.

#

It's the first or second mission from Laws of War, the new DLC.

still forum
#

@spice kayak

#define WETDISTORTION_0(INTENSITY)\
[\
    1,\
    INTENSITY, INTENSITY,\
    4.10, 3.70, 2.50, 1.85,\
    0.005, 0.005, 0.005, 0.005,\
    0.5, 0.3, 10.0, 6.0\
]
#define WETDISTORTION_1(INTENSITY)\
[\
    1,\
    INTENSITY, INTENSITY,\
    8, 8, 8, 8,\
    0.005, 0.005, 0.005, 0.005,\
    0.0, 0.0, 1.0, 1.0\
]
#

that looks like particle parameters

austere granite
#

it is

still forum
#
                BIS_PP_WetDistortion ppeffectadjust WETDISTORTION_0(_coef);
                BIS_PP_WetDistortion ppeffectcommit 0;

yep

spice kayak
#

Oh, would not have guessed wetDistortion.

austere granite
#

it's much like the "heat" particle

#

coming out of exausts

#

that also makes the air go weird like that

tame portal
#

@still forum Where did you find that snippet?

still forum
#

In the mission scripts

austere granite
#

The stalker mods use a similar way of doing their artifacts

tame portal
#

Ah, right the campain mission files

still forum
#

campaign\functions\fn_memoryfragment

little eagle
#

hacker

austere granite
#

OOMG YOU YACKING EBOS

#

BAN OF DISCOR DNOWOAWWOWOW

spice kayak
#

Yeah, trying to think of the best way to do cloaking for an MP enviroment.

tame portal
#

Busted

austere granite
#

R3EEEEEEEEEEEEEEEEE

spice kayak
#

I feel it might be a bit too much work though.

austere granite
#

GET OUT DEDMEN

still forum
#
#define WETDISTORTION_0\
[\
    1,\
    0, 0,\
    4.10, 3.70, 2.50, 1.85,\
    0.005, 0.005, 0.005, 0.005,\
    0.5, 0.3, 10.0, 6.0\
]
    BIS_PP_WetDistortion = ppEffectCreate ["WetDistortion",300];
    BIS_PP_WetDistortion ppeffectenable true;
    BIS_PP_WetDistortion ppeffectadjust WETDISTORTION_0;
    BIS_PP_WetDistortion ppeffectcommit 0;
#

I don't need to look into ebo's to export the script from a variable..

tame portal
#

PPEffects have soooo many parameters to adjust, its the reason I never came around doing anything with them lol

still forum
#

..But it's easier

tame portal
#

What does the F in functions_f_orange.ebo stand for actually?

still forum
#

Futura

spice kayak
#

Yeah, I'm still a little hesitant with ppEffects. They seem a little overwhelming for me right now.

still forum
#

And that switching when remembering like in the video seems to be a script replacing objects around you

tame portal
#

In the video he has posted, the effect seems to be only around that sign, are those particles then?

still forum
#

yes

#

What I posted above.

#

or is ppEffect not particles?

robust hollow
#

ppeffect is the screen effect isnt it?

still forum
#

it is

tame portal
#

Its post processing on your whole screen

spice kayak
#

Well, yeah, I was actually just thinking that's what ppEffect was.

still forum
#

What command is used to create particle effects

tame portal
#

And I was asking because PP can't be put onto specific parts of your screen, not that dynamically

spice kayak
#

Probably something like createParticleSystemSystem, or something silly.

still forum
#
private _effect = createvehicle ["#particlesource",getposatl _object,[],0,"can_collide"];
_effect setParticleParams [
    #ifdef DEBUG
        ["\A3\data_f\ParticleEffects\Universal\Universal",16,7,48,1],
    #else
        ["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1,0],
    #endif
    "",
    "Billboard",
    1,
    0.2,
    [0,0,0],
    [0,0,0],
    1,
    1.275,
    1,
    0,
    [_effectSize],
    [[0,0,0,0.0],[0,0,0,0.5],[0,0,0,0.0]],
    [1],
    0.1,
    0.05,
    "",
    "",
    "",
    0,
    false,
    0,
    []
];
_effect setParticleRandom [
    0,
    [0,0,0],
    [0,0,0],
    1,
    0.1,
    [0,0,0,0],
    0,
    0,
    1,
    0
];
_effect setDropInterval 0.01;

#

That should be it

spice kayak
#

I'd hate to see that on one line.

#

Actually, because I hate myself.

tame portal
#

I'd hate to figure out how to make good looking particle configurations yourself

still forum
#

I tried a couple times.. I just change random values till it looks somewhat like I want it

#

I wonder how BI does that.. I guess they'd have a tool that shows the particle.. with sliders to configure it or something

tame portal
#

Must be

#

Would be cool if someone could put some time into making a tool for that for the community πŸ˜›

#

Some ingame editor

still forum
#

Sounds like something for @queen cargo πŸ˜„

tame portal
#

Coding crack

spice kayak
#

Oh man, I'd love a took like that.

spice kayak
#

Also, here is the spagett code

private _effect = createvehicle ["#particlesource",getposatl _object,[],0,"can_collide"];
_effect setParticleParams [#ifdef DEBUG ["\A3\data_f\ParticleEffects\Universal\Universal",16,7,48,1], #else ["\A3\data_f\ParticleEffects\Universal\Refract",1,0,1,0], #endif "", "Billboard", 1, 0.2, [0,0,0], [0,0,0], 1, 1.275, 1, 0, [_effectSize], [[0,0,0,0.0],[0,0,0,0.5],[0,0,0,0.0]], [1], 0.1, 0.05, "", "", "", 0, false, 0, []];
_effect setParticleRandom [ 0, [0,0,0], [0,0,0], 1, 0.1, [0,0,0,0], 0, 0, 1, 0];
_effect setDropInterval 0.01;```
#

So spagett. So beautiful.

still forum
#

the #ifdef doesn't work in a oneliner

spice kayak
#

Yeah, I figured, but I still wanted it squished.

still forum
#

Also Luro.. That is very easy to reuse for your shield thingy..
_effectSize seems to be the size in meters. and _object is.. the object

tame portal
#

Is there any time of the year where X39 actually leaves the house and doesn't work on 5 things at the same time?

peak plover
still forum
#

Yeah.. He goes to work.. And works on Arma things there ^^

#

It's a ghost! No! It's a invisibility shield

tame portal
#

That heat particle effect would look good on some vehicles

peak plover
#

very cute effect

tame portal
#

Actually, don't the jets and stuff already use that?

peak plover
#

Yeah they do

simple solstice
#

@tame portal is there any time of the year where you don't suggest C# over any other language?

tame portal
#

@simple solstice I'm the classic enemy of everyone else

peak plover
#

And some mods like robert hammer / 3cb guns have heat haze as well. (not fps friendly btw)

tame portal
#

I use a Windows Server

#

I like C#

#

It's like everyones trying to kill me

simple solstice
#

don't worry I also use a windows server for arma

tame portal
#

People only use Windows Servers because ArmA servers are usually up to date there and run better πŸ˜„

simple solstice
#

and they are much more easier to run

#

If I had to do same things on Linux... oh boy

tame portal
#

Comes down to how long you've already worked with Linux based systems

spice kayak
#

Oh my, can you draw objects in the game? Like, a 3x3x3 slightly transparent sphere?

#

Yeah, that was a silly question. One can dream :(

#

I was thinking how cool it would be to combine that shimmering effect, with that of a semi-transparent dome, which would protect whoever inside of it, ala shield.

simple solstice
#

@spice kayak Draw3D?

spice kayak
#

There's drawIcon3D, and drawLine3D, but I believe their hud markers, aren't they?

tame portal
#

I just love how they quickly replace objects and change the weather in milliseconds when they make the screen turn black

#

10/10 0 FPS in that second

atomic epoch
#

Any of you smart people have a way of returning the true height of a structure? BoundingBoxReal is too rough

peak plover
#

Yeah

#

Very neat

#

lineintersects from the sky, somonen was doing fastroping or sth, that's kinda what you need

spice kayak
#

Aw, so it turns out you can't see the particles when you're within the effect range.

little eagle
#

Create the model as simple object in the air and do two raycasts with LIS. One from below and one from top.

spice kayak
#

I was thinking, instead of making a cloak out if it, I could have that shimmer effect happen just when the EMP goes off, but being inside of a particle effect that big doesn't really work out too well.

atomic epoch
#

Thanks guys, helpful as always πŸ‘

spice kayak
#

Aren't they just the cutest?

tame portal
#

What happens when an object is not a cube and a center raycast doesn't necessarily finds the highest position

little eagle
#

Then your result will be smaller.

#

You could always do multiple sideways casts.

atomic epoch
#

That's what I'm thinking, but I'm concered about performance

little eagle
#

Store the results for each building type.

atomic epoch
#

I'm only doing walls btw. Some walls are very thin so a LIS might miss if its pointed from the top

#

Is there a way to return all walls from the game?
I'm currently detecting walls using

 if (        ([ (getModelInfo _structure) select 1, ""] select (isNull _structure)) find "\walls\" != -1    ) then {code}

which looks ugly

#

I wouldn't mind storing the hieghts for each wall

tame portal
#
_highestZ = 0;

for "_i1" from 0 to 100 step 1 do  {
    for "_i2" from 0 to 100 step 1 do  {
        /* do raycast */
        if (_newZ > _highestZ) then {
            _highestZ = _newZ;
        };
    };
};
muted parcel
#

Hey I havenΒ΄t made anything with sqf for months now and I have forgotten how to make a pause into a scrip. You know that for example there is a hint at the beginning and after that you have to wait some time until the script goes on. Can someone help me out?

little eagle
#

sleep 5;
?

muted parcel
#

but sleep needs something like execVM doesnΒ΄t it?

little eagle
#

spawn

#
hint "a";
0 spawn {
    sleep 5;
    hint "b";
};
atomic epoch
#

Nvm... I can return almost all the walls if I just search for "wall" in Eden editor !

muted parcel
#

ok thx

#

thats really complexe for pausing the script xD

little eagle
#

Well, for a script to be able to suspend, you have to work in scheduled environment,

#

It's called SQF, not SQL

muted parcel
#

oh sorry

atomic epoch
#

SQL is for databases

muted parcel
#

yeah I know that it is called SQF I just typed the wrong IΒ΄m sorry

peak plover
#
addItemCargoGlobal

seems to work with weapons,clips,items,linkItems,backpacks,clothes etc.

This is awesome!

tame portal
#

But why does it

little eagle
#

Use addWeaponCargoGlobal with the mine detector and try to pick it up

peak plover
#

weapon one does not say that it works with other things... lemme try

tame portal
#

@little eagle I assume the items glitch out of they arent added with their appropiate commands?

little eagle
#
cursorTarget addWeaponCargoGlobal ["MineDetector", 1];
#

Try it.

#

Magic trick of the day.

peak plover
#

haha

#

that's sick

quasi rover
#

What is the typical class name for all guns on the ground? When AI enemy is killed, they dropped their guns on the ground and the body is deleted, but gun is not deleted in our mission AO. so I want to delete the guns for new mission, like this:

{deleteVehicle _x;} foreach (_objmark nearObjects ["AllVehicles", _rad]);
little eagle
#

GroundWeaponHolderSimulated

quasi rover
#

thx commy2 πŸ™‚

little eagle
#

Damn

#

WeaponHolderSimulated

#

or

#

GroundWeaponHolder

#

Not both

#

🀦

quasi rover
#

thx again πŸ™‚

daring pawn
#
waitUntil {({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)};

Is there a way to have the waitUntil need to be true for a period of time?

#

I've thought of a few ways but they're messy

simple solstice
#

well you can call the same script again

little eagle
#

|| MyTag_switch

MyTag_switch = true
?

simple solstice
#

I think he wants to run the script after waitUntil for a period of time

daring pawn
#

No

#

I want to have the waitUntil be true for a period of time before it moves on

peak plover
#

if !(condition) then {
    _time = time + 10;
};

if (time > _time) exitWith {
    systemChat "i've been active for 10 seconds and i've had it";
};
simple solstice
#

sleep?

daring pawn
#

that only delays checking the conditions

#

I'll have a peek a tthat @peak plover. @little eagle you mean to add the || as part of the waitUntil?

little eagle
#

Yes, as part of the condition.

simple solstice
#

why don't just use uiSleep or sleep if you want to wait a bit after waitUntil is true?

daring pawn
#

No I don't want to wait after

#

I want the conditions to be true for a period of time

little eagle
#

He wants to ignore the condition and have it be always true.

daring pawn
#

Uh

little eagle
#

waitUntil {(conditions) || {My_flip}};

#

The do was not part of this^^

daring pawn
#

No its like, with that waitUntil it waits until theres an INDI in the markerArea and that theres also not a BLUFOR in it. I want to to have those conditions be true for say 5 seconds, before its complete

simple solstice
#

sleep 5; cond = false;

#

?

little eagle
#

Ah, he wants the blue unit to be alive for at least 5 seconds in the area.

simple solstice
#

ohh

daring pawn
#

Well not necesarrily alive, but just present

#

but yea alive or it wouldn't be picked up

simple solstice
#

so after that

little eagle
#

Two nested waitUntil

daring pawn
#
waitUntil {({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) 
&& 
({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)
&& 
waitUntil {sleep 5}};

surely its not something like that?

little eagle
#
waitUntil {
    waitUntil {unit_in_area};

    sleep 5;

    unit_in_area
};
simple solstice
#
waitUntil {({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)};
_time = time;
waitUntil {time - _time > 5 && unitPresent};
#

@little eagle would that work? it wont

little eagle
#

No, that's just a fancy sleep.

#

I posted it.

simple solstice
#

yup, yours is what is good

little eagle
#

I hate nested loops like that too

daring pawn
#

As in what you've just given me Commy you hate? I'm basically trying to emulate what a trigger would, but I don't want to create triggers

#
    waitUntil {
        waitUntil {({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)};

        sleep 5;

    ({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)
};

is what i've ended up with, about to see if it does what I need

simple solstice
#

commy i edited it

#

would that be good?

little eagle
#

lgtm

daring pawn
#

Thats still not really it Katekarin. Thats like, okay theres dudes in there, lets wait 5 seconds and check again, its not going to ensure the units are in there for 5 seconds

simple solstice
#
waitUntil {({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)};
sleep 5;
if (unitPresent) then {...
little eagle
#

Why would he leave and return in 5 seconds though?

daring pawn
#

I want to use 60 seconds

#

just using 5 seconds as an example

#

or 5 seconds would occur if the unit was on the edge of the mmarker

little eagle
#

Omg

daring pawn
#

slipped in and out

simple solstice
#

ok

#

why just not use

#

while {inArea}

daring pawn
#

I only want to execute once what happens after the waitUntil is why

simple solstice
#

hmm, is this something like a progress for capturing a point?

little eagle
#
private _time = 0;

waitUntil {
    if !(unit_in_area) then {
        _time = time;
    };

    time > _time + 60
};
daring pawn
#

That looks perfect infact commy

little eagle
#

#logic

simple solstice
#
private _time = 0;
    while{true} do
    {
        uiSleep 1;
        _time = _time + 1;
        if !(unit_in_area) exitWith {};
        if (_time  >= 60) exitWith {};
    };
if !(unit_in_area) exitWith {};
...

would that work? :p

#

you can add some kind of progress bar with that

still forum
#

*throws cookies at everyone*

little eagle
#

Idk, I like mine the most : P

peak plover
#

πŸͺ πŸ™

simple solstice
#

you can add a countdown to mine πŸ˜›

little eagle
#

You can do that to mine too. You already have 60 - progress in _time.

simple solstice
#

won't discuss with someone who made CBA and ACE πŸ˜…

subtle ore
#

@still forum i hate chocolate chip, got any oatmeal raisin?

daring pawn
#

What are you a monster?

#

also thanks @little eagle

#

uh @little eagle - I think its causing my game to crash

simple solstice
#

try me

subtle ore
#

@daring pawn cookie monster? Not necessarily

daring pawn
#

πŸ˜›

#

Yea @little eagle it 100% crashes the client

#

Yea i'll have a looksie @simple solstice

little eagle
#

Please post what you wrote. There is no way this crashes.

simple solstice
#

be sure to replace : with ; in my code if you want to try it ;p

daring pawn
#
    waitUntil {
        if !(({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)) then {
            _time = time;
        };
        time > _time + 60
    };
little eagle
#

I don't see it.

daring pawn
#

Don't see why it crashes a game?

little eagle
#

Yeah.

daring pawn
#

I mean if you're near a copy of arma, you can try it. I'm on self hosted MP at the minute, its crashed my game a few times now

#

Exception code: C0000005 ACCESS_VIOLATION at 0198FE74 If its relevant

#

Although probably not

still forum
#

it's not

little eagle
#

Did you forget to put the:

private _time = 0;

part?

daring pawn
#

Nah its there

#
GridState = {
    _mkr = param [0];
    _gPos = _mkr call getGridPosMarker;
    //waitUntil {(([_mkr,375,"count"] call NearestPlayers) < 1)};
    private _time = 0;
    waitUntil {
        if !(({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) > 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) < 1)) then {
            _time = time;
        };
        time > _time + 60
    };
/* CODE */
};
#

Deadset, its odd. I tried adding a sleep incase it was just freaking out like if you have a while {true} {}; and something intensive, it still crashes.

little eagle
#
0 spawn {
   _mkr = "marker_0"; 
   private _time = 0;

   waitUntil { 
        if !(({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) < 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) >= 1)) then { 
            _time = time;
            systemChat str 0.5; 
        };
        systemChat str 0;  
        time > _time + 60
    };
    systemChat str 1;
};

I tested this and it works for me.

#

That count allUnit blah thing is ugly

daring pawn
#

hmm, could it be the fact you've used spawn? To run the function of mine above, i'm using remoteExec

#

Maybe thats the source of it causing the crash?

#

Otherwise though, in what I posted there, the full code that i'm using, again theres nothing there that should result in a crash surely?

little eagle
#

remoteExec-Not-Call should make it be able to use sleep etc unless you used remoteExec ["call"];.

daring pawn
#
[_mkr] remoteExec ["gridState",2];
#

Nah nothing like that

little eagle
#

Is gridState defined on the server machine with the latest changes?

daring pawn
#

The updated function?

#

yea

little eagle
#

And you figured out that it crashed because it kicked you off I guess.

#

There is no reason what I posted would crash : /

daring pawn
#

Yea indeed.

#

Also having tried in editor, same thing causes my game to crash not server obviously

#

Its just odd

little eagle
#

How big's the rest of the code?

daring pawn
#

Instead of using the spawn you have, can you try it the same as I have mine, and remoteExec it?

#

The rest?

    _mkr setMarkerColor "ColorOPFOR";
    missionNamespace setVariable [format["%1hadqrf", _Mkr], nil];
    publicVariable format["%1hadqrf", _Mkr];
    [_gPos] remoteExecCall ["gridFromDB",2];
    [_mkr] remoteExecCall ["initZoneIND",2];

is the rest

#

when I had the old waitUntil I posted at the very start, no crashes occured. Even commented my stuff out to see if it was related. still crash.

little eagle
#
commy_CreativeFunctionName = {
   _mkr = "marker_0"; 
   private _time = 0;

   waitUntil { 
        if !(({side group _x == INDEPENDENT} count (allUnits inAreaArray _mkr) < 1) && ({side group _x == BLUFOR} count (allUnits inAreaArray _mkr) >= 1)) then { 
            _time = time;
            systemChat str 0.5; 
        };
        systemChat str 0;  
        time > _time + 60
    };
    systemChat str 1;
};

remoteExec ["commy_CreativeFunctionName"];

No crash.

daring pawn
#

0_0

#

Well what the shite

little eagle
#

1.76 stable, CBA dev as mod.

daring pawn
#

Yup same. + more mods but 99.9% sure they'd not affect this situation

peak plover
#

local variable in global space

little eagle
#

Yeah, I'm thinking the same.

peak plover
#

never seen this

#

What does it mean

little eagle
#

Check if you did

params ["noScore"];
peak plover
#

Ohh crap, gotcha

#

thanks

daring pawn
#

So i've had it work now. Only difference is not being in the Zeus Interface !_! cool beans ArmA

peak plover
#

using private array, because lazy

daring pawn
#

ah well, it works

little eagle
#

hmm, Zeus affects my part?

daring pawn
#

Having Zeus open when it gets called, causes a crash for me

#

I am running an extension for zeus, running ares achilles, might be relevant to causing it

little eagle
#

I retried with zeus and it worked fine. I had two loops of this running, one spawned one remoteExec'd.

daring pawn
#

Very likely then its the zeus mod i'm running, causing that when the function gets called

#

I've just called it on the dedi server, no crash and its functioned just fine

#

So that is indeed very odd

#

Ah well regardless, it works now, so I do appreciate that commy

little eagle
#

Now make it pretty.

#define COUNT_IN_MARKER_SIDE(marker,side) ({side group _x == side} count (allUnits inAreaArray marker))

private _time = 0;

waitUntil {
    if !(COUNT_IN_MARKER_SIDE(_mkr,independent) > 1 && COUNT_IN_MARKER_SIDE(_mkr,west) < 1) then {
        _time = time;
    };

    time > _time + 60
};
daring pawn
#

Can you define inside a function or does it have to be outside it?

little eagle
#

Anywhere in that .sqf file or in one that was #include'd

daring pawn
#

Alright, swell, cheers

simple solstice
#

is there any situation that remoteExecCall should be used over remoteExec

#

?

little eagle
#

If you use a function (not command) and want it to run in unscheduled environment.

simple solstice
#

so for displaying a message its perfectly fine to use it, right

little eagle
#

Depends on how complicated it is. UI is a classic example of stuff that get's ruined by the sche-du-le-r.

austere granite
#

you mean the sche-le-r-du right?

simple solstice
#

It's just an UI element popping in with a message

quasi rover
#

I try to protect safety zone and kick too much shooting player only in the zone, but all players get kicked to the lobby with this script.
There might be a problem in commnad line: "LOSER" remoteExecCall ["endMission", player];
how to fix it?

//init.sqf:
execVM "safeZone.sqf";
//safeZone.sqf:
#define SAFETY_ZONES    [["Respawn_West", 120], ["air_spawn", 120]] 

if (isDedicated) exitWith {};
waitUntil {!isNull player};

player setVariable ["num_fire", 0];
player addEventHandler ["FiredMan", {
    _shooter = _this select 0; 
    _projectile = _this select 6;
    _target = if (isplayer _shooter) then [{cursorTarget},{ assignedTarget _shooter}];
    
    if ({_shooter distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then {
        deleteVehicle _projectile;
        private _num = (player getVariable "num_fire") + 1;
        player setVariable ["num_fire", _num];
        if (_num >= 30) then {
            "LOSER" remoteExecCall ["endMission", player];
        };
    } else {
        player setVariable ["num_fire", 0];
    };
    if ({_target distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then
    {
        deleteVehicle _projectile;
    };
}];
slender halo
#

it doesn't kicks player, it ends the mission

quasi rover
#

yeap, all players go to the lobby. that's problem.

peak plover
#

why are you remoteExec'ing?

#

Btw you are remote execing where

(local player)
#

Which is true everywhere

#

wait...

slender halo
peak plover
#

that might not be true πŸ€”

simple solstice
#

@quasi rover wouldnt it be better to create a trigger on the zone, add allowDamage false when entered and allowDamage true when left?

little eagle
#

isplayer _shooter
???
_shooter is always player

quasi rover
#

I want to kick too much shooting player to the lobby only, not servercommand #kick. πŸ™‚

little eagle
#

The remoteExec is pointless

slender halo
#
_target = if (isplayer _shooter) then [{cursorTarget},{ assignedTarget _shooter}];
#

?

simple solstice
#
 shot = 0;
player addEventHandler ["FiredMan", {    
    if ({_shooter distance getMarkerPos (_x select 0) < _x select 1} count SAFETY_ZONES > 0) then {
shot = shot + 1;
        if (shot >= 30) then {
            "LOSER" call bis_fnc_endmission;
        };
}];
peak plover
#

why remote exec

#

wtf

subtle ore
#

Why end the mission?

little eagle
#

Makes no sense.

#

Better.

simple solstice
#

forgot he even had it

#

LOL

#

and thats it.. if you want to kick players who shot over 30 times in the zone

slender halo
#

you can't end the mission for one player only

peak plover
#

Yea you can

still forum
#

you can.

simple solstice
#

you.. can?

little eagle
#

Yes you can.

indigo snow
#

Wanna bet

simple solstice
#

4x combo

quasi rover
#

Wow... 😳 too much mistake in my scirpt right?

simple solstice
#

you just overthought it

little eagle
#

Just that one line.

simple solstice
#

@quasi rover i reccomend you to create a trigger that will handleDamage false to the object which enters it, then handleDamage true so people dont get hurt in the safe zon

slender halo
#

local action, local effect my bad, sounded senseless

simple solstice
#

in the if

peak plover
#

or distanceSqr atleast

waxen tide
#

I ran linux servers for ages, and i tried windows server ONCE and only for arma. Never again.

still forum
#

Same here πŸ˜„

quasi rover
#

thanks guys, I'll think again.😳 πŸ˜…

astral tendon
#

[car2D] join grpNull;
[car3D] join grpNull;
[car4D] join grpNull;
this sleep 1;
car2 doMove (getMarkerPos "Marker2");
car3 doMove (getMarkerPos "Marker3");
car4 doMove (getMarkerPos "Marker4");

#

this is a trigger

#

how do i use that sleep command?

little eagle
#

The trigger runs in unscheduled environment. You can use suspension commands like sleep in scheduled environment only.

#

You need to switch to scheduled environment using spawn.

astral tendon
#

[] spawn {sleep 1};

#

like this?

peak plover
#

ye boi

subtle ore
#

πŸ‘€

astral tendon
#

[car2D] join grpNull;
[car3D] join grpNull;
[car4D] join grpNull;
[] spawn {sleep 1};
car2 doMove (getMarkerPos "Marker2");
car3 doMove (getMarkerPos "Marker3");
car4 doMove (getMarkerPos "Marker4");

#

now i have a problem

#

the AI does not move on the doMove order

#

the reason why i remove they from the group is that they keep formation and not obey the marker

simple solstice
#
0 spawn {
[car2D] join grpNull;
[car3D] join grpNull;
[car4D] join grpNull;
sleep 1;
car2 doMove (getMarkerPos "Marker2");
car3 doMove (getMarkerPos "Marker3");
car4 doMove (getMarkerPos "Marker4");
};
#

more like that

#

@astral tendon check if they are local to the server

astral tendon
#

how?

simple solstice
#

it has an aL tag, which means the arguments (in this case the unit) needs to be local to the client issuing the command

astral tendon
#

but how do i know that?

simple solstice
#

you use the local command.

#

it returns true if the unit is local to the unit issuing the command

astral tendon
#

if (!local _unitName) then {
hint "remote";
};

#

like this?

#

i put that on the console?

simple solstice
#

yes

#

if you want to issue a command from a unit thats not local, use remoteExec and use the object you want to issue it on as the target

astral tendon
#

ok i dont really get it

#

there is a way to i just set my unit to local then?

waxen tide
#

you can use createVehicleLocal to spawn a unit locally on your machine only

astral tendon
#

this is a coop set up

waxen tide
#

well, each unit is always controlled by one entity.

#

this might be the server, a player pc, or a headless client

#

you can't apply commands to a unit if it isn't local to machine you're executing your script on

#

well you can, but then you need remoteexec

astral tendon
#

god

#

so all this i am doing may not even work on a server?

simple solstice
#

no

#

if you are serious about arma

#

and want to do something with scripting

#

read this

little eagle
#

AI units created after mission start via scripting will be local to the computer that issued the command
Lies. They will be local to the machine that owns the group.

simple solstice
#

can you edit the wiki then? :p

#

if you can even edit the wiki lol

astral tendon
#

so, let me see if i get it

#

driver = remote

#

vehicle it self = local?

simple solstice
#

uh

#

it all depends whos asking

#

a player is always local to the player

astral tendon
#

urg

#

so there is other way around what i am doing?

#

its like this

#

my cars, move into a possition

#

they get there

#

hit a trigger

#

now 3 of they must go to 3 diferent markers on the map

simple solstice
#

how are the cars spawned? and whos the group leader?

astral tendon
#

but the AI forces to keep in formation and ignores the markers

#

its a AI

simple solstice
#

disableAI

astral tendon
#

wait, that wont just turn they off?

simple solstice
#

you can disable parts of the AI

astral tendon
#

what do i need to disable?

#

so they do not keep formation and follow the markers?

simple solstice
astral tendon
#

they still move to a marker over a doStop command?

simple solstice
#

if you issue it before doMove

astral tendon
#

like

simple solstice
#

Order the given unit(s) to move to the given position (without radio messages). After reaching his destination, the unit will immediately return to formation (if in a group); or order his group to form around his new position (if a group leader). Use doStop to stop units returning to formation.

astral tendon
#

cars doStop;
sleep 1;
cars doMove;

simple solstice
#

its from doMove

indigo snow
#

Why not move them into different groups when they have to split up

astral tendon
#

if i do that they screw up the convoy

simple solstice
#

im not really familiar with AI in Arma, so the only help I can provide is reading the descriptions and searching for commands ;/

#

just remember about locality.

#

if you want to remoteExec e.g. doMove on the cars its something like that

#
[car2, getMarkerPos "Marker2"] remoteExec ["doMove",car2];
#

it will run the script on the client thats local to the car2

astral tendon
#

but i need a doStop to all of they frist right?

simple solstice
#

i don't know this. check it yourself :/

astral tendon
#

it is giving a generic error

#

missing a ;

#

i tink i fixed it

tough abyss
#

Any modders here willing to share experiences? I'm looking to become a mod creator, I can combine some skills I've achieved in domain, maybe..

indigo snow
#

Just start doing stuff man

tough abyss
#

I don't know how to start

#

and what to use

#

I know to do modelling and stuff

#

If that helps me

indigo snow
#

Then make a box and look up a tutorial on how to get the box in game

astral tendon
#

@simple solstice that works

tough abyss
#

a box?

indigo snow
#

Sure

#

Keep it simple

tough abyss
#

What do you mean?

indigo snow
#

Model a box

#

Make it a mod so it appears as an object in game

#

???

#

Profit

#

Theres a few tutorials around on how to make an addon for objects

#

But youre really in the wrong channel for that, that stuff is #arma3_model

tough abyss
#

Right, what about making making insignias?

indigo snow
#

Sure, look up how theyre done and recreate it

#

Maybe look at someone elses insignia mod

tough abyss
#

And how do I release the mod on steamwork shop?

indigo snow
#

Arma tools has a publishing tool

simple solstice
#

@astral tendon huh? which one πŸ˜„

astral tendon
#

[car2, getMarkerPos "Marker2"] remoteExec ["doMove",car2];
[car3, getMarkerPos "Marker3"] remoteExec ["doMove",car3];
[car4, getMarkerPos "Marker4"] remoteExec ["doMove",car4];

#

they out of formation and get into the markers

#

i did not put a dostop

#

this is inside of a trigger

#

[car2, getMarkerPos "Marker2","Marker3","Marker4"] remoteExec ["doMove",car2];

#

i wanna they to follow multiples markers

#

this is how i do it?

simple solstice
#

no no

#

"MOVE" is the waypoint you want to use

astral tendon
#

[car2, move "Marker2","Marker3","Marker4"] remoteExec ["doMove",car2];

#

like this?

cinder gyro
#

How would I go about spawning in a ammobox with specific items in it? I am trying to create something like this: You would walk up to a marking on the ground then get a scroll option to spawn in the box and then have some specific items in it.

indigo snow
#

Look up the addMagazineCargoGlobal command and its friends

cinder gyro
#

I looked at that earlier but how would I do that if the box itself is not spawned yet but gets added by thesame script? Sorry if these are really stupid questions btw

willow basin
indigo snow
#

@cinder gyro you add the commands to the script that spawns the box

cinder gyro
#

Is there an easy way to add a cooldown to addAction?

rancid ruin
#

what do you mean? like, after using the action it disappears and then comes back later?

cinder gyro
#

Yea

rancid ruin
#

easiest way would be to remove it after it's used, then re-add it after a set period of time i guess

#

you probably figured that out already, but it should be easy to code

polar folio
#

you could use the condition parameter combined with a setvariable on the object of the action to set a time stamp

waxen tide
#

how come i can't find a single proper SQF editor. is it so hard to combine my favourite syntax highlight color scheme, a 100% complete function autocomplete lib, linting and github integration into one program?

subtle ore
#

@waxen tide git integration is a little bit much to ask for, try Arma studio

waxen tide
#

well so far i haven't found anything that matches poseidon's autocomplete

#

will try, thanks

waxen tide
#

i'm very unhappy.

subtle ore
#

@waxen tide Personally, i use notepad. Syntax highlighting and automatic complete lib is overrated 😏

waxen tide
#

currently i'm using poseidon, and then i check the linting with atom.

#

i'm very unhappy.

subtle ore
#

Taking the easy way out i see πŸ‘€ Not allowed my fried

astral tendon
#

variables are case sensitive?

ionic orchid
#

I use Visual Code and the sqf highlighter for that

#

it works well enough for me

waxen tide
#

does it have full autocomplete lists?

ionic orchid
#

Code has another sqf parser plugin to highlight errors, which is why I stick with it

waxen tide
#

time to install more tools i guess.

#

i couldn't be bothered with visual studio or arma studio. if i can't drag a file into the program and look at it, its needlessly complicated to set up. 🀐

#

autocomplete looks solid tho

ionic orchid
#

code is different from studio, it doesn't have a 'solution' concept - it mostly just works with a folder structure, so you point it where you want your 'root' to be and all the files are just there

waxen tide
#

yeah, noticed.

#

holds down CTRL

ionic orchid
#

I like it a ton, I would probably use notepad++ if I wasn't already using it as the place to edit all the data

waxen tide
#

turns his mouse wheel

#

observes as nothing happens

ionic orchid
#

haha indeed

waxen tide
#

linter doesn't lint.

astral tendon
#

for some reason in the editor my keys are swaped

#

for exemple this ' is doing ~

robust hollow
#

your keyboard is a different language

#

or... your keyboard settings i mean

ivory vector
#

is there a way of listing all custom radio channels to see how many are free ?

rotund cypress
#

Make an array when you add them

#

@ivory vector

ivory vector
#

Balls, thats made my job a bit harder xD, I was going to try and detect how many free customchannels there were. and set mine based on how many were free.

#

if I try and create a channel it will return "0" as the channel index wont it ?

rotund cypress
#

Just create them on server on mission start. Then create an array with each channel that you create.

#

Then pull whatever channel you start adding to people out of the array, then insert it when you are done again.

#

As long as you do not create any channels, 9 will be free IIRC

#

Just work from that

kindred lichen
#

Hey, anyone know if there's a way to change a players' stance via scripts? like force them to step out to the left or right, similar to ctrl+A / D?

rotund cypress
#

Check that

ivory vector
#
if (isServer) then
{
  private _index = 1;
  for _i from 6 to 15 do {
    _format = ["Phone_Channel_%1",_start];
      private _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _format, "%UNIT_NAME", []];
      if (_channelID == 0) then {diag_log format ["Custom channel '%1' creation failed!", _channelName]};
    _index = _index + 1;
  };
};

``` something like that would work I guess.
rotund cypress
#

Recommend you do this instead if !isServer exitWith {}

#

Unless you are always executing that function on server, then there is no need for check

ivory vector
#

its a server side pbo so it shouldnt be an issue.

rotund cypress
#

Then no need for isServer check

ivory vector
#

all the code side of things are going to be compilefinal on the server

#

apart from the init.

rotund cypress
#

Also, start your loop from 0

#

And use _i or something

#

Then do _i + 6 instead

kindred lichen
#

@rotund cypress thanks, found something good enough.

rotund cypress
#

Np

ivory vector
#

testing now πŸ˜ƒ thanks Simzor.

#

working on a non modded calling system -_- done it with tfar. but vanilla its very limitting.

#

only 9 channels to play with, and with altislife, takes that down to 6

rotund cypress
#

Just remove the channels already created, there is no need for them and I have absolutely no idea why Tonic would add custom channels...

ivory vector
#

I have no idea, xD just going to have to put something in place so people cant just fill the channels the entire server... put in a calltime/battery feature.

#
  for _i from 0 to 9 step 1 do { 
    _format = format ["Phone_Channel_%1",_i]; 
   private _channelID = radioChannelCreate [[0.96, 0.34, 0.13, 0.8], _format, "%UNIT_NAME", []]; 
   if (_channelID == 0) then {diag_log format ["Custom channel '%1' creation failed!", _channelName]}; 
    if (_channelID != 0) then {diag_log format ["Custom channel '%1' creation successful!", _channelName]}; 
  };
``` doesnt seem to producing any errors.
rotund cypress
#

You are only doing that on step 1

#

Remove the step 1

#

Also "" must be surrounding _i

#

also make _format priivate as well

ivory vector
#

Yup just fixed that. my brain isnt working properly tonight.

#

umm. it decides to init twice now xD

astral tendon
#

is there a way to i set a passanget seat as a commander seat?

waxen tide
#

perfect!

#

python2, python3, all the same. i just ported the poseidon plugins to sublime 3.

ivory vector
#

i have just moved from posiden to Atom, i do miss the auto indention, and private generator though xD

#

can be so lazy with posiden...

kindred lichen
#

So I'm trying to get players to do x action y number of times cumulatively, So just as a team, action x needs to be done y times. How do I properly keep track of that globally? is there like a way to sync variables across the server to all clients? Or a way for clients to call an action server side?

ivory vector
#

I think altis life has somthing..

waxen tide
#
// commy2 solution for voting (example: carrier deploy)
// abuse object as "namespace"
if (isServer) then {
    missionNamespace setVariable ["asdfg_voteNamespace", createSimpleObject ["Building", [0,0,0]], true];
};

// client
asdfg_voteNamespace setVariable [str clientOwner, "yes", true];
To count the "yes" or whatever:
{asdfg_voteNamespace getVariable _x isEqualTo "yes"} count allVariables asdfg_voteNamespace
#

arma will sync vars you attach to the object automatically for you.

#

works fine! is also apparently performant.

kindred lichen
#

Thanks,

Last question I think, Is there a way to use Count, but instead of true or false, have it add Values? Like { _x getVariable "points" } Count AllPlayers;

#

That script creates placeholder objects?

#

So like, everytime Action x happens you create an object that holds the value, and then just count the number of objects?

waxen tide
#

yeah dedmen commented on my github about that... also apply .. but i didn't wake up enough to understand it yet. the way i figure count evaluates the code in the {} and if that equals true it counts. you can use _x to get the current element inside the code just like foreach etc.

#

i'm just the night shift, the competent guys are asleep.

astral tendon
#

is there i way to change the identification of a player as a AI for other AIs?

ivory vector
#
private ["_unit","_anim"];
_unit = [_this,0,objNull,[objNull]] call BIS_fnc_param;
_anim = [_this,1,"",[""]] call BIS_fnc_param;
_cancelOwner = [_this,2,false,[true]] call BIS_fnc_param;
if (isNull _unit || {(local _unit && _cancelOwner)}) exitWith {};
_unit switchMove _anim;
``` this is what alitislife uses for animations.
#

dont know if that helps atall.

nocturne iron
#

Does anyone have some good documentation on the CBA fleximenu stuff?

waxen tide
#

There is a command in the BIKI that allows you to show colored text with different font sizes in the bottom of the player's screen. Searched for half an hour but i can't find the damn thing.

robust hollow
#

titletext?

#
titleText ["<t color='#ff0000' size='5'>RED ALERT!</t><br/>***********", "PLAIN DOWN", -1, true, true];```
waxen tide
#

yes. thanks. 😳

astral tendon
#

there is a command to turn on and off the "stay on road"?

rancid ruin
#

think that comes under AI behaviour

#

like depending on if they're set to "careless" or whatever

zenith totem
#

Anyone know if there's a way to check if a vehicle is created using createVehicleLocal specifically

astral tendon
#

that does not work

zenith totem
#

Using local isn't adaquete since the vehicle could be local to the player but "public"

astral tendon
#

there is a "stay on road" check box, but in one point of the map that they need to be off road this needs to be turn off

#

wait, i tink i find it

#

forceFollowRoad

delicate totem
#

@zenith totem If a vehicle was created using createVehicleLocal, the vehicle won't exist on other computers. The vehicle only exists on the computer it was created on.

robust hollow
#

if a vehicle is created using createvehiclelocal the vehicles netid will be '0:0'

astral tendon
#

i need to set up a trigger that 8 cars must be in it and it will only start of those 8 get in it

#

you guys can give me some help on it?

nocturne iron
#

@zenith totem you can check if it exists on the server

astral tendon
#

count [onu1, onu2, onu3] == 0

#

this is the trigger condition

#

atually it did worked

#

wheeled

#

of couse it did not worked all the way

#

thats why i need the command to turn it off

#

this happen when he was doing a verry close conner

#

i made a trigger that turns it off

#

so he can do the coner

#

speed also matters

#

{isNull _unit _x} count [onu1, onu2] == 0

#

is this right for a trigger condition?

#

the trigger must activate when those 2 units get in

astral tendon
#

(onu1, onu2 in thislist);

#

how i put those 2 units?

copper raven
#
onu1 in thisList && onu2 in thisList
#

@astral tendon

astral tendon
#

thanks man

golden storm
#

Hello everyone πŸ˜ƒ So, i've got a quick question, or so i think, so i made this mission in which you have to hunt down 3 Narcos, but they're in a party, the moment you get close (BLUFOR "present" activated trigger) they will try to start running to a helo and the pilot will get in first (so he gets the pilot seat) and then he'll fly them off to a point in the map that if the reach makes you lose the mission, thing is i made the init in the 3 Narcos this:

NarcoName disableAI "MOVE";

and then on the trigger i placed:

NarcoName enableAI "MOVE";

Y syncd the trigger to they waypoint of both, pilot and narcos so that when the player gets inside the trigger it activates, and they get inside the helo and then i placed a waypoint with this init:

((obj1 in helo1) || (!alive obj1), (obj2 in helo1) || (!alive obj2), (obj3 in helo1) || (!alive obj3))

and i also tried that with a "Waypoint activation" trigger, but the pilot will still fly off withouth the 3 guys

sullen willow
#

What did I do wrong?

/*
    Header
*/
author = "Motorola";
onLoadName = "Tangle";
loadScreen="Pictures\ship.jpg";
onLoadMission = "The USS Hamilton meets an enemy carrier off the shore of Stratis. A confrontation is inevitable.";

/*
    Classes
*/
class CfgSounds {
    sounds[] = {};

class MOTO_alarm1
{
    name = "alarm1";
    sound[] = {"sounds\alarm1.ogg",1,1};
    titles[] = {};
};

class MOTO_men
{
    name = "men";
    sound[] = {"sounds\men.ogg",1,1};
    titles[] = {};
};

class MOTO_zone
{
    name = "zone";
    sound[] = {"sounds\zone.ogg",1,1};
    titles[] = {};
};```
#

It says line 35 is missing '}'

copper raven
#

you forgot } at the end for cfgSounds

subtle ore
#

🀦

sullen willow
#

We all have to learn at some point

#

Thanks

subtle ore
#

Yeah, but you were literally. Missing a bracket.

astral tendon
#

(onu1 in thisList && onu2 in thisList);

golden storm
#

You have n } missing

astral tendon
#

this is how it is supouse to be on the trigger?

#

in condition?

copper raven
#

yeah

sullen willow
#

I don't see the point in giving someone shit who's still learning.

subtle ore
#

I'm not giving you shit at all, nor is anyone else. But you gotta look over it first man.

rancid ruin
#

hang him

sullen willow
#

I did what I thought I was supposed to do. It pointed me to line 35. The missing bracket wasn't even at line 35.

rancid ruin
#

missing the closing bracket is a serious offense

sullen willow
#

It is. I'll accept the hanging.

subtle ore
#

Oneoh, are you the one who has been casting spells on people lately?

golden storm
#

It said it was in line 35 because i think the engine counts the brackets in pairs, so what happened it counted pairs for all the brackets but since 1 once missing it "though" it would go at the very end hence why it says it was missing line 35 when you only have 34 lines πŸ˜ƒ

subtle ore
#

Are you as a witch hunter, a witch?

rancid ruin
#

don't let the guys in #ip_rights_violations see your author name is Motorola either, they will hang you again

astral tendon
#

so, with the (onu1 in thisList && onu2 in thisList); the vehicles are passing the trigger but its not activating

#

i need to do sometinng else?

golden storm
#

Roque try: (onu1 && onu2 in thisList);

#

Or:
(onu1 && onu2) in thisList;

#

Guys could i get some love over here with my question? 😦

subtle ore
#

Well to begin with, make sure not to post in two different channels.

golden storm
#

I wasn't sure where to put it actually

copper raven
#

just add a second trigger checking for pilot inside helicopter synced with passenger guys

#

so when pilot gets inside heli, the guys waypoints will fire

golden storm
#

The guys will try to get to the helo, so will the pilot, thing is i added a second trigger (first one is the one that fires their waypoints to get into the helo) that has the conditions or so i thought for the pilot waypoint (once he's in the pilot seat) to activate:

((obj1 in helo1) || (!alive obj1), (obj2 in helo1) || (!alive obj2), (obj3 in helo1) || (!alive obj3))

But apparently i did something wrong because it still doesn't check for the passengers and so the pilot just takes off as soon as he can and flies away withouth the other guys

cinder gyro
#

Eh, do you guys know what up with this? _box addItemCargo ["G_40mm_HE", 80]; It doesnt spawn anything the the box

#

It works for some ammo added by a mod but not for this

waxen tide
#

how do i get rid of ""string"" -> "string"

copper raven
#
call compile ""string"";
waxen tide
#

thanks

cinder gyro
#

Nvm 🀦 I cant even read...

astral tendon
#

this one did not worked (onu1 in thisList && onu2 in thisList);

#

other idea?

distant egret
#

@astral tendon you sure you have setup the rest of the trigger right?

copper raven
#
 (onu1 inArea thisTrigger && onu2 inArea thisTrigger);
#

I dont use triggers, there are maybe better ways to do it

astral tendon
#

now it worked

#

thanks guys

astral tendon
#

question

#

{isNull gunner _x} count [car1, car2, car3, car4] == 0

#

what does that 0 stand for?

peak plover
#

So, using xeh, any advantages using the class instead of CBA_fnc_addClassEventHandler for a mission?
I'm intending to add auto-loadouts, so all vehicles, units will get proper gear

copper raven
#
{isNull gunner _x} count [car1, car2, car3, car4] == 0

counts how many cars have a gunner in that array, if none of those cars have a gunner, returns true, else false @astral tendon

peak plover
#

Does gunner return null if there is no gunner?

copper raven
#

was just about to look

astral tendon
#

but what is that "== 0" ?

peak plover
#

Don't know try

#

Use the watch boxes

#

Spawn in 2 vehicles, 1 win crew 1 without. Look at the vehicle and watch box code:

gunner cursorObject
copper raven
#

what do you mean? == 0?

#

if count with that condition in array is equal to 0 it retuns true

#

else false

#
{isNull gunner _x} count [car1, car2, car3, car4] > 2
#

if there are more than 2 gunners

astral tendon
#

also, this is in a trigger

#

what about the reverse?

#

{isNull gunner _x} count [car1, car2, car3, car4,car5,car6] == 0

#

if i wanna limit of 4 gunners to the trigger starts

#

how should i put it?

simple solstice
#

@waxen tide there is a better way to remove additional ". just use str

copper raven
#
{!isNull gunner _x} count [car1, car2, car3, car4,car5,car6] >= 4

if there are 4 or more than 4 gunners inside the array it will return true
@astral tendon

astral tendon
#

so that number in the end means the amout nessesary?

copper raven
#

ye

#

i edited it

#

was my mistake

peak plover
#

@copper raven does => work, doesn't it have to be >=

copper raven
#

idk, yeah maybe

#

if it errors just change it up

astral tendon
#

{!isNull gunner _x} count [car1, car2, car3, car4, car5, car6] =<4

#

like that it will trigger if there is less than 4 gunners?

copper raven
#

yeah less than 4 or equal to 4

still forum
#

smaller than. smaller or equal. bigger or equal.
You don't really say equal or bigger. so >=

peak plover
#

add more parenthesis

spice kayak
#

Well, I've almost made a functional bubble shield.

#

Kind of.

peak plover
#

nice

spice kayak
#

Yeah, my issue now is trying to figure out how to make the bubble somewhat transparent, as I'm just using a pre-existing object in the game.

spice kayak
peak plover
#

Tht's prety col

tough abyss
#

How would i go about displaying a picture in the middle of a screen of a player for lets say 5 seconds?

spice kayak
#

["<img image='PathToImageHere' />"-1,-1,4,1,0,789] spawn bis_fnc_dynamicText;

#

Something like that?

tough abyss
#

Yeah i tried that, however, im looking to have the picture take up the entire screen. This just creates a small image in the center.

tame portal
#

@tough abyss Make it a RscTitle

polar folio
#

you can use ctrlCreate

#
_ctrl = (findDisplay 46) ctrlCreate ["RscPicture", -1];
_ctrl ctrlSetPosition [safezoneX, safeZoneY, safeZoneW, safeZoneH];
_ctrl ctrlSetText "path\to\pitcutre.paa";
_ctrl ctrlCommit 0;

0 = _ctrl spawn {sleep 5; ctrlDelete _this};
#

damn

#

how do you wrap code again?

copper raven
#

`sqf

#

3 `

peak plover
#

I'm losing my mind here


17:17:50 "[WEST,""WEST""]"
17:17:51 "[EAST,""EAST""]"
17:17:52 "[any,""GUER""]"
17:17:53 "[any,""CIV""]"
#

            ["WEST",[west,"WEST"],"Select west to be changed"],
            ["EAST",[east,"EAST"],"Select east to be changed"],
            ["GUER",[independent,"GUER"],"Select independent to be changed"],
            ["CIV",[civilian ,"CIV"],"Select civilian to be changed"]
#

Why on earth do west,east work but indep,civ dont?

atomic epoch
#

Result of passing an agent with setVehicleVarName to a "side" command:

_agent = createAgent [typeOf player, position player, [], 0, "NONE"]; 
_agent setVehicleVarName "ai"; 
systemChat format ["Side: %1", side ai]

// Side: 00000000023AFA50

WHAT?!?!

peak plover
#

wtf

copper raven
#

@peak plover i think its resistance and civ

peak plover
#

civ returns nothing in watch box
civilian returns CIV in watch box

atomic epoch
#

I found out this bug after 4 HOURS of losing my mind.
I QUIT

copper raven
#

its civilian, for indep its resistance, but dont know why civilian side isnt working

polar folio
#

it's only caused by setVehicleVarname? i never seen or used that before

peak plover
#

resistance still rturns ANY

#

@copper raven

copper raven
#

When used in a format statement (hint format["%1",resistance]), the string returned is "GUER".

peak plover
#

Yeah but I don't need format

#

I need the side variable

#

west/east/resistance/civilian

#

Those are not trasnferred for some reason through my button

#

but west,east work

atomic epoch
#

@badbenson#0154 "side _agent" works fine, returns west. "side ai" returns.... Idk

peak plover
#

resistance,civilian,independent don't work

polar folio
#

what do you need the setVhicleVarname for though? curious

atomic epoch
#

Im doing "compile format [<create some agent>]", so I need setVar so I have something to reference my agent by

cloud thunder
#

_agent = createAgent [typeOf player, position player, [], 0, "NONE"]; _agent setVehicleVarName "ai"; ai = _agent; systemChat format ["Side: %1", side ai];

peak plover
#

```sqf
_agent = createAgent [typeOf player, position player, [], 0, "NONE"];
_agent setVehicleVarName "ai";
ai = _agent;
systemChat format ["Side: %1", side ai];
```
Like that @cloud thunder

spice kayak
#

I just sleep when I'm stuck on something, because every time I lay down to try and sleep, the issue keeps bugging me until I mentally fix it, which doesn't help when I don't remember the solution upon waking up.

cloud thunder
#

ty

peak plover
#

werid thing with that west,east working resistance not working...
I changed into string and do extra checks that convert and it works

little eagle
#

I think SIDE independent is converted to GUER.

#

As string

peak plover
#

tells me any 'tho 😦

#

no explenation

#

from ```sqf
["WEST",[west,"WEST"],"Select west to be changed"],
["EAST",[east,"EAST"],"Select east to be changed"],
["GUER",[independent,"GUER"],"Select independent to be changed"],
["CIV",[civilian ,"CIV"],"Select civilian to be changed"]

to

17:17:50 "[WEST,""WEST""]"
17:17:51 "[EAST,""EAST""]"
17:17:52 "[any,""GUER""]"
17:17:53 "[any,""CIV""]"

#

I'd still like to know why, even 'tho I found a fix workaround

little eagle
#

What was the script again?

peak plover
#

ctrlButton value = [west,"WEST"] etc...

#

then later grab the thing

#

wait

#

setVaraible

#

on control

#

then grab

little eagle
#

Is there a call compile?

peak plover
#

..maybe?

little eagle
#

lol

peak plover
#

Yes

#

I didn't write this code, 1 month ago me did

#

Thre is a call compile

little eagle
#
call compile str west; // WEST
call compile str east; // EAST
call compile str independent; // any
call compile str civilian; // any
peak plover
#

🀦

#

Why

little eagle
#

SIDE cannot be serialized.

peak plover
#

what about west?

little eagle
#

Well, WEST and EAST can.

peak plover
#

I need more coffee to handle all of this...

#

I don't get it 😦

#

Other than they added indep/civ later and didn't go the same lengths

little eagle
#
str west; // "WEST"
str east; // "EAST"
str independent; // "GUER"
str civilian; // "CIV"
#
call compile "WEST"
call compile "EAST"
call compile "INDEPENDENT"
call compile "CIVILIAN"
vapid frigate
#

str _side is giving the "description" of the side, which annoyingly isn't the same as the command to return the side for indep/civ

little eagle
#

str SIDE only matches the command name for WEST and EAST.

#

You'd need a small function to serialize SIDE type.

#

Not that hard.

cloud thunder
#

don't forget about this still being a thing str resistance ; // "GUER"

little eagle
#
private _fnc_serializeSide = {
    #define SIDES [west, east, independent, civilian]
    #define SIDES_STR ["WEST", "EAST", "INDEPENDENT", "CIVILIAN"]

    params [["_side", sideUnknown, [west]]];
     SIDES_STR param [SIDES find _side, "SIDEUNKNOWN"] // return
};
#

There are some more, but this should be enough for what you're doing.

#

Jigsor, resistance is just an alias for independent.

#

Exactly the same thing.

#

The game can't tell the difference between those two.

#

Like west and blufor, and east and opfor.

cloud thunder
#

well only sice A3 but yeah

#

Its what I use from habit

little eagle
#

Sure, every time I speak it's about the current version of A3 unless stated otherwise.

cloud thunder
#

its not obsolete

#

incase you want to make your script for public and cover all bases

indigo snow
#

the commands are different but the return is the same, so it doesnt matter

little eagle
#

It isn't, but it doesn't matter which one you use. I like west more than blufor, but independent more than resistance for whatever reason.

#

Just personal preference.

#

incase you want to make your script for public and cover all bases
That you don't need to do, because two commands are identical and the game can't tell the difference as I wrote.

cloud thunder
#

resistance is shorter. lol

little eagle
#

Example:

[west, blufor] find blufor // 0
#

resistance reminds me of EE.

#

"resistance is voltage per current" or however these things are labeled in English.

#

/giphy resistance is futile

#

: (

peak plover
#

haha