#arma3_scripting

1 messages ยท Page 419 of 1

long gazelle
#

Small correction..

lone glade
#

I mean, phase not phace ๐Ÿ˜„

long gazelle
#

That's what it says.

lone glade
#

oh wait, no

#

it's because you're using this in the code block

#

it's undefined there

long gazelle
#

So give the object a name and call it with that?

lone glade
#

not necessarily, hitPart passes the object being hit doesn't it?

long gazelle
#

yes.. I tracked it with this: this addEventHandler ["hitPart", {systemChat str (_this select 0) select 5)}]

subtle ore
#

hitPart returns array

long gazelle
#

As you guys taught me earlier today.

subtle ore
#

Hence array expected object

lone glade
#

in this case this is the selection

#

ah fuck I gave you the answer again

long gazelle
#

So: this addEventHandler ["hitPart", {systemChat str ((_this select 0) animationSourcePhase "plate_1")}]

subtle ore
#

Hm, okay.

lone glade
#

see the code you posted before this one^ and see where your error is

edgy dune
#

okay so about when I assked about getting actions from the action menu

#

so what im tryna do is

#

say theres a helicopter that has a action that opens like the rear ramp

#

and theres one that closes it

#

is there away I can get hte id of that action and then have it where the ramp goes down,waits 3 seconds and goes back up again

long gazelle
#

Okay, alganthe I need you to give me the code just straigth. I know you want me to learn but I can learn a lot better from that than from this frustration of not understanding.

#

Plus, on a clock here.

lone glade
#

this addEventHandler ["hitPart", {systemChat str ((_this select 0) select 0 animationSourcePhase "plate_1")}]

#

@edgy dune yes it's possible afaik.

long gazelle
#

Okay now it got harder... It prints 0 no matter what... Animations are between 0 and 1, so it should print 1 from shooting it on the other side.. But either side is giving me 0.

edgy dune
#

wat im also tryna do is key bind that action to a key,which for some reason in this mod i have doenst have the open/close ramp mapped

lone glade
#

i'm assuming they're config actions, you can't add shortcuts for those "directly" without editing the mod

#

you can, however, add an onKeyDown EH on display 46 with a similar condition that is used for the action

edgy dune
#

ill look in to that then

long gazelle
#

So alganthe, any ideas what next?

lone glade
#

I mean, considering there's a number behind "plate_" it's possible there's an anim for each one of them

long gazelle
#

Yeah..

cosmic kettle
#

Try

hintSilent str (selectionNames cursorTarget)

It should show you all target selections.

#

Or go through the config files, you'll easily find those.

lone glade
#

or even better, write a func that does it for you and returns the proper anim

long gazelle
#

I know the selections. I tested it out already.

lone glade
#

on this note, sleep time.

cosmic kettle
#

selections are not equel to animations.

long gazelle
#

They are named "plate_1" through "plate_6".

#

But I need more that that to have it return a different value when white and red are hit.

meager heart
#

return it yourself "manually" with EH

long gazelle
#

The dueling target has 2 sides on each 6 "plate_#", white and red.
I want to make the dueling target so that when a white side is hit nad it turns red, it returns variable _white to the execVM "point.sqf", and when a red side is hit and it turns white, it returns variable _red.

_white and _red are examples in this case, don't get attached to them.

cosmic kettle
#

I assume just rotating the object 180ยฐ is not a valid replacement? (scrap that, colors remain the same...)

long gazelle
#

Yeah, and it doesn't even have a different surface on either side.. Same surface on both sides.

meager heart
#

you can just reset them at start like you whant, add them in to array_white after hit add them in to array_red...etc

cosmic kettle
#

@long gazelle should the target still turn?

long gazelle
#

Yes..

#

The idea is a competition, who ever gets all of his sides plates turned to the opponets side wins.

#

sldt1ck that could work..

#

Wouldn't need the animation..

#

Now I just need to figure out how to assign them to arrays with eventhandler.

obtuse cosmos
#

๐Ÿ˜›

#

or does nobody else use set anymore?

#

hehe

meager heart
#

it's there in first link ๐Ÿ˜„

obtuse cosmos
#

but

#

I want to send links too! ๐Ÿ˜ข

#

๐Ÿ˜›

long gazelle
#

How do I remove them from arrays?

meager heart
#

Haz can give you a link ๐Ÿ˜‚

long gazelle
#

Simple subtraction?

cosmic kettle
#

@long gazelle As I'm currently working on targets, it seemed like a nice challenge. It's hacky, but works.

private _EH = (cursorTarget addEventHandler ["HitPart", {
  private _colorRed = "#(argb,8,8,3)color(1,0,0,1.0,CO)";
  private _colorWhite = "#(argb,8,8,3)color(1,1,1,1.0,CO)";
  private _target = ((_this select 0) select 0);
  private _selectionNames = (selectionNames _target);
  private _selectionArr = ((_this select 0) select 5);
  private _selection = if ((count _selectionArr) < 1) then {
    (_selectionArr select 0);
  }else{
    private _validPlate = "";
    {
      if (_x in _selectionNames) exitWith {_validPlate = _x};
    } forEach _selectionArr;
    _validPlate
  };
  private _selectionIndex = (_selectionNames find _selection);

  if (isNil {_target getVariable "currentColor"}) then {
    if (_selectionIndex < 3) then {
      _target setVariable ["currentColor", _colorRed];
    }else{
      _target setVariable ["currentColor", _colorWhite];
    };
  }else{
    if ((_target getVariable "currentColor") isEqualTo _colorRed) then {
      _target setVariable ["currentColor", _colorWhite];
    }else{
      _target setVariable ["currentColor", _colorRed];
    };
  };
  private _currentColor = (_target getVariable "currentColor");
  _target setObjectTextureGlobal [_selectionIndex, _currentColor];
  hint format ["Set texture: %1 on object: %2 / selection: %3", _currentColor, _target, _selection];
}]);
player setVariable ["myEH", _EH];
long gazelle
#

_a = _a - _b?

#

And I have NO idea what is happening in that code... (mostly because too long)

cosmic kettle
#

execute it on your target and try it out, I'd say that would be the least you can do lol

#

basically it figures out what the selection was you hit, figures out which color it needs to set and applies it to the according selection.

long gazelle
#

Nothing happened..

#

So nothing visual was supposed to happen?

cosmic kettle
#

If you executed it correctly on the target, it should hint what it's doing as you shoot it.

#

so maybe try executing it again

#

it also stores the EH in a variable on your player

#

well, the index that is.

long gazelle
#

How do I get the selection without the EH?

#

For example if I wanted to set the selection "plate_1" to array_white when the object is builded?

cosmic kettle
#

that would be this part of the code:

private _target = cursorTarget;

// get all selections
private _selectionNames = (selectionNames _target);

// find plate_1 index
private _selectionIndex = (_selectionNames find "plate_1");

// set white texture on index
private _colorWhite = "#(argb,8,8,3)color(1,1,1,1.0,CO)";
_target setObjectTextureGlobal [_selectionIndex, _colorWhite];
long gazelle
#

Okay why do you keep using the cursor target?

cosmic kettle
#

you can swap that for whatever you like.

long gazelle
#

No I can't, I don't know the code.

cosmic kettle
#

to do so on init

#

you mean?

long gazelle
#

Okay I read what you just wrote and I don't understand any of it.

cosmic kettle
#

you mean

#

you place it in editor

#

and it should work on start

long gazelle
#

Something like that but it was a bad example.. I get the feeling what I wanted didn't convey through..

cosmic kettle
#

this setObjectTextureGlobal [((selectionNames this) find "plate_1"), "#(argb,8,8,3)color(1,1,1,1.0,CO)"];

#

put that in init

long gazelle
#

Again, no idea what half of that does..

#

Keep in mind that I am at level 0 with scripting.

cosmic kettle
#

I thought u just wanted it to work and were on a clock? You can just look up the functions or read what I write.

#

that last line

#

I eplained above^

#

it's those lines, compacted into 1 for easier use in 3den

long gazelle
#

Oh right, my clock ran out an hour ago..

#

So now I'm just doing it because of stubborness issues..

cosmic kettle
#
{ if (_x select [0,5] isEqualTo "plate") then {this setObjectTextureGlobal [((selectionNames this) find _x), "#(argb,8,8,3)color(1,1,1,1.0,CO)"];};} forEach (selectionNames this);

^above is to change all of them to white

#

re-read what I said. Some things might not make any sense at first glance, but it's about getting the logic. There are so many ways to get there.

#

imo, the eventhandler is the easiest one. no setup required ezpz

peak plover
#

๐Ÿคฆ

#

private _arrayB = missionNamespace getVariable ['perf_arrayB',(allMissionObjects "Building")];
#

it runs allMissonObjects every time, even 'tho it's not empty

#

i really missed my 3ms

subtle ore
#

I bet you miss that lifer code even more Nigel

peak plover
#

๐Ÿ‘† ๐Ÿ‡ณ ๐Ÿ‡ด ๐Ÿ‡น ๐Ÿ‡ฆ ๐Ÿ‡ฑ ๐Ÿ‡ฎ ๐Ÿ‡ซ ๐Ÿ‡ช ๐Ÿ‡ท

subtle ore
#

๐Ÿ˜‰

warm gorge
#

What could cause vehicles from an optional mod (loaded on the server with servermod launch parameter) not being detected properly when passed from a client to the server such as through a remoteExec?

fossil yew
#

"not being detected properly when passed from a client to the server such as through a remoteExec" - please elaborate

warm gorge
#

So lets say I get a nearby vehicle on the client with nearestObjects, and then send that vehicle to the server through remoteExec to store and delete, but nothing happens. Only with the modded vehicles though.

peak plover
#

can u create a vehicle just like that on the server ?

fossil yew
#

deleteVehicle takes global arguments

#

what are you using for deleting the vehicle?

warm gorge
#

deleteVehicle

peak plover
#

I think he is trying to

_vehicle remoteExec ['nig_cleaner_addToArr',2];
#

Or sth?

warm gorge
#

Yeah pretty much that

#

Creating the vehicle on the server works fine

peak plover
#
missionNamespace setVariable ['nig_vehicle',cursorObject,true];
#

Does that kind of stuff work 'tho?

fossil yew
#

that is weird, any modded vehicle or just a certain type?

warm gorge
#

My bad, turns out it does detect them, was just with my database setup. Was set to store class names with a max of 32 characters so was bugging out

peak plover
#

ahha

#
_arr = [0,10,20,30,40,50];
_deleted = 0;
for '_i' from 0 to (count _arr - 1) do {
    if (_i in [1,3]) then {
        _nil = _arr deleteAt (_i - _deleted); _deleted = _deleted + 1;
    } else {
        systemChat (str (_arr select (_i - _deleted)));
    }
};
_arr
// [0,20,40,50]
#

Found a way to use deleteAt in a useful way finally

meager heart
#

deleteRange also

peak plover
#

That won't help in my current case. I need the element returned and also I need to go through ~1000 elements

still forum
#

But you said you didn't wanna luup

peak plover
#

yah, was just for testing

#

inAreaArray is like 7x faster in my case

pliant stream
#

do you care about stability?

hallow spear
#

only on my truck

pliant stream
#

@peak plover if you don't care about stability, then it's much more efficient to swap with the last element and resize once at the end

#

this will give you linear instead of polynomial complexity

still forum
#

"much more"

#

You are talking about the engine having to move elements?

pliant stream
#

i'm talking about algorithmic complexity

#

your constant factors have nothing to do with that

still forum
#

But in the end it doesn't matter anyway. As SQF is sooooo slow compared to engine

#

If you do a swap that's 2 SQF commands. And then another one for the deleteRange at the end.
Which will in the end be much slower than just letting the engine move the memory

pliant stream
#

sure, for small datasets the naรฏve algorithm will be faster, but it doesn't scale

still forum
#

Sure

#

If you are on multi million element arrays then it might start to matter slightly

#

It is just a plain memory move. 2 pointers per array element.

#

At more than a gigabit/s ram speed... Doesn't really matter.

#

You're gonna get bigger benefit by just reducing the number of SQF instructions

pliant stream
#

yeah it'll probably be faster because of the comparatively huge constant factors that the extra instructions introduce, but i was trying to point out the naivetรฉ of the algorithm. it's always good to consider such things even if in practice the algorithm with higher complexity wins out

long gazelle
#

So A3_Stickie send me this bit of code that I first didn't understand: ```private _EH = (cursorTarget addEventHandler ["HitPart", {
private _colorRed = "#(argb,8,8,3)color(1,0,0,1.0,CO)";
private _colorWhite = "#(argb,8,8,3)color(1,1,1,1.0,CO)";
private _target = ((_this select 0) select 0);
private _selectionNames = (selectionNames _target);
private _selectionArr = ((_this select 0) select 5);
private _selection = if ((count _selectionArr) < 1) then {
(_selectionArr select 0);
}else{
private _validPlate = "";
{
if (_x in _selectionNames) exitWith {_validPlate = _x};
} forEach _selectionArr;
_validPlate
};
private _selectionIndex = (_selectionNames find _selection);

if (isNil {_target getVariable "currentColor"}) then {
if (_selectionIndex < 3) then {
_target setVariable ["currentColor", _colorRed];
}else{
_target setVariable ["currentColor", _colorWhite];
};
}else{
if ((_target getVariable "currentColor") isEqualTo _colorRed) then {
_target setVariable ["currentColor", _colorWhite];
}else{
_target setVariable ["currentColor", _colorRed];
};
};
private _currentColor = (_target getVariable "currentColor");
_target setObjectTextureGlobal [_selectionIndex, _currentColor];
hint format ["Set texture: %1 on object: %2 / selection: %3", _currentColor, _target, _selection];
}]);
player setVariable ["myEH", _EH];```

But after going through it couple of times I started to make something out of it.
The idea is that when ever I shoot at a Dueling Target (the one with 6 plates that switch side from white to red and vice versa when shot) and it assignes the targeted plate to either _colorWhite or _colorRed and removes it from the other debending on which it was when shot...

Stickie told me to execute this in my target and I did.. But so far it has done nothing.. No hint, no error, no nothing.. Any ideas?

still forum
#

```sqf
```

instead of

```
sqf
```

lone glade
#

it won't work, his code is supposed to change the color of the plate

#

but i'm fairly sure those don't have dedicated texture selections

long gazelle
#

The plates are numbered 1 through 6 but the sides don't have own selection.

lone glade
#

that's their damage selection

long gazelle
#

Also Dedmen, that's what I wrote but it didn't work..

little eagle
#

hit selection has no relation to hidden selection.

#

They're different.

#

This will not work in principle.

long gazelle
#

Well I'm out of ideas and don't even know how half of this stuff works..
Because no matter what I try I can't figure out how to do it.

The idea is to have a competition between 2 players, one shoots white targets and the other one red targets.
Who ever shoots all of his targets to the opponets side first or has more targets shot to oppenents side when time runs out wins.
The challenge is that when an opponent shoots a target it becomes your target, thus the competition can go for quite a while.

The final code needs 2 parts that I don't know how to do:

  1. take all the Dueling Targets in the area and assign selections "plate_#" (1, 2 & 3) to arrayWhite (this formats the dueling arena, I only need one array to keep track of to assign victor, so no need for arrayRed.)
  2. EH that changes adds "plate_#" to arrayWhite if it was shot on the red side and removes it if it was shot on the white side.

When I tested out what selection name I was given when shooting target, I used code this addEventHandler ["hitPart", {hint str ((_this select 0) select 5)}]
As a result I got hint: ["flie_geo","plate_1"]
So the selection name itself is an array.

I've fallen in despair with this but I still wanna get it working, help would be appreciated.
But please try to make it simple, I don't understand too comlex line of code, at least without proper commenting.

still forum
#

You could spawn a red/white ball on the hit position to indicate a hit

peak plover
#

Ohh my good the poo poo man has returned!

long gazelle
#

Dedmen, you mean like a trigger?

still forum
#

Uh.. No.. Not at all

long gazelle
#

So what did you mean?

still forum
#

ACE advanced ballistics shooting range is spawning a semitransparent yellow ball on every place you hit

#

you cannot color the plates. But you can just spawn a colored ball over them.
So instead of red/white plates you have a red(or whatever other color) ball on the plate that indicates the last hit

long gazelle
#

Which I don't think I have.. Nor the community repository that I play with... Any way to do that without the mod?

still forum
#

the ball is part of vanilla

#

so you certainly have that

#

and the script that spawns that ball is also not ACE

#

Sadly don't have that mission/script on hand

long gazelle
#

You mean a baseball?

still forum
#

basically.
get position of the hit. modelToWorld createVehicle or createSimpleObject that ball object and color it
Not sure what it is. Looks like it might be a VR object

long gazelle
#

Didn't find anything in VR objects.. But I'll try to look in to it..

shadow sapphire
#

Does anyone know where to find a tutorial for the camera module in Edent?

peak plover
#

I'm trying to create clusters to optimize inAreaArray checks anyone ever done something like this?
I need it < 1ms with ~ 300 units boiling down to < 100 clusters

subtle ore
#

Under 1 ms?

peak plover
#

Yeah, total execution time for the clusters has to be <1ms. Otherwise it's laggy and tanks fps

subtle ore
#

What exactly do you mean by "clustering" ?

peak plover
#

Instead of checking 300 units with inArea / inAreaArray (too slow)
I would make clusters of the ones that are near eachother.
I got from 300 units to 60 clusters right now. But I'm wondering if anyone has done this,
because creating the clusters took me ~1.5 ms. Which means, every time I've checked all
clusters I create new ones and it's >1ms. I can feel the lag

subtle ore
#

Hmm, dunno. I've never seen anyone do something like that

peak plover
#

bi did it

subtle ore
#

Where at?

peak plover
#

at least I think so

subtle ore
#

Impossible to tell, iirc thats engine stuff

peak plover
#

Yeah, sadly they didn't put in any commands to fiddle with that

subtle ore
#

However, that's along the same lines i guess, it's just mapping simulated and non simulated objecr density

peak plover
#

They got some for dynamic sim. But I wish they just had the framework commands for what they did

#

So it could be used for other things.

subtle ore
#

They've likely got functions that create some random variable for reference

peak plover
#

I feel like, if I knew how to #Intercept. I could probably do it with that, and a lot faster/better

still forum
#

Someone called me?

#

That stuff on the screenshot is engine side

peak plover
#

Yah, but would that be really hard to do with #Intercept?

#

Also would that costr performance?

still forum
#

ALiVE is also building a caching system with Intercept

peak plover
#

Since #Intercept knows units locations anyhow

still forum
#

If you have the positions of the units already then a native inArea function would essentially be free

#

Yeah.. You can also get positions from units for free

peak plover
#

hmmm

#

What language is #Intercept?

still forum
#

C++

subtle ore
#

Can you show an example or something Dedmen?

peak plover
#

Maybe in summer, I'll have a jab

still forum
#

Example of?

#

Unit caching framework? XD I think that might be a little big

subtle ore
#

Getting the position of a unit in #inercept

#

Or is that big as well? Lol

snow pecan
#

((game_data_object*) sqf::player().data.getRef())-> get_position_matrix();

still forum
#

Thanks

#

Yeah. I know. That looks crusty no need to tell me that.
In my code that would look like
(static_cast<game_data_object*>(sqf::player().data.getRef())->get_position_matrix();
Yuck.

#

sqf::player here is actually not free nor safe (in multithreaded) But the rest is. So if you store an array of units then you can freely get the position of them later.

tough abyss
#

does anyone know why "createSoundSource" doesn't work on server or HC? it always returns: "Cannot find a sound file" but the soundfile is present and the path is relative to the mission folder.

peak plover
#

And it works on clients?

tough abyss
#

yep

peak plover
#

Maybe lack of interface

still forum
#

I don't know why you would create a sound source on a soundless machine

peak plover
#

^

still forum
#

It's a global effect command though

#

so not thaaat senseless

tough abyss
#

okay, i'll test a workaround then, thx guys

fleet wind
#

Hello there i am trying to make a simple hint when a player (Player activateing the script) enters an Area this works but only if i teleport to the trigger like in the script below if i simpley walk in the 10x10 area or drive in i do not get the hint any ideas why? ```sqf
//caller is defined and works
_caller setpos (getpos(_trigger));

if(_caller inArea _trigger) then {
hint "You have entered a zone";
};

#

defines for trigger ```_trigger = createTrigger ["EmptyDetector",getpos _Material];
_trigger setTriggerArea [20, 20, 0, false];
_trigger setTriggerActivation ["CIV", "PRESENT", true];

indigo snow
#

Youre not looping it, are you?

#

That script only checks once - immediately when it is called

#

If the player isnt in the trigger when the script gets called, it exits

fleet wind
#

Hahhaha Thanks been siting here for way to long to miss something that simple.

indigo snow
#

Since its a trigger, consider setting it as the onAct code

fleet wind
#

Is there another code to do what i want or is the only way to loop it ?

indigo snow
#

Trigger onAct or a loop, no event handlers for it

fleet wind
#

Is there a wikipage for onAct?

indigo snow
#

Probably, its the code field the trigger fires when it activates

#

Just look at the trigger stuff

fleet wind
#

Unable to find it ๐Ÿ˜ฆ

still forum
#

Hm... Never investigated when trigger code is compiled

#

I hope they don't recompile like eventhandlers

indigo snow
#

Sqm wise its stored as a string, so...

#

Not knowing engine stuff, can object vars be code (other than variables)?

#

Like how position is a vector3d

still forum
#

object vars are different from other vars?

indigo snow
#

Ugh words are hard

still forum
#

It could be stored as code certainly

#

And compiled when the trigger is spawned

indigo snow
#

Code type is already compiled,wasnt that the point?

#

Nvm

#

Reading is hard

still forum
#

words and reading are hard. true.

#

๐Ÿ˜„

fleet wind
#

This will have to be a task for tomorrow my brain is melting and i cant figure it out..... Thanks for all the help gents

indigo snow
#

@fleet wind look at the notes of that wiki

#

It has a literal example for a hint

fleet wind
indigo snow
#

Example 1

#

Under syntax

#

I also cant help but notice that in your original snippet you start with _trigger and immediately switch to _MatTrg

fleet wind
#

Yes sorry thats been fixed in the original code ๐Ÿ˜‰

still forum
#

Never pretend to "copy" your code into here and then show a modified version.

#

Never.

#

It's like saying "I want help with this 2+2" but actually you want "2+3".
So someone tells you "4" but it's wrong because that's not actually what you want

indigo snow
#

Abstraction is a good skill to learn tho

#

Just eh be careful

fleet wind
#

Roger that Thanks

little oxide
#

It's possible to have a relative position of an object from a memory point of a another model ?

indigo snow
#

_pos1 vectorFromTo _pos2

still forum
#

memory point tho

#

and vectorFromTo gives direction doesn't it?

indigo snow
#

returns array

#

and i guess youd transform the memory point into a world pos first

still forum
#

yeah. memoryPoint to world pos. And then vectorDiff

#

@indigo snow Unit vector, equal to direction from vector1 to vector2
direction != rel pos

indigo snow
#

ah read over the unit vector thing

still forum
#

Think you need sleep ^^

indigo snow
#

i do

#

long weeks with exams

little oxide
#

I have two position relative from my object, and i want the relative position of the position B from my position A

still forum
#

I'm on 5 hours sleep days... I tell myself everyday that I'll sleep earlier.. but noooope.

#

posA vectorDiff posB

#

should do it

#

Or maybe swap A/B

indigo snow
#

or multiply with -1

astral tendon
#

[] exec "scene.sqs";
How do i remoteExec that?

still forum
#

remoteExec exec with parameters [[],"scene.sqs"]

subtle ore
#

Wtf? Why are you using sqs?

still forum
#

Lazyness

#

or, little less lazyness and lack of ability to write proper sqf

#

Don't see any other reason why someone would

subtle ore
#

Or for whatever reason you're editing in OFP.

lone glade
#

or he's remaking the splash screen for arma 3 huehuehue

subtle ore
#

๐Ÿ˜‚

lone glade
#

yes, they're in sqs for some goddamn reason

still forum
#

Just have a sqs one liner that calls SQF script

subtle ore
#

Heh.

#

Roque, why do you keep making your life so difficult?

astral tendon
#

Why are you interested in my life anyway?

lone glade
#

because others might use that code as an example

still forum
#

Yeah! Are you a lifer or what? get out!

astral tendon
#

im just testing around with cutscenes

subtle ore
#

Why is it in sqs though?

astral tendon
#

this one is in SQS because i copy from a tutorial

subtle ore
#

Ugh.

lone glade
#

your tutorial is outdated as fuck then

subtle ore
#

Or you have the idiots that make the tutorial

astral tendon
#

I am waiting for yours tutorial about cutscenes

still forum
#

Or the lazy guys that copied a tutorial that copied a tutorial that copied a tutorial that were too lazy to do it properly

astral tendon
#

i will definaly like and subcribe.

lone glade
#

definitely*

#

and all the info you need is on the wiki

#

hell, didn't BI add 3DEN modules for into cutscenes ?

astral tendon
#

well, rip.

#

this one is also sqs

indigo snow
#

This script already exists within Flashpoint.

#

๐Ÿ˜„

lone glade
#

last edit: 2006

#

so about 7 years before A3 release ๐Ÿ˜„

#

arma 2 wasn't even released at that point

#

oh, correction, last one is from 2009

indigo snow
#

there is a Introduced in ARMA2: Operation Arrowhead

lone glade
#

so only 4 years before A3 ๐Ÿ˜„

astral tendon
#

well, you guys have a better tutorial around about cutscenes?

astral tendon
#

"How to make cutscenes in arma 3 (2018 updated)"

inner swallow
#

Camera.sqs will work in A3

#

but there is a better way

indigo snow
#

cutscenes in MP are a special bread and butter either way

inner swallow
lone glade
#

splendid cam can be opened via the escape menu tho

#

no need to call it

astral tendon
#

yeah, we have that camera, how about move it around and stuff?

inner swallow
#

Actually, forget what i said, camera.sqs can use controllers and stuff

#

since it uses the bulldozer binds

astral tendon
#

Like on a cutscene

#

Well, cant make this work. scrap all that.

peak plover
#

pushBackUnique not working with locations?

still forum
#

Uh

#

it works with anything.

peak plover
#

ohh nvm

#

I think it's 1 too many private

drowsy axle
#

Is there anyone available from ACE3?

lone glade
#

why?

drowsy axle
#

I'm trying to setup server settings. I cannot find the ace_server.pbo within the github or steam files.

#

I've also tried changing CBA settings for ACE. With no success.

#

mid-mission and restarted.

still forum
#

ace_server.pbo doesn't exist anymore

drowsy axle
#

.................. @still forum Thanks.

still forum
#

setting mission settings mid-mission doesn't make sense

drowsy axle
#

So..

drowsy axle
#

WTF has ace done then?

still forum
#

Either you set serverside settings mid-mission.
or you set mission settings when you build the mission

lone glade
#

oh god

#

here we go again

still forum
#

You should probably read the changelog of the mods you use...

drowsy axle
#

hmmm I've read their wiki. is that outdated?

lone glade
#

you didn't read the wiki then

#

because the header on the page in bright red says we switched to cba settings

drowsy axle
#

Yes

#

Which i've been accessing via Addon Options

#

I've also tried on the missions tab within the editor

#

With no luck.

still forum
#

and you ticket the "override" checkbox. Like the wiki says?

drowsy axle
#

Yes

peak plover
#

Do you want server defaults?

drowsy axle
#

All two of them Client and Mission.

#

I group I am in, wants to disable ACE Medical.

lone glade
#

ahahahhahaha

#

yes, that's not possible

still forum
#

And you didn't maybe set it so that the server overrides that again? By accident?

peak plover
#

delete medical pbo?

little oxide
#

it is possible to attaches object 1 to object 2, while preserving object 1 initial position and orientation against object 2, but with relative to a memory point of the object 2 ?

drowsy axle
#

@still forum I was editing the server tab from the editor

lone glade
#

yes niirozz

still forum
#

@drowsy axle Doesn't make sense again

#

maybe you should read the cba settings wiki page again

#

@little oxide setPos, setVectorDirAndUp

little oxide
#

but with attachto ? because my memory point will move with a animation

still forum
#

Yeah. That looks like it should set these settings

#

What do you expect to happen?

lone glade
#

you can't make an attachTo follow a memory point

still forum
#

Also I expect that screenshot was taken while you are on your server and logged in as admin

drowsy axle
#

Yes

#

Those are the setttings set

lone glade
#

as in you can attach object 1 to object 2 mempoint but it won't follow it's orientation or rotation

still forum
#

@drowsy axle What do you expect to happen ingame, which is not happening?

#

You disabled blood drops and blood is still dropping?

drowsy axle
#

It clearly says that it's enabled...

still forum
#

what?

#

Since when can arma talk?

drowsy axle
#

Blood drops

still forum
#

Ah

#

that was an example

drowsy axle
#

says = the screenshot

still forum
#

just ignore that and answer my question

#

What do you expect to happen, which doesn't happen though

peak plover
#

He can't modify the settings (i think)

drowsy axle
#

ace_medical_level

mortal folio
#

im pretty sure what hes trying to say is that no changes actually work

drowsy axle
#

is that ^ referring to the whole medical system, or a specific part..?

still forum
#

specific part

drowsy axle
#

Which part... specifically.

lone glade
#

am I having an aneurysm?

#

I can't make head or tail of your conversation

little oxide
#

@lone glade I think if you attach object 1 to object 2 mempoint, if you translate the mempoint, vehicle will follow it ๐Ÿค”

drowsy axle
#

What part of medical simulation = "disabled" does that change, within the medical system.

mortal folio
#

from what i can see he can't change any settings (if he enables something, it doesn't enable and vice versa) I had this issue myself

lone glade
#

yes, it'll float at that offset "following" it

#

however it won't change it's orientation or rotation based on the mempoint

#

where does it say medical simulation?

astral tendon
#

Well, coverted that file i made to a SQF and now it is working
[[], "scene.sqf"] remoteExec ["execVM", 0, true];
Does this going to work in MP and for JIP players?

lone glade
#

wat

drowsy axle
lone glade
#

is this from the rewrite?

still forum
#

no

lone glade
#

but.... you can't disable it

#

sounds like a setting that wasn't converted properly

drowsy axle
#

So our best option is to delete the medic .pbo okay.. thanks for no help at all.

#

I might just revert back to the old ACE with the fucking modules.

lone glade
#

....

still forum
#

level looks like it controls heartbeating effects and stuff

#

Yeah. Just revert back to the old ACE which didn't do anything differently besides having the same settings in a different place

indigo snow
#

might also wanna file a bug report so it can get solved

still forum
#

"Hey I made this PR to fix that" <couple hours later> "I have just found out how this thing I am changing here works. It is different from mission parameters"
Ah.. yeah.. GG

#

So no. Please don't file a bug report. Already exists

indigo snow
#

/shrug was going off of alganthe who said it looks like it didnt convert properly

still forum
#

Answer is still, not possible.

#

Delete the medical pbo

peak plover
#

^

indigo snow
#

Oh yes but at least thered be a ticket for the improperly converted setting

still forum
#

Not even improperly converted

#

It says "Disabled"

#

as in "This setting choice has been disabled and is no longer of any use"

#

A little confusing naming maybe.

#

There is a ticket for that exact issue. I bumped it. ACE dev will be looking at that tomorrow

#

Maybe change name from "Disabled" to "---" or "<unused>" or smth

indigo snow
#

Ah, it did confuse me, but that seems to happen a little to often for my preference these days

lone glade
#

true.

still forum
#

rage quits

long gazelle
#

Hey, is hintC message displayed on every player's screen?

indigo snow
#

No

long gazelle
#

Okay..

#

So who all see the message?

indigo snow
#

Only the client that executed the command

#

If you look the command up on the wiki, it says EL : Effects Local

long gazelle
#

Okay..

#
private _myTimeM = _this select 0;
private _myTimeS = _this select 1;
private _myTimeLimit = _this select 2;

if (_myTimeS == 60) then {
    _myTimeM = _myTimeM + 1;
    _myTimeS = 0;
    };
    
if (_myTimeM == _myTimeLimit) then {
    if (myValue < 30) exitWith {
        "TIME: WHITE WINS!" hintC format [
        "Time: %1 Minutes %2Seconds\nWinner: White\nTargets Remaining: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
        myBuzzer = true;
    };
    if (myValue < 30) exitWith {
        "TIME: RED WINS!" hintC format [
        "Time: %1 Minutes %2Seconds\nWinner: Red\nTargets Remaining: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
        myBuzzer = true;
    };
    if (myValue == 30) exitWith {
        "TIME: TIE!" hintC format [
        "Time: %1 Minutes %2Seconds\nWinner: TIE\nPoints: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
        myBuzzer = true;
    };
};
if (myValue == 0) exitWith {
        "TIME: WHITE WINS!" hintC format [
        "Time: %1 Minutes %2Seconds\nWinner: White\nPoints: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
        myBuzzer = true;
};
if (myValue == 60) exitWith {
        "TIME: WHITE WINS!" hintC format [
        "Time: %1 Minutes %2Seconds\nWinner: White\nPoints: White - %3, Red - %4", _myTimeM, _myTimeS, (60 - myValue), myValue];
        myBuzzer = true;
};


_myTimeS = _myTimeS + 1;
sleep 1;
_hande = [_myTimeM, _myTimeS] execVM "courseTimer.sqf";
#

So I have a courseTimer.sqf file.

#

When one of the conditions is met who sees the message? Is the computer that hosts the server always the client or what?

indigo snow
#

Wherever this is running

long gazelle
#

Ok..

#

Okay, so how would I be able to get 2 specific players who (I don't know, touch a laptop) to see it when one of the conditions is met?

indigo snow
#

With the remoteExec command

long gazelle
#

So I just need to execute that .sqf file with remoteExec?

indigo snow
#

Id rather just exec the hints

long gazelle
#

Ah

#

Can it be used to display to a certain player if that playerID has been stored to a variable previously?

indigo snow
#

Sure, or their player object

long gazelle
#

Ok.

astral tendon
#

{_x moveInGunner car_3} forEach units playersslots;

#

How do i remoteExec that?

lone glade
#

put it into a function and remoteExec that

#

or remoteExec call it

subtle ore
#

Errr..

lone glade
#

you choose which one you prefer

subtle ore
#

why not just at the playerslots are the target for remoteExec?

#

Will it take it?

lone glade
#

wouldn't help

subtle ore
#

Well why not?

lone glade
#

I mean, it's what he should do, but that's not what he asked

#

๐Ÿ˜„

subtle ore
#

๐Ÿ™„

astral tendon
#

Any example?

lone glade
#

midnight will help, i'm off to bed.

subtle ore
#
[_x,car_3] remoteExec["moveInGunner",playersslots,true];
#

That should work

#

Oh wait

#

nevermind

lone glade
#

arrgh, now I have to yell at you before going to bed

subtle ore
#

AAAH

meager heart
#

๐Ÿ˜„

subtle ore
#

You should've never left it in my hand

lone glade
#

_x is undefined or something else here, it won't work.

subtle ore
#

Yep

#

that's why I said "nevermind"

meager heart
#

Make function for it...

subtle ore
#

Lol

meager heart
#

oh

#
alganthe - Today at 5:33 AM
put it into a function and remoteExec that
or remoteExec call it
subtle ore
#

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

lone glade
#

you can even put the remoteExec in the foreach and send it where the unit is local

long gazelle
#

So if I have a laptop with: ```sqf
this addAction["Select Shooter 1", {whiteShooter = }];

What should I put in the {} so that the player in MP who presses that is assigned to a variable "whiteShooter"? Or what function should I be using?
astral tendon
#

so, another example?

meager heart
#

๐Ÿค

long gazelle
#

Yes, quiet night, isn't it?

astral tendon
#

well, i had to put that on a trigger
[thislist select 0,car_3] remoteExec["moveInGunner",0,true];

subtle ore
#

No, you didn't have to put it on a trigger

astral tendon
#

Have a better option?

subtle ore
#

sure, don't use triggers.

astral tendon
#

So, give me that code and i put it on my SQF

subtle ore
#
params[["_yourListThing",[],[[]],1];
[_yourListThing select 0,car_3] remoteExec["moveInGunner",0,true]; 
#

done

#

oh and your target is weird

#

why 0? That's everyone

astral tendon
#

it give a error when it was playersslots

#

eh, nevermind that, now i remember that JIPs will not know the variable car_3

meager heart
#

What should I put in the {} so that the player in MP who presses that is assigned to a variable "whiteShooter"?
Parameters array passed to the script upon activation in _this variable is: [target, caller, ID, arguments]

long gazelle
#

Can I get a bit more explaining? I just got more confused..

meager heart
#
Parameters array passed to the script upon activation in _this variable is: [target, caller, ID, arguments]
target (_this select 0): Object - the object which the action is assigned to
caller (_this select 1): Object - the unit that activated the action
ID (_this select 2): Number - ID of the activated action (same as ID returned by addAction)
arguments (_this select 3): Anything - arguments given to the script if you are using the extended syntax
long gazelle
#

(_this select 1)?

meager heart
#

yep

long gazelle
#

Okay..

meager heart
#

just read it dude

long gazelle
#

I am.. It's just that understanding it is a different thing..

long gazelle
#

Okay, so I just had the weirdest thing... For some reason exitWith didn't work for me even though it met te conditions.. And nothing re-executed the script so why didn't it exit the script?

#

Nevermind.. Found the problem..

tough abyss
#

@still forum cheers bud. I got communication between Intercept and C# established. Going to start testing real stuff now ๐Ÿ˜„

thorn saffron
#

How do you get what units player has selected as a commander? I want to execute a script only on those.

still forum
#

@thorn saffron commander? units? can't there only be one "commander" whatever that is?

#

Wut. How you gonna call it @tough abyss? Intercept# or #Intercept? ๐Ÿ˜„

thorn saffron
#

@still forum I mean like when you select a unit from your squad to give them orders.

still forum
#

You mean who he has selected in the command menu just before he gives them the order?
So the player is the group leader?
Sounded like you want to know who is the leader of the player. And not who the player is leading. Confusing

thorn saffron
#

The F1, F2 etc. selection

still forum
#

Well I don't know.. But I can use google.

thorn saffron
#

Yeah, I got a return about the "select" command

tough abyss
#

Anyone know of a way to put an individual ace vehicle key in a box instead of on a player? MP.

still forum
#

yeah. addItemCargoGlobal

tough abyss
#

How do you turn the key individual/to a specific vehicle? I previously linked it to a specific player, but I'm looking to place it in a box to handle MP JIP and NoShows. I'm not looking for a global/side vehicle key. Thanks!

still forum
#

There are vehicle specific keys ๐Ÿ˜ฎ

#

Oh I see..... oh man

#

You can add the key on a unit and let the unit put the key into the box manually. If you are willing to do that. And I can't really help you with that

unborn ether
#

@still forum Can you stop bullying people for nothing?

still forum
#

What?

unborn ether
#

That, @thorn saffron wanted a help, and not the "lets google" trolling. If you don't really know or understand the meta, try to speak to the people, dumbass

still forum
#

what?

unborn ether
still forum
unborn ether
#

#rules says that you should bully a guy who is trying to get a scripting help with sending him elsewhere in a style "google noobie"? If you don't get or know what to answer, just stay shut, dude. Why would you want to be a pain in each of the ass here?

#

And don't try to turn my words around, please.

still forum
#

I think you should calm down and think before talking.

#

There was no "trolling" or "google noobie" talk anywhere.
And you are the guy that started getting agressive and offensive for no reason.

unborn ether
#

I think you should also go google what's bullying lol

#

Oh look

still forum
jade abyss
#

๐Ÿ˜‚

pliant stream
#

bullying

#

๐Ÿ˜†

still forum
#

Not even allowed to help someone anymore just because I don't know the answer and am using google to find it? FFS

pliant stream
#

no that's bullying

#

take it to #bullying

meager heart
#

๐Ÿ˜„

barren magnet
#

@still forum that's worse than beeing a child rapist

unborn ether
#

Oh whatever, you're dull as usual, you hear what you want to hear.

pliant stream
#

man, you're just so much superior to everyone here, aren't you?

unborn ether
#

Thats your words.

still forum
#

No. I can read #rules
Abusive, racist, sexist, homophobic comments (or any other type of bigotry), personal attacks and name calling are not allowed
I think

  • Calling someone a dumbass for googling because he doesn't know the answer by himself.
  • Calling someone dull because he is of a different oppinion.
    falls under that.

5) No Spam
We deem spam as making a thread or posting a reply that has no real worth, is irrelevant, useless and offers nothing to a discussion

I already told you to cut the discussion as 8) Post in the right forum this is totally offtopic here.

pliant stream
#

yes i wrote them. they form a question, if rather a rhetorical one

unborn ether
#

The thing is, while you've been posting some "giggles" (not spam ofc) and telling me the rules, I did help that guy. What I've usually trying to do in a #arma3_scripting.

still forum
#

You did help that guy? By telling me not to "bully" him?
And me googling for him to help him resolve his issue and giving him the answer is not "help"?

pliant stream
#

you protected him from being bullied? ๐Ÿ˜†

fossil yew
#

Alright, truth be told, some people turning up here shouldn't bother doing any scripting as they don't know the basics nor they don't have the ability to ever understand it. They just want to get something done quickly and use someone else's knowledge, not bothering even to learn. I fully understand when more experienced people just wave them off.

#

So you're really got into wrong guy.

still forum
#

I usually wouldn't have answered as the question didn't make much sense. But I'm bored right now and I'm having a good day today.

fossil yew
#

He can tell you to do one, but it's because most of the time, you either know nothing or are too lazy to learn it.

thorn saffron
#

@fossil yew Oi, I may be dumb at scripting but there are things I want to do.

fossil yew
#

I'm not talking about you specifically.

unborn ether
#

Ok, so lets just turn all the guys seeking for scripting knowledge around and kick their bums ๐Ÿ˜„

#

Whoa

pliant stream
#

yes

still forum
#

@thorn saffron Your problem is just that you are very hard to understand quite often ^^
I think Tom is talking about these other kinds of people that ask the same question every few days and just never get it. Which is totally not you. You ask once and are done with it then.
Don't know how Demellion got onto that train tho

fossil yew
#

Consider a guy from ACE, a very experienced one too, is spending his free time on this channel. To answer questions. You should appreciate that and not be just another needy millennial soul.

The alternative is him going away and you speaking to Discord void.

still forum
#

I'm mainly TFAR/Intercept. I only do little stuff on ACE ^^

fossil yew
#

Ok, nvm. I've seen you around on ACE slack...

cedar kindle
#

@unborn ether please. that wasnโ€™t a lmgify link, it was a link to the BIKI and it was pointed out that google helped him. youโ€™re exaggerating this to a laughable level

still forum
#

Yeah. I'm just a guy that's always around ^^ But I don't dev much. Which is what I understand when you say "from ACE"

thorn saffron
#

English is not my native language and I just can't really wrap my head around scripting, so sometimes even I don't know exactly what to ask/look for

fossil yew
#

Also, sometimes being arrogant towards people is in reality a good educational method. That guy might do more effort before coming here.

#

Taro, for the last time, I don't think you're that guy! ๐Ÿ˜„

unborn ether
#

It's a cool stuff about that you made a TFAR/Intercept stuff, but why you should putt your **** on each face after that?

cedar kindle
#

๐Ÿ˜‚

still forum
#

Yeah Taro. Don't take it personal ๐Ÿ˜„ We are talking about people in general not you specifically ^^

pliant stream
#

๐Ÿค”

open vigil
#

...This is Scripting...

thorn saffron
#

@still forum You addressed me specifically

fossil yew
#

Sorry @unborn ether but you should have seen the questions that go around here. Most of them are:

PLEASE FIX MY SCRIPT - and then BOOM - dumps 20kB of code unformatted

thorn saffron
#

Anyway, that groupSelect command was what I was looking for

unborn ether
#

Ok, so lets line up everyone for that?

#

Whatever Im out again, im just another noname here so ๐Ÿ˜„

cedar kindle
#

youโ€™re making zero sense mate

open vigil
#

Youre beating a dead horse

#

This is the scripting channel, take the rest elsewhere

#

PM would be great

hushed minnow
jade abyss
#

```sqf
CODE
```

fossil yew
#

there are no colors, but you need to use what he said

#

ah lol

hushed minnow
#

ah okay, i'll retype the message i deleted

jade abyss
#

There are colors, stop lying!!!1111oneoneone

#

Aye, just remember: ```sqf -> Nextline CODE

hushed minnow
#

are those ` escaped? or it is really three of them

jade abyss
#

3

fossil yew
#

three, before and after

jade abyss
#
if(true)then{_Arr pushback [];};
hushed minnow
jade abyss
hushed minnow
#

Ok, ill edit that

jade abyss
#

Thats borked up too much^^

hushed minnow
#

It's his copy-paste so i can't do much

#

I noticed his variable was vehic, then later _vehicle, anything else that seems to be wrong?

jade abyss
#

Seems to be _vehicle

#

So vehic -> _vehicle

fossil yew
#

wouldn't be bad if you move all that code inside '' to some function, for clarity

still forum
#

Or atleast properly indent it so you can see where it starts/ends

hushed minnow
#

I told him that he probably should use the { } version inside would also look nice

still forum
#

IMO that might be a little small and too special purpose for a function

jade abyss
#

Instead of that Textwall, just a simply function.

hushed minnow
#

onSingleMapClick takes code or string

fossil yew
#

you can make something like

private _myLocalFunc = { code here };

#

and just inject it

jade abyss
#

Better editable + reusable, if he uses _vehicle = (_this select 0) createVehicle _pos; or something like it (yeah yeah... param... bla)

#

Nah Tom, that would be kinda pointless.

still forum
#

Btw onMapSingleClick " "; is not that good

jade abyss
#

You create a localVar wich you use only once after it

still forum
#

it will cause the eventhandler to be compiled and called although there is nothing there

#
onMapSingleClick {
    _vehicle = "B_Plane_Fighter_01_F" createVehicle _pos;
    private _pylons = ["PylonMissile_1Rnd_BombCluster_03_F", "PylonMissile_1Rnd_BombCluster_03_F", "PylonRack_Bomb_GBU12_x2", "PylonRack_Bomb_GBU12_x2", "PylonMissile_Missile_BIM9X_x1", "PylonMissile_Missile_BIM9X_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Missile_AMRAAM_D_INT_x1", "PylonMissile_Bomb_GBU12_x1", "PylonMissile_Bomb_GBU12_x1"];
    private _pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply { getArray(_x >> "turret") };
    { _vehicle removeWeaponGlobal getText (configFile >> "CfgMagazines" >> _x >> "pylonWeapon") } forEach getPylonMagazines _vehicle;
    { _vehicle setPylonLoadOut [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex] } forEach _pylons;
    onMapSingleClick {}; //Disable eventhandler again
    openMap [false, false];
};

FTFY

fossil yew
#

you're right

hushed minnow
#

that's definitely cool

#

btw is private and _underscore basically the same thing?

fossil yew
#

sort of

still forum
#

ughhh.... not really

#

private requires _underscore

#

private makes the local variable be even more local

fossil yew
#

private is more scope based AFAIK, _var is script scoped

still forum
#

Actually is useless in your script, but doesn't hurt

fossil yew
#

private?

still forum
#

yeah

fossil yew
#

well, unless your script has multiple nested loops... but that's rarely the case

#

but ok

hushed minnow
#

so

_scriptlocal; 
{
    private _scopelocal;
    _isntThisScopeLimited;
}```
still forum
#
_var = 1; //_var is now 1
_pvar = 1; //_pvar is now 1
if (true) { //Open up new "scope" visible by the {}
    _var = 2;  //_var is now 2
    private _pvar = 2; //Creates a new variable instead of editing the existing _pvar. So _pvar is now 2 inside this scope
}
//but _pvar is still 1 outside of that above scope
//_var is still 2

jade abyss
#

fu

still forum
#

fm!

jade abyss
#

I was just about to write an example too, Dedmin

#

NO! You furry

hushed minnow
#

wait, so if a _local is declared inside a scope, is it still accessible outside of that scope?

still forum
#

Glad you understood what I'm trying to say ๐Ÿ˜„

jade abyss
#

๐Ÿ˜„

peak plover
#

#meToo

delicate mason
#

wait, so if a _local is declared inside a scope, is it still accessible outside of that scope?
no

still forum
#

@hushed minnow

_local overwrites the _local if it already existed previously in a higher scope.
private _local creates a new variable for the current and all lower scopes. But doesn't overwrite higher scopes

jade abyss
#

Just like the example above

#

shameless reposting:

_var = 1; //_var is now 1
_pvar = 1; //_pvar is now 1
if (true) then
{ //Open up new "scope" visible by the {}
    _var = 2;  //_var is now 2
    private _pvar = 2; //Creates a new variable instead of editing the existing _pvar. So _pvar is now 2 inside this scope
}
//but _pvar is still 1 outside of that above scope
//_var is still 2```
#

*fixed

hushed minnow
#

okay, learned a lot today

still forum
#

If you write _local it checks if it exists in the current scope, if not it goes one higher, and continues till it arrives at the highest scope or it finds it.
If it finds it it uses the one it found and possibly edits it. If it doesn't find it it creates a new variable in the current scope.
If you write private _local it literally only checks the current scope and doesn't go higher. And if it doesn't find it there it creates a new variable too

#

mucho texto.
I think we need a good writeup for this for the wiki

jade abyss
#

Just had the same thought

fossil yew
#

he is maybe asking about:

if (true) then {
  _isThisVisibleOutside = 'some string';
};

systemChat _isThisVisibleOutside; // if I understand - this is error?
still forum
#

yes. That's error

jade abyss
#

Correct

fossil yew
#

ok cool

still forum
jade abyss
#
_isThisVisibleOutside = "bla";
if (true) then {
  _isThisVisibleOutside = 'some string';
};

systemChat _isThisVisibleOutside; // = ? (question to you)```
#
  • 2nd question:
#
_isThisVisibleOutside = "bla";
if (true) then {
 private  _isThisVisibleOutside = 'some string';
};

systemChat _isThisVisibleOutside; // = ? (question to you)```
delicate mason
#

'some string' obviously

peak plover
#

This is some good quality teaching @jade abyss

jade abyss
#

I know, i am the best.

fossil yew
#

1st one is some string, 2nd one is bla

delicate mason
#

javascript's let has 99% the same functionality, could steal docs from that

hushed minnow
#

I wish i could give you reddit gold.

still forum
#

question to you who?

fossil yew
#

this few should go to the wiki though

peak plover
#

You can give him a ๐Ÿ’ฉ or a ๐Ÿ–

jade abyss
#

To Tom @still forum

peak plover
#

The student. @still forum

still forum
#

Someone make me a good writeup of all of this for a wiki comment and I'll push it onto there

jade abyss
#

Use the stuff from above

peak plover
#

^yes pls

still forum
#

But the stuff from above is confusing and split out :U

delicate mason
#

Use let documentation from javascript?

#

I was serious about that ๐Ÿ˜›

#

Variables declared by let have as their scope the block in which they are defined, as well as in any contained sub-blocks.

peak plover
#

I wanted to make a few comments on wiki, but still no new accoutns allowed ๐Ÿ˜ฆ

jade abyss
#
_LocalVar = "bla";
if (true) then
{
    _LocalVar = 'some string';
};
systemChat _LocalVar; // = "some string"
--------------
_LocalVar = "bla";
if (true) then
{
    private _LocalVar = 'some string';
};
systemChat _LocalVar; // = "bla"```
#

@still forum

#

Can't be done easier, tbh

hushed minnow
#

๐Ÿ‘Œ

jade abyss
#

Maybe adding a 2nd if to it with another private

peak plover
#
then
{

๐Ÿ‡น ๐Ÿ‡ท ๐Ÿ‡ฎ ๐Ÿ‡ฌ ๐Ÿ‡ฌ ๐Ÿ‡ช ๐Ÿ‡ท ๐Ÿ‡ช ๐Ÿ‡ฉ

still forum
#

lol... I just checked the source of the wiki page...
<notes section>
<footer>
<single note of a guy that apparently didn't understand where the notes section is>

delicate mason
#

All-in-one example?

private _localVar  = 1;

if (_localVar == 1) then {
  private _localVar = 2;

  systemChat _localVar;
  // expected output: 2
};

systemChat _localVar;
// expected output: 1
jade abyss
#

_x <- no

#

Don't teach em to use _x

delicate mason
#

๐Ÿ˜„

jade abyss
#

They will fk up the forEach stuff

delicate mason
#

you're right

jade abyss
#

Same goes for _i

peak plover
#
_a = 1;
call {
    // can this be called child scope?
};
jade abyss
#

Hell, i've even seen ppl using _forEachIndex as declared Var once

peak plover
#

question^

fossil yew
#

maybe :

if (true) then
{
    _LocalVar = 'some string';
};
systemChat _LocalVar; // = "some string"
--------------
_LocalVar = "bla";
if (true) then
{
    private _LocalVar = 'some string';
    systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "bla"
--------------
if (true) then
{
    _LocalVar = 'some string';
    systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // raises an error
jade abyss
#

@fossil yew
```sqf

#

NextLineCode

peak plover
#

is stuff in {
called a child scope?

delicate mason
#

@peak plover no that's not a child/sub scope

still forum
#

@peak plover yes

#

uh

peak plover
#

sub scope?

delicate mason
#

:/

jade abyss
#

Sub afaik

peak plover
#

hmm okay

jade abyss
peak plover
#

learn something new erryday

still forum
#

child scope/ sub scope/ lower scope

delicate mason
#

if you add a call would it still work?

peak plover
#

Yes

#

same

still forum
#

you have to add call

jade abyss
#

Same

#

call = executing the code in the current scope (more or less)

#

spawn = New scope

peak plover
#
if (true) then {
    // sub scope
};
call {
    // sub scope
};```
still forum
#

@jade abyss Arhhh no no no no

#

spawn = new script.

#

script != scope

jade abyss
#

With it's own scope

still forum
#

everything has a scope yes

jade abyss
#

yes

still forum
#

call creates a new sub scope

jade abyss
#

So technicaly it wasn't wrong

still forum
#

spawn creates a new scope in a different scriptVM

#

Are you guys done with changes on the note now?

jade abyss
#

New Scope, not related to old scope

#

Use mine, +maybe add a 2nd IF clause in the 2nd example

hushed minnow
#

I'm so glad that we're talking about this because I asked about private vs _underscore

still forum
#

I am too lazy to add stuff. I just wanna copy-paste some coudeh

delicate mason
#

coudeh โค

jade abyss
#

gimme a sec

peak plover
#
private _a = 1;
_b = 2;
if (true) then {
    systemChat str _a;    // 1
    systemChat str _b ;    // 2
};
call {
    systemChat str _a;    // 1
    systemChat str _b;    // 2
};
[] spawn {
    systemChat str _a;    // undefined variable
    systemChat str _b;    // undefined variable
};
[_a,_b] spawn {
    params ['_a','_b'];
    systemChat str _a;    // 1
    systemChat str _b;    // 2
};
jade abyss
#
if (true) then
{
    _LocalVar = 'some string';
    systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = ERROR _LocalVar doesn't exist in that Scope

--------------

_LocalVar = "bla";
if (true) then
{
    _LocalVar = 'some string';
    systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "some string"

--------------

_LocalVar = "bla";
if (true) then
{
    private _LocalVar = 'some string';
    systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "bla"

--------------

_LocalVar = "bla";
if (true) then
{
    private _LocalVar = 'some string';
    if (true) then
    {
        private _LocalVar = 'some other string';
        systemChat _LocalVar; // = "some other string"
    };
    systemChat _LocalVar; // = "some string"
};
systemChat _LocalVar; // = "bla"```
#

@still forum

peak plover
#

@jade abyss

jade abyss
#

if ($expr1)
{

fossil yew
#

add one where var is not defined at the beginning

#

error case

still forum
#

Already big enough though :x

jade abyss
#

added the error on top^^

fossil yew
#

sorry I'm blind

meager heart
peak plover
#

I need to switch gears for a bit.
I've decided to try to use loadout script in unschedueld. Is this generally a bad practice?

fossil yew
#

isn't Killzone Kid retired?

delicate mason
#

Yeah he raged out

jade abyss
#

XD i read "retarded"

fossil yew
#

ha no, retired

meager heart
#

^ First page on his blog

fossil yew
#

btw thx @jade abyss - finally learnt how to do colors

still forum
#

@meager heart is already on wiki. On the pages of the respective commands where that is relevant

jade abyss
#

link

#

plox

still forum
#

The links are all on his blog page

#

on the right side of his table on the commands wiki page

jade abyss
#

i meant the changes

still forum
#

not done yet

jade abyss
#

STILL?

#

WHY DO I EVEN PAY YA?

#

Wait... i don't

still forum
#

da

jade abyss
#

njet

meager heart
#

just net ๐Ÿ˜„

jade abyss
#

njet!

meager heart
#

๐Ÿ˜„

still forum
#

when a german says njet it produces the correct pronounciation

jade abyss
#

!

#

Can you unlock me on the Biki, deddy?

still forum
#

I wonder how americans pronounce that. Probably same tho

#

Depends on what you mean with "unlock"

jade abyss
#

Registraion of new accounts for the Community Wiki has been temporarily suspended. We apologize for the inconvenience.

still forum
#

can't create new accounts as that might probably fuck up the new account system

jade abyss
#

Login in with BI Account thinkingsherlock

still forum
#

If you have a old account that you forgot password tho

hushed minnow
#

isnt the current method to message the 'mod/big admin?' and ask to be manually added?

still forum
#

nope

#

That was the method a year ago

#

Then we got the new accounting system and everyone could create his own account

hushed minnow
#

funny, that was the last time i checked the forums

still forum
#

but since the spambots noticed that it's closed again

jade abyss
#

and everyone spammed in it

still forum
#

and because of how the new accounting system is woven into it.. Can't just create accounts manually anymore

jade abyss
#

Dude! You broke my
if
{
!

still forum
#

no. I fixed it.

jade abyss
#

Now it looks like cancer

#

Full ๐Ÿ’ฉ

peak plover
still forum
#

I no understand. But I think I like

peak plover
#

Instead of checking every single unit/object for clientSide caching

#

Checking clusters of them and then the units inside the clusters

meager heart
#

is it not the same ?

still forum
#

That's algorithm porn dude... Can't just share porn here :U

peak plover
#

nearestLocations is a lot faster then inArea / inAreaArray

hushed minnow
#

wait, so you are making a trigger areas and then check what triggers thems?

peak plover
#

Locations not triggers

hushed minnow
#

me no get it.

barren magnet
#

@hushed minnow I would think your names suggests you don't get it indeed

hushed minnow
#

well to be perfectly honest, I dont even know what he was trying to achieve. and thats half the battle

peak plover
#

There's 100 objects in 300 range. It will be clusted into 1 cluster.
If player is >viewdistance from the cluster. It will only check if cluster is close enough to the player.

If it is. then the units will be grabbed from cluster and checked individually

barren magnet
#

I see some nice circle's on a map

jade abyss
#

Trigger... who uses Trigger anyway since inArea? ๐Ÿ˜‚

hushed minnow
#

uh...... quickly goes updating legacy code

peak plover
#

Instead of checking all ~1000 objects I only check ~100 clusters

#

a lot faster

barren magnet
#

I use a trigger with an in eara in the condition :kappa:

jade abyss
#

Pls step on lego

still forum
#

Ah now I understood completly..

jade abyss
#

Or i steal "the fluff"!

still forum
#

I think that's exactly what engine side dynamic simulation does

jade abyss
#

@barren magnet

still forum
#

You steal me?

barren magnet
#

@jade abyss noooo not ze fluff

still forum
#

Why you wanna steal me?

peak plover
#

nearestLocations is a lot faster than checking inArea/InAreaArray for all the triggers

jade abyss
#

Oh yes! THE FLUFF!

peak plover
#

So locations is the way to go

barren magnet
#

Hmmmmmmmmm

jade abyss
#

The Fluff = Awesome Animal! (no, not you DedFurry)

#

A REAL animal

#

More fluff than animal

barren magnet
#

But doesn't nearest location only give you locations ?

still forum
#

yes

#

and then you use script to get all units in location

peak plover
#
nearestLocations [_pos, ["CBA_NamespaceDummy"], 1500]
barren magnet
#

While inarea is two points you check and you want to know if point xy is in area xyxyxyxy

still forum
#

@peak plover do you use script to search all units inside location? Or do you just save units in a variable on the location?

peak plover
#

save into a variable

#

And update clusters in a certain interval

barren magnet
#

Question is why would you want all units in a location ?

jade abyss
#

@barren magnet Keep in mind: InArea = Can check every kind of MarkerShape.

barren magnet
#

What if there is no location around it ?

peak plover
#

perf_fnc_updateClusters

jade abyss
#

ffs.. use another Tag

still forum
#

@Arkensor#0120 It's a caching system

peak plover
#

๐Ÿ˜ฆ

still forum
#

It creates the locations when it caches stuff out

jade abyss
#

๐Ÿ˜‚ @still forum
HL Noob ๐Ÿ˜„

peak plover
#

There dsha

still forum
#

Half life noob?

jade abyss
#

HighLight you imbecile

barren magnet
#

1/2 life noob?

jade abyss
#

LIFE! HE SAID LIFE! HANG HIM!

delicate mason
#

git him!!!

still forum
#

googles HighLight

jade abyss
#

Yeah, Hochlicht

still forum
#

Ohhh understood... crap

#

Hate you

jade abyss
#

i know

#

๐Ÿ˜˜

peak plover
#

1/0 life

barren magnet
#

"German life servers are the best arma servers" Triggering the whole community since 2001

unborn ether
#

๐Ÿคฆ

lone glade
#

man, you guys are having fun

jade abyss
#

So, any further questions up here?

lone glade
#

also dscha never sleeps

jade abyss
#

Yep

barren magnet
#

I'm not quite sure why you would like to cache units at as location ?

#

To remove them when nor near them at all ?

#

And spawn them in when you get close ?

#

Or what's the deal with it

peak plover
#

clientside caching

#

Only caching on the client

barren magnet
#

Caching what ... You cache a result of something to not recalculate something

still forum
#

Like BI dynamic simulation

peak plover
#

^

still forum
#

yes. delete/disable when you are too far.
and spawn/enable when you get close

peak plover
#

I only disable / enable

still forum
#

instead of checking each unit if it is close to the player. He checks only a few clusters of units

peak plover
#

1 player can be fighting in cherno. When other player is in elektro and he caches all the stuff in cherno. Gets more fps

#

dynamic sim only does this globally.

barren magnet
#

I won't call that "cache" tbh. I would call that an erea or interest optimization

still forum
#

It is usually referred to as "unit caching" I think.. Yeah.. There are better names

barren magnet
#

The units don't disappear they only use less computing power of not simulated

peak plover
#

๐Ÿคท

#

They also send no data

barren magnet
#

Not 100% certain that an non simulated object does not send data at all but it's less as a simulated one for sure

misty trail
#

Hi all is there any good Base Building scripts / addons out there ( like Exile) but not tied as not looking to use Exile

peak plover
#

PLANK

#

But probably out of date

barren magnet
#

Is that a name or just the first thing dscha says in the morning ?

peak plover
#

It's a construction script

barren magnet
#

Ic

lone glade
#

because having frames is too mainstream ๐Ÿ˜„

misty trail
#

Thanks @peak plover ill take a look now

little eagle
#

:sadpoop:

peak plover
#

๐Ÿ’ฉ man returns !

fossil yew
#

Q: Does AI artillery/mortar ever fire it's guns on it's own without scripted call like doArtilleryFire?

inner swallow
#

I don't think so

lone glade
#

don't think so either

inner swallow
#

oh wait

lone glade
#

they either need a fire mission WP or scipt magiks

inner swallow
#

mortars will

meager heart
#

deployed mortar - yes, arty - never saw it

inner swallow
#

Arty won't

#

Arty will engage with it's other turrets (HMG/GMG/etc)

fossil yew
#

@meager heart in what situations AI mortar fires on it's own? I'd like to use them natively without scripting or fire missions

#

do they need a spotter or something?

meager heart
#

was support group

fossil yew
#

beg your pardon?

meager heart
#

f2 - groups, or support in 3d eden

fossil yew
#

Haha, well, I know how to add mortar team. I'm talking in what situation does it fire without scripting...

#

But it seems they don't.

lone glade
#

they either need to be in a group that would spot the targets for them or somehow use High Command (HC)

#

otherwise the targets not being revelead to their group they wouldn't do jack shit

fossil yew
#

so add a 3rd member with this disableAI "PATH"?

inner swallow
#

They'll fire if the gunner has LoS on targets, too

fossil yew
#

alright

inner swallow
#

maybe if group leader has LoS too, but the last i tried using mortars like this in a mission was almost 3 years ago

fossil yew
#

btw think HC is not working on dedicated, last time we tried, it crashed the server... anyone had better experience recently?

inner swallow
#

works fine for us

lone glade
#

HC as in high command

fossil yew
#

I know. ok, maybe it's one of the zillion mods we have in the repo...

lone glade
#

as far as i'm aware it's an abandonned feature

inner swallow
#

I assumed headless client

fossil yew
#

๐Ÿ˜„

#

ok, so HC - no go

inner swallow
#

High Command works well too

#

At least with vanilla

fossil yew
#

in SP yes, in MP... crash

inner swallow
#

unless 1.78 broke it ๐Ÿ˜„

fossil yew
#

yeah, could be mods

inner swallow
#

If we end up running a high command mission again then i'll let you know how it goes (assuming i remember)

fossil yew
#

sure

tough abyss
#

@still forum naming ill worry about later. Nedโ€™s functionality

still forum
#

Ohayo

meager heart
lone glade
#

@still forum quick technical question about isnil

still forum
#

Hai

lone glade
#

isNil evaluates a code block when provided, correct?

still forum
#

Hai

lone glade
#

what happens if I evaluate a var that has a code block assigned to it? as in:

private _testBoi = {true};
if (isNil "_testBoi") then
#

does it check if the var exists or does it run the code block?

still forum
#

string variant checks if var exists

lone glade
#

thanks, i'll have to rewrite some stuff then

fossil yew
#

@meager heart Thanks for that. What if the mortar is static?

meager heart
#

da

#

it is static weapon, if you mean that ๐Ÿ˜„

lone glade
#

thank god using array select range doesn't error out when using a value higher than the number of indexes that can be returned

#

otherwise i'd have turned blue ๐Ÿ˜„

astral tendon
#

Does synchronizedObjects also return array for JIP players?

fossil yew
#

@lone glade not sure that's great, so many issues can happen?

lone glade
#

?

#

nah

#

it's just that I need the first 5 indexes of an array and discard the rest, I could check it via foreachIndex and use exitWith but I don't like that

still forum
#

Ewwww

#

I would have ๐Ÿ—žed you for that

lone glade
#

๐Ÿ˜„

fossil yew
#

lol

lone glade
#

better prune the array before I loop it than check if I looped it enough time each loop ๐Ÿ˜„

#

well, not really looping it, more like going through each index

fossil yew
#

@astral tendon think JIP doesn't affect that, not 100% sure though

lone glade
#

does synchronization persist after death? if yes it supports JIP, otherwise no

astral tendon
#

I know that they dont save the variables

fossil yew
#

AFAIK death => new entity

astral tendon
#

Death of a client or host?

lone glade
#

doesn't matter

astral tendon
#

check this

[thislist select 0,car_1] remoteExec["moveInGunner",thislist select 0,true];
#

i think that the JIP player will not have that car_1 variable

#

though i am remoteExec "moveInGunner"

still forum
#

That's not how that works.

#

You don't send "car_1" you send the content of that variable

#

Doesn't matter if the client that receives that messages has a "car_1" variable. Because the actual message in the JIP queue doesn't even contain the "car_1" variable name at all

astral tendon
#

That mean this still works?

still forum
#

yes

#

as long as the car still exists and wasn't deleted. It will work

#

Well.. Besides that the JIP is not enabled anyway with that command

astral tendon
#

how?