#arma3_scripting

1 messages Β· Page 354 of 1

astral tendon
#

is there a way to increase/reduce acuracy of a vehicle? i can redice the acuracy of a AI unit but not a gunner.

peak plover
#
private _nil = {_x setSkill ['aimingAccuracy',0.01];false}count (crew _vehicle);
#

In case commander has a weapon etc.

#

I find that setting all crew memebers to low accuracy causes less porblems then leaving some with higher accuracy, especially if vehicle might be different

#

And some vehicles have more than 1 gunners

astral tendon
#

that code i just trow on the vehicle init or i need to swap something?

peak plover
#

Yea you do

#
_vehicle = this;
private _nil = {
    _x setSkill ['aimingAccuracy',0.01];
    false
}count (crew _vehicle);
#

That should do the trick

#

Make sure you add that to the VEHICLE

#
comment 'Set group accuracy to low';
_unit = this;
private _nil = {
    _x setSkill ['aimingAccuracy',0.01];
    false
}count (units _unit);

Would work on group/unit

astral tendon
#

it seens to work

#

now the gunner did not sniped me

peak plover
#

I think some vehicles are scripted or sth, I couldn't change accuracy of some RHS vehicles..

#

or maybe old interpolation was playing tricks on me

#

Gotta retest ai

golden storm
#

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

astral tendon
#

you guys know a better way to make AI do a decent convoy?

copper raven
#

group them, and make waypoint on group leader, thats the best i can get, mb there is other way

astral tendon
#

way points does not seens to work if i need to stop a vehicel somewere and then move

copper raven
#

use waypoint activation fields to stop the vehicles etc

golden storm
#

@astral tendon you could use a trigger that uses "Group disableAI "MOVE""

#

Oh yeah, you'd have to use it for every single unit, my bad

astral tendon
#

my problem really is that some times i need they to split to park in one directon but they do not break formations

copper raven
#

the condition youre typing will never return true in my opinion

#

@golden storm what condition do you want ? the one youre typing is weird

waxen tide
#

@simple solstice thx

astral tendon
#

wait

#

disableAI works for groups?

little eagle
#

It's called a loop.

{
    _x disableAI "X";
} forEach units _group;
astral tendon
#

what is the equivalent to the DoStop to units follow their waypoint again?

little eagle
#
_unit doMove position _unit;

This will order them to move to where they are atm. Which will be completed instantaneously and then the unit returns to formation.

astral tendon
#

_unit is the name of the unit i need to swap?

little eagle
#

Yeah. It's a variable. Replace as needed.

astral tendon
#

in my case are 4 units

little eagle
#

This code is for 1.

astral tendon
#

so i just repeat?

little eagle
#

Yeah, or make a loop if you want it to happen at the same time and you don't want to write it down multiple times.

#
{
    _x doMove position _x;
} forEach [_unit1, _unit2, _unit3, _unit4];
#

The wiki lied again. It says forEach accepts uncompiled string as code block and so does the ingame hint.

"systemChat _x" forEach ["a","b","c"];

This just says "generic error" for me.

peak plover
#

Wiki is usually nice to me

#

maybe he lies when he's drunk

#

It is saturday after all...

queen cargo
#

@little eagle probably removed that

#

and nobody updated the wiki

#

weird part is the ingame hint though ...

#

that should work with supportInfo

astral tendon
#

commy2 that did not worked, the AI is not moving to its original waypoint

still forum
#

@little eagle I guess "(OFP / Armed Assault) " means String for OFP and Code for Arma

little eagle
#

Just delete it from the wiki if it no longer works ffs.

queen cargo
#

quick question: can doMove be used without errors for other objects? (createVehicle)

little eagle
#

Probably.

#

Just would have no effect.

queen cargo
#

that actually is enough for me

astral tendon
#

limitSpeed 0 does not work?

queen cargo
#

(A3 1.24)To clarify, limitSpeed only do effect on non-player controlled AI units, it has continuous effect and AI won’t break through the speed limitation until one is contacted, engaged or regrouped.

astral tendon
#

yes but, the AI still moves

golden storm
#

So i'm making a custom Arsenal with the help of a script i found on the ARMA 3 forums, i've modified it with the ACE and TFAR mods, and i've added some class names of the items i want to add, but although i have the ace mod enabled it will only list the vanilla items, and it will only show a piece of the error:

Class "TFAR_mr3000_multicam" not found in CfgWeapons

still forum
#

You have TFAR not loaded. Apparently. And if it doesn't show ACE items.. You also didn't load ACE

little eagle
#

They ignore the speed limit in danger mode obviously.

#

Isn't TFAR_mr3000_multicam a backpack and not a weapon?

still forum
#

backpack

#

true

golden storm
#

Well i have loaded both of them on my side, so i don't get why it won't show

little eagle
#

Don't use addWeaponCargoGlobal with a backpack is what the game is trying to tell you.

golden storm
#

_contents =
nul = ["AmmoboxInit",[_this,false]] spawn BIS_fnc_arsenal;

clearBackpackCargoGlobal _this;
clearItemCargoGlobal _this;
clearMagazineCargoGlobal _this;
clearWeaponCargoGlobal _this;

{
_toAdd = _contents select _forEachIndex;
_fnc = missionNamespace getVariable format [ "BIS_fnc_addVirtual%1Cargo", _x ];
[_this, _toAdd, true ] call _fnc;
}forEach [ "backpack", "item", "magazine", "weapon" ];

THats the code i used is it wrong?

little eagle
#

Probably not this part.

#

But that first line does look fishy.

#

Assignment without anything behind the equal sign.

queen cargo
#

mmhhn ... anyone here got a complete list of side commands?

#

eg. east

indigo snow
queen cargo
golden storm
#

Well i didn't paste the full list because it was huge

little eagle
#

west

#

east

#

blufor

#

opfor

#

resistance

#

independent

#

sideUnknown

#

sideLogic ???

#

sideFirendly

#

sideEnemy

#

civilian duh

#

something about animals too

#

Did I forget something?

queen cargo
#

for example

#

that is why i hoped for some comprehensive list πŸ™ˆ

little eagle
#

sideEmpty is "sideNull" I guess.

queen cargo
#

probably

polar folio
#

is there a command to set the text of a listbox to centered left or right?

little eagle
#

No.

queen cargo
#

no command, only style

polar folio
#

gerd dernit

#

thx though

little eagle
#

sideAmbientLife !

golden storm
#

So, on the arsenal would i need to use addWeaponCargoGlobal, addItemCargoGlobal, and so on manuall for it to work so i tell the game what kind of item they are?

peak plover
#

        while (_item isEqualType []) do {
            _item = _item param [0,""];
        };

does this make sense?

queen cargo
#

it makes item

little eagle
#

You just have to make sure that the radio backpack is in "backpack" and not "item", "weapon" or "magazine", Lorflord.

peak plover
#

lmao X39 πŸ˜„
It should find the string in all my 100 nested arrays

little eagle
#

Is item a string?

peak plover
#

[[[["rifle"]]]]

little eagle
#
_item = str _item splitString "[" select 0;
golden storm
#

Ok, thanks @little eagle ! πŸ˜ƒ

peak plover
#

"""rifle""]]]]"

little eagle
#
_item = str _item splitString "[""" select 0;

???

peak plover
#

I want it to automatically work if user makes a mistake and nests the array too many times πŸ˜‰

#

ye

#
_item = str [[[["rifle"]]]]splitString "[" select 0;_item

"""rifle""]]]]"

little eagle
#

"["""

#

not

#

"["

peak plover
#

"rifle"

#

w-works

little eagle
#

Of course it does!

peak plover
#

why "["""

little eagle
#

[ and "

#

It's just an escaped "

#

""

peak plover
#

is the while worse?

little eagle
#

It looks dumb, but so does mine.

indigo snow
#

the while would be worse if there would never be a string or anything in the array

waxen tide
#
systemChat format ["_size %1", _size]; // 4.62894
systemChat format ["_centerposASL %1", _centerposASL]; // [12435.8,14287.2,8.04945]
_check2 = [_centerposASL,_size,8,1.25] call Ivan_fnc_circle_check;
#

today is nothing works day.

#

Generic Error in Expression _check2|#|

little eagle
#

Delete the space between ``` and sqf and all spaces after sqf

waxen tide
#

ahhh.

little eagle
#

Top!

waxen tide
#

commy2 to the rescue, as always

little eagle
#

I think Ivan_fnc_circle_check returns the assignment operator.

waxen tide
#

googles assignment operator

little eagle
#

=

#

Example:

#
_a = {
    _b = 1;
};
#

^ This would cause the same error.

#

You have to make your functions so that they never end with an assignment operator, because SQF is shite.

#

Fixed:

_a = {
    _b = 1;
    nil
};
#

Sorry for the variable names. Too much trigonometry today.

little eagle
#

Just use the debug console and play around with:

_a = {
    _b = 1;
};
#

The function you posted looks fine. Updated by chance? The error is definitely from a returned assignment.

astral tendon
#

i remember i saw it some were, is there a command to set the distance of a vehicle to another?

astral tendon
#

yes is this

#

tanks man

nocturne basalt
#

Hi guys
is it possible to add a proxy using a script? or is attachTo the only way to add another object using scripting?

polar folio
#

depends on the functionality the attached object needs to have

#

you can always use simpleObject to spawn a thing without class name based on a model file path

astral tendon
#

how do i identifie a gunner of a vehicle?

#

like, i wanna make a telepor that one gunner in a vehicle gets teleported to another one

austere granite
#

gunner _vehicle

#

might not work for some vehicles, depends on the setup

#

like in a blackhawk / ghosthawk the door gunners are both "gunners"

#

in that case you'd have to use fullCrew and check for turret (with fire from vehicle turrets off)

waxen tide
#

@little eagle i uploaded the very current version of the function to github before linking to you.

astral tendon
#

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

#

this is acondition to a trigger

#

what is wrong?

still forum
#

bigger or equal. Not equal or bigger

peak plover
#

=

#

Thank god I've always done that the right way

astral tendon
#

thanks

#

gunner test moveInGunner car1;

#

this is a trigger activation

#

i wanna the "test" gunner to be in the car1 gunner

#

how should i put it?

copper raven
#

look up the syntax

myGunnerGuy moveInGunner myTank
little eagle
#

=> makes for the better smiley though.

astral tendon
#

how is the myGunnerGuy ?

indigo snow
#

test is a vehicle also?

astral tendon
#

i dont wanna put a name of a unit

#

yes

indigo snow
#
(gunner TESTVEHICLE) moveInGunner myTank
#

uh

astral tendon
#

i wanna the gunner of "test" moveInGunner to "car1"

little eagle
#

Delete the space after sqf

indigo snow
#

merci

#

adding the () should work, Roque

astral tendon
#

so (gunner test) moveInGunner car1

little eagle
#

Parenthesis aren't needed.

astral tendon
#

did not worked

#

no error

nocturne basalt
#

@badbenson#0154
thanks

autumn palm
#

Hey guys, I'm trying to use BIS_fnc_spawnGroup to spawn custom compositions that consist of buildings and units.

When I use this function, it doesn't seem to make use of the "dir" attribute and just points all of the objects in the composition in the same direction... any thoughts? Or more information needed?

subtle ore
#

@autumn palm dir = direction 0-360 iirc

autumn palm
#

It can't be outside of this? I thought - just "counterclockwised" it

subtle ore
#

No I don't think so. What are you trying to do exactly?

autumn palm
#

I have a laptop that's a Composition Spawner

#

Brings up a list of compositions

#

You choose a composition

#

then select a spot on the map

#

and it safe spawns it around where you clicked

#

Just tested a composition that has all 0-360 directions and it did the same thing :/

subtle ore
#

well yes, the direction parameter doesn't go past that.

autumn palm
#

Ignore the dir outside of 0-360

#

They're all within 0-360 in another composition I'm using

#

this one was just more concise

#

@subtle ore Bohemia themselves use negative values for dir in their cfggroups btw

subtle ore
#

I think you mis understood what I had said.

autumn palm
#

Alright, can you clarify, please?

subtle ore
#

What I had meant is that, yes you can input a negative value but it's from 0-360 in either direction

#

if I didn't convey that clear enoug the first time, I am sorry

autumn palm
#

Nah, that's fine, well then my config groups adhere to that standard

#

Still need to find out why it's not taking effect when using BIS_fnc_spawnGroup

#

If I put them down in Eden they all face the correct way no problem

subtle ore
#

if you pass a direction in the spawnGroup function then it'll take over the direction defined in config afaik.

autumn palm
#

Yeah, I'm not passing a direction

#

I assume it defaults to nil... maybe that's the problem

subtle ore
#

check out what the default is in the header. Maybe it assumes a default direction

autumn palm
#

Looks like spawn group does default an azimuth

#

I'll just take it and rewrite it to pull the object's dir

#

thanks much!

subtle ore
#

Sure.

rotund cypress
#

Does anyone know what colour I can use for a chrome colour on vehicle?

young current
#

grey?

rotund cypress
#

I mean to actually get a chrome colour

young current
#

chrome is light grey. its just super reflective soo Id suppose you need to have high specular value on it

#

and maybe mess with the fresnel value

rotund cypress
#

Hmm alright

young current
#

if this for car rims then 😝

atomic epoch
#

How to send an invite link for discord?

subtle ore
#

@atomic epoch click the little avatar button next to a channel. It'll walk you throgu the invite, but this shouldn't be in the scripting channel.

atomic epoch
#

thx

peak plover
#

How do I do dialogs during briefing?

subtle ore
#

look for a rsc config for briefing?

#

or is there one? I know there is one for debriefing, still looking to find briefing here.

peak plover
#

I can createDisplay

#

but it's behind the map

subtle ore
#

map idc is 12

peak plover
#

din' du nuffin'

#

        findDisplay 12 createDisplay "menus_main_start";
subtle ore
#

Hmmm... 🀷 , don't think the briefing has the same idc as map

#

since you have the cancel, continue, and he shit up at the top. Or maybe it's created over the top.

peak plover
#

shid

#

I got a plan

subtle ore
#

What's the plan STAN?

peak plover
#

        for "_i"  from 0 to 100000 do {
            if !(isNull findDisplay _i) then {
                str _i call debug_fnc_log;
            };
        };
subtle ore
#

aha

peak plover
#

 4:15:06 "0"        //IDD_MAIN
 4:15:06 "52"        //IDD_SERVER_GET_READY
 4:15:06 "63"        //IDD_CHANNEL
 4:15:06 "70"        //IDD_MP_SETUP
 4:15:06 "313"    //IDD_CUSTOMINFO_CREW
#

busted

subtle ore
#

Eeek

#

Yep, they are all overlayed.

#

Fuck

little eagle
#

nigel, allDisplays is a thing too^^

peak plover
#

shiddd

little eagle
#

Haha.

subtle ore
#

Neat Commy, thanks for that.

waxen tide
#

@little eagle do you know a magic trick to get every var in a namespace?

tough abyss
#

I have an array that for whatever reason isn't showing me the values in it, its just displaying as "any"

For context, I am passing a global array into a function:

transport_recieve = [pilot1];
[transport_recieve] call KAL_fnc_propagate;

Propagate does:

params ["_inputArray"];

hint format ["%1", _inputArray];

I'm expecting the hint to read "[pilot1]", which is the variable name for one of my player units.
Instead, it is saying "any"

I'm at a loss of what's happening here.

peak plover
#

@waxen tide allVariables

waxen tide
#

duh. thanks 😳

subtle ore
#

Kal, is the pilot alive?

tough abyss
#

Found the (odd) issue. Apparently I need to set the paramter in a variable before I can access it. Ex

_test = _this select 0;

I haven't had this issue before. Weird.

Yeah the pilot was alive.

subtle ore
#

what do you mean set it before you can acess it?

tough abyss
#
params ["_inputArray"];

hint format ["%1", _inputArray]; 

returns any

params ["_inputArray"];

_temp = _this select 0;

hint format ["%1", _temp]; 

returns [pilot1]

subtle ore
#

doens't make sense. Because params["_inputArray"]; should return _inputArray just like _temp = _this select 0;

tough abyss
#

It should, but it wasn't working.

subtle ore
#

that's really freaking odd.

tough abyss
#

You're telling me. I just spent 2 hours on that.

waxen tide
#

So i have this in my function: if (_magic isEqualTo []) exitWith {false};

#

and i wonder why it sometimes returns false

#

and spend the whole day looking thru every other function

#

can someone please shoot me

tough abyss
#

All I can think of midnight is I was executing a local fnc call then calling another function in that, that's the only 'oddity' I can think of

subtle ore
#

Ah, that might be it @tough abyss

#

@waxen tide πŸ”« BANG!

waxen tide
#

drops dead

subtle ore
#

πŸ’Š πŸͺ some cookies and one pill will revive you!

waxen tide
#

is reincarnated as a professional SQF coder

subtle ore
#

😱

tough abyss
#

another weird tidbit,

{
  _array pushBack _x
}forEach _something

//No error
{
  _array pushBack _x
}count _something

//Type num, expected bool
{
  null = _array pushBack _x
}count 
_something

//No error

as count is much faster than forEach, and pushBack is also faster than any alternatives, this is the best solution.

queen cargo
#

@tough abyss nope, it is not
Only if you got a small array
Large arrays are easier merged via +
Assignment is also slower than just using false in the end

tough abyss
#

The documentation LIES. Again

#

I dream of the day we have an IDE to run code so its easier to time

#

And debug. And. Everything.

rancid ruin
#

professional SQF coder 🀠

tough abyss
#

I have encountered that strange "paramter array is just any" bug again, and can't for the life of me figure what's going on.

waxen tide
#

professional SQF coders are a lot like professional russians.

#

strange accent, shrapnel proof, and shady shit going on all the time.

tough abyss
#

No, but - really. It's a valid array, it has stuff in it before I pass it, all the other parameters are fine, but its like that one array says "Ah, fuck it" and just becomes 'any'. I can't fathom what's happening.

queen cargo
#

@tough abyss ArmA.Studio allows you to debug code with breakpoints etc

#

Also working on sqf-vm to allow running sqf without arna

tough abyss
#

@queen cargo what is arma.studio?

#

i would pay money to run sqf without arma tbh

queen cargo
#

Check out my threads

#

You will be led to it too

#

Sqf-vm can already be used to a certain point

#

Most up-to-date version is always available as bot on my discord (and on everyone's who decides to add it to his)

#

So do not always worry that much

#

Community is probably already on it

#

@tough abyss found it?

tough abyss
#

Compy just crashed and I lost 5 hours of work πŸ˜‚ thanks acer

queen cargo
#

Wp

#

Tipp

#

Memorize ctrl + s

#

Never needed Auto save

#

Usually doing it with the ; or newline

tough abyss
#

I pressed cntrl+s at the exact moment the comp crashed, so now its full of NULL

#

i press it a lot, file corrupted

queen cargo
#

Anyway, feel free to join the discord to test the bot

tough abyss
#

yeah I will. just trying to. Figure out how to salvage this. God fucking damnit.

queen cargo
#

So your text editor is crap

tough abyss
#

notpad++

queen cargo
#

Should show you backup

#

Unless you run an outdated version

#

Also your hdd might die sooner or later if it Rly happened on save

tough abyss
#

Laptop isn't that old but it's happened a few times last couple of days. Figured it was a loose battery at first.
You're right, notepad++ does have some backups, but they're pretty old. Better than nothing at least.

zenith edge
#

i compulsively hit ctrl s regularly

#

which I have to cancel on websites

#

like a twitch reflex

#

....and when I'm not typing or between actively using keyboard I rest my left hand in a position to hit ctrl s...oddly enough

queen cargo
#

Worst part of that habit is when you just edit a temporary memory-only file

#

Clicking away those save dialogs...

zenith edge
#

yea hitting ctrl s can be bad in some programs

#

i've saved things I didn't mean to before....a lot

queen cargo
#

And wondering why you saved some random links? 😜

zenith edge
#

but I also don't ever lose data from crashes/sudden restarts for updates πŸ˜ƒ

#

i just lose data because I am in a program that doesn't allow undo(or undo past once) and just accidentally hit a letter and compulsively hit ctrl s after highlighting everything

queen cargo
#

Kinda yeah

zenith edge
#

which is why don't use programs that don't have undo....if you can

queen cargo
#

I tend to fuck up by forgetting to commit

#

Gah... Bloody mobile keyboard

zenith edge
#

lol

queen cargo
#

@tough abyss you checked the link I gave you?

#

Might be useful for ya

tough abyss
#

I'll dig through it as soon as I figure out why this array dies after I pass it into a function. Been at it for 5 hours now

queen cargo
#

Mhh?

#

Array "dies"?

tough abyss
#

turns into 'any'

queen cargo
#

Give code

#

Probably can tell you in minutes

#

My neck... Damn train still needs 8 mins

#

Laptop too heavy

tough abyss
#

I can literally do

_temp = [pilot1];
player addEventHandler["GetInMan", {
    ["SUCCEEDED", player, _temp, _this select 2] 
    call KAL_fnc_depropagate
    }
];


BELOW IS KAL_fnc_depropagate
params ["_state", "_requester", "_recievedThisTask", "_vehicle"];

//Finish task for pilots
{
    ["task_transport_%1", _state, true] remoteExec ["BIS_fnc_taskSetState", _x, false];
} forEach _recievedThisTask;
#

yet it INSISTS that any _value I pass into it is any

#

even if I were to do, say

_bob = player;

and pass that into the function call instead of just player, it's just 'any'

queen cargo
#

The array scope cannot know of the outer scope

#

Thus you pass an non-existent variable into your event callback

tough abyss
#

how do I pass the variables then?

queen cargo
#

Depends on the value type

tough abyss
#

_temp in this case is an array of playable units

queen cargo
#

Global variable or passing netids etc

tough abyss
#

netIDs?

queen cargo
#

Alternatively try cba

tough abyss
#

I shouldn't need a global variable just to pass an array

#

Avoiding any mod reliance

queen cargo
#

Think cba you can pass custom args

#

Well... Then you have to write that code yourself

tough abyss
#

Fucking hell, the fuck kind of language can't pass a fucking local variable to another function

queen cargo
#

You do not pass the variable

#

The event is getting its own scope

#

Not sharing the one it got added to

#

From

tough abyss
#

Would I run into the same issue with an array of the netIDs though? I'm building that array from another function that searches for players that are pilots.

#

the _temp array that i'm trying to pass, that is.

queen cargo
#

You can pass a string to that function

#

Command

#

Which is the difference

#

Use Format to pass the array

tough abyss
#

Couldn't I format my _temp array and use the variable names?

queen cargo
#

Nope

#

Objects cannot be recovered after str

tough abyss
#

But the editor names are global values. If I name a rifleman "bob", bob will always refer to him

queen cargo
#

I am on mobile right now so cannot Rly provide more help

tough abyss
#

all good

queen cargo
#

The alternative Btw is

#

To add it via set variable to the player

#

And then just get variable in the event handler from the player object

#

Train is here

#

See ya

tough abyss
#

I, don't know how that works honestly. Guess its time to tinker some more.

queen cargo
#

Player setvariable ["foo",_bar]

#

Get variable is more or less the same

little eagle
#
player setVariable ["Kal_GIM_args", _args];

player addEventHandler ["GetInMan", {
    private _args = player getVariable "Kal_GIM_args";
}];

or

[player, "GetInMan", {
    _thisArgs params ["_arg1", "_arg2"];
}, _args] call CBA_fnc_addBISEventHandler;
#

Assignment is also slower than just using false in the end
Pretty sure an assignment is faster than a nullary command (false). Nullary commands are worse than binary commands and an assignment should be cheap.

#

But if you're doing {pushBack _x, then you might as well just copy the whole thing with +.

tough abyss
#

Ooh, fancy. How'd you get the syntax highlighting in discord?

#

Also, thanks for the code. I'll give it a go when its not 3:00am 8)

zenith edge
#

sqf after the three backticks, no space

copper raven
#

sqf //code
3 of those without spaces sqf at the end

zenith edge
#

shiftenter after sqf for newline

little eagle
#

```sqf
player setDamage 1;
```

copper raven
#

magicians

tough abyss
#

neatt

real tartan
#

anyone knows function for "viewing poster from ground" from new LoW DLC ?

tough abyss
real tartan
#

I found them, if anyone is interested

tough abyss
#

Very nice.

real tartan
#

This "hand draw marker"

little eagle
#

Could also be a hidden marker type.

#

Map control is always in the foreground

real tartan
#

yeah, but if it is immage on map controll, why is it on same place when I move map

little eagle
#

It can't be an image. Because that would have to either be a RscPicture or similar control, which can't be, because it would be behind the map control.

#

Or a display which can't be, because then you couldn't navigate the map.

real tartan
#

in spotrep is mentioned: Added: IDAP map marker set

little eagle
#
copyToClipboard ("true" configClasses (configFile >> "CfgMarkers") apply {configName _x});
#

It might be a marker you can't place yourself neither ingame nor in the editor. Maybe it's there and you just have to search though.

#

If you can't with the ui, you can always just use scripting to get it.

real tartan
#

should not be there "str" ? copyToClipboard str ("true" configClasses (configFile >> "CfgMarkers") apply {configName _x});

peak plover
#

ugh

#
_display = (findDisplay 37) createDisplay "briefing_roster";
#

I close the display, close map, boom crash

#

wth?

little eagle
#

should not be there "str" ?
Yes, there should. Well ideally you didn't need it, but you do.

simple solstice
#

even after allowFunctionsRecompile = 1; I cant seem to be able to make changes to the script files

#

the text editor says it's locked

#

but I can recompile the scripts from the function viewer

real tartan
#

checked all markers from config, there is none similair with that "hand draw", so it is done some other way

cold pebble
#

I'm probably being stupid, but I'm getting a generic error for this:

waitUntil {(speed _vehicle > 10) || (isNull objectParent player)};
#

Any ideas why?

little eagle
#

Post the full error from the RPT file

cold pebble
#

Eh

#

I figured

#

Needed to be spawned, using it from the GetInMan EVH

distant egret
#

Anyone know why I can't setDamage 1 on an IEDLandBig_F in multiplayer? Tried it first in SP and it works fine there.

#

Seems to be that editor placed ones can be blown up while ones that are created with createVehicle can't. Anything I'm overseeing here?

placid root
#

this?

#

now it will blow up

distant egret
#

that one works, lol what's the difference.

placid root
#

createVehicle in combination with a "mine"-object creates the mine but without its propaties. createMine creates a object with mine propaties

distant egret
#

k

placid root
#

like the propaty, that if u go near it it explodes

distant egret
#

it doesn't do that just tried that

placid root
#

what was the code?

distant egret
#
createMine ["IEDLandBig_F",getpos player, [],0]
#

doesn't blow up automatically, which I don't mind because I got a trigger setup for it.

#

but I saw a red triangle hope other people can't see that.

little eagle
#
"IEDLandBig_Remote_Ammo" createVehicle position player
#

???

distant egret
#

that works.

little eagle
#

That is the CfgAmmo object.

distant egret
#

what would be faster though to spawn in? I got about 50 randomly spawned.

astral tendon
#

(gunner test) action ["moveInGunner",car1]

#

the gunner of the test is not going into the car1 turret

#

what is wrong?

little eagle
#

GetInGunner, not moveInGunner

#

And I'm pretty sure you'd have to move him out first.

astral tendon
#

there is a command like sleep to triggers?

#

i wanna give 1 second before execute another command

placid root
#

trigger timer? there is a countdown and a timeout

astral tendon
#

to do another action?

placid root
#

if this does not meet ur needs u can always use : _nul = [] spawn {ur_code_here};

#

if u don't understand this u'd propably need to watch some more youtube videos about scripting

little eagle
#

Why _nul = ?

placid root
#

because it throws an error in a trigger without bla=

little eagle
#

But you did put a local variable.

#

And then it complains about "local variable in global space".

placid root
#

try it ourself. it works -.-

little eagle
#

Okay and you try without the _nul =, deal?

placid root
#

yes

#

oh wonders it complains πŸ˜›

little eagle
#

Hmm, I swear it complained about local variables at some point.

#

shrug

astral tendon
#

im seting up a trigger when a player touch the are he get into a vehicle

#

so how do i make the trigger "know" that i want the guy who touch it must get into the vehicle?

#

also, i cant especify the player, this is a 4 players coop sething

placid root
#

@astral tendon better english?

#

i did not get u

astral tendon
#

english machine broke

#

to make it simple

#

TheGuyWhoTouchTheTrigger action ["getInGunner",car1];

placid root
#

(thisList select 0) action [balbal]

#

maybe, and if it works u'd propably have some locality problems with more playable units

#

who knows, try it πŸ˜›

#

but thisList returns an array of objects that fulfill the trigger's condition

indigo snow
#

make sure the cars arent in the trigger area

astral tendon
#

did not worked

placid root
#

does anybody know how the get the resourses of the most right gaugle of the advanced flight model? i would like to modify it a little

#

it's a compass

#

this little guy here

little eagle
#

With a mod you can.

placid root
#

well how is it displayed? a dialog a script ?

little eagle
#

RscInGameUi

#

unitInfoTypeRTD = "RscUnitInfoAirRTDFullDigital";
unitInfoTypeLite = "RscUnitInfoAirRTDBasic";
unitInfoType = "RscUnitInfoAir";

placid root
#

uhh nice thx @little eagle

deft owl
#

Hey, is it possibel to check if a player is in combat or not without using sleep command?

still forum
#

I don't see how sleep is related to checking if in combat

astral tendon
#

(thisList select 0) action ["getInGunner",car1];

#

i tried other ways to make this work but noting

#

do i need to put something else in the trigger?

#

also, i am sure i is activating by sound

#

but it also gives me no error

#

there is something else i can try?

little eagle
#

I did exactly what you wrote and it worked, Roque.

#

The problem is that you don't understand how any of this works. Without me trying to be mean.

#

thisList will not contain units that board a vehicle. Only the parent objects in the trigger.

#

select 0 is a bad idea, because you have no idea which element the player will be.

#

And so is using this action on remote machines. The trigger fires on every machine.

#

There is no need for action getInGunner. You can just use the normal moveToGunner sqf command.

#

But to hop from one vehicle to another, you need to use moveOut first.

astral tendon
#

yes i had gived up on that

#

what i am trying to do is when a player touch the trigger he gets in to the gunner of a vehicle on the other side of the map

little eagle
#

Trigger:
Type: None
Activation: Blufor
Condition: vehicle player in thisList
On Act.: moveOut player; player moveInGunner car1;

#

This is my best guess for what you want to do. But you never really explained what that is exactly.

astral tendon
#

now that worked

#

i just removed the moveOut player;

little eagle
#

The moveOut player; is needed if you already are in another vehicle.

#

If that isn't what you want, then you might as well rewrite the condition to: player in thisList without "vehicle".

astral tendon
#

so basicly, in condition player in thisList

#

is TheGuyWhoTouchTheTrigger action ["getInGunner",car1];

little eagle
#

???

#

I told you that you don't need action.

astral tendon
#

my first question was how i make a trigger use the command over the player who touch the trigger

little eagle
#

The answer is:
Condition: vehicle player in thisList

#

Then the trigger will only execute if the player is in the trigger.

#

Not any other blue unit or other player.

astral tendon
#

oh

#

so this is like a SP only thing?

#

this wont work on a 4 man coop server?

little eagle
#

If you do it like I did it will work in MP, as long as you don't have "server only" ticked.

astral tendon
#

"server only" ticked?

little eagle
#

Not ticked.

#

server only would mean that the "on act." code only runs on the server machine.

#

On a dedicated server, player is always null.

#

So the condition would always be false.

#

It's always false anyway, but if you don't tick "server only", then it will be run on all clients too.

#

And on clients, the player's vehicle can be inside the trigger and therefore activate it.

#

And then run the code with player always being a local object and moveOut and moveInGunner working nicely.

astral tendon
#

thats someting that every server owner knows?

little eagle
#

How this all works? I doubt it.

#

All you need to have to own a server is $$$. To understand how it works you need effort.

astral tendon
#

well, i am making this mission public

#

i want to make this as friendly and "idiot prove" as possible

#

funny that i am a little idiot here lol

little eagle
#

A trigger like this is pretty self explanatory. But an idiot could just delete the whole trigger and there is nothing you can do about that.

astral tendon
#

more dificult is AI idiot-proof mission, lol

#

some times they are too inconsistent

#

especially driving

#

they cant do the same conner in the same way over and over again

#

they aways find a way to fuck up some how

#

i am trying to eat the frustration frist before the players and find a way round it

#

especially because i want all of this to work

#

its a tribute to another game i love

weak obsidian
#

Did you try setdriveonpath for the vehicles? As much as I've understood you want to replicate that driving sequence from Delta Force: Black hawk down?

#

I do concur with quiksilver that it's best not to rely too much on AI for such things, keep AI actions simple or else it will become too unpredictable.

compact maple
#

Hello guys, i am training myself with GUI actually. I am working on a notification system like this one : https://www.youtube.com/watch?v=MTypM4AHc4k

I got some questions, how do i proceed , should i create ctrl directly on one display, or should i create a dialog ?
how can i handle the fact that a notification push the other when she comes out ?
Thanks you

polar folio
#

you should search the scripting section of the BI forums for "kill feed". it came up there several times the last few months including examples.

compact maple
polar folio
#

probably a little bit smaller and leaner thus better example. but you only need some starting point. it's not a crazy hard thing to achieve

compact maple
#

oh thats great thanks you

#

@polar folio awesome, definitievly what i was looking for

thick sage
#

allVariables returns all variables on a object or other. How do I differentiate between the variable not being defined, and being nil. Specifically,

player setVariable ["a",1];
player setVariable ["a",nil];
hint str allVariables player

allVariables player may return a nil variable, right?

little eagle
#

Yes.

#

For anything other than mission/ui/etc.Namespace, this is the case.

thick sage
#

great, thanks!

waxen tide
#

sillyHat attachTo [commy2];

indigo snow
#

Syntax error

waxen tide
#

no no, works just fine. i'm wearing a silly hat and i have an aircraft carrier attached to my butt, and its all commy2s fault.

astral tendon
#

im seting up a trigger to start if there is 4 players inside of it, but this is a coop set up, so maybe there is not enough players to fil that requirement, how would be the script?

waxen tide
#

you can do count allplayers

#

that gives you the number of all players on the server

#

then you check if an equal number is inside your trigger to have it activated?

#

i'm guessing thats what you meant.

astral tendon
#

but it have to be couting the players on the server to start

#

like the tigger must ativate with 4 players inside it

#

but if there is less than 4 players online on the server the trigger can still ativate

indigo snow
#

count (thisList arrayIntersect allPlayers) == count allPlayers

astral tendon
#

what do i need to change in it?

indigo snow
#

Thats it

#

It checks if there are as many players in thisList as there are players in total

astral tendon
#

so this condition starts the trigger if all the player online touch it right?

indigo snow
#

If they fulfill the condition set, yes

#

E.g. if theyre blufor, the trigger must detect blufor present

astral tendon
#

nice, this is what i want

astral tendon
#

the trigger did not activated

#

there is any other confing i need to do?

astral tendon
#

what is the variation of player in thisList to also a playable caracter?

atomic epoch
#

Is there a way to attach an EH to my LMB, similar to attaching a displayEventHandler to the keyboard?

waxen tide
#

So i'm trying to spawn the USS freedom on a client connected to a dedi server, with createvehiclelocal

#
_pos1 = ((getPos player) vectorAdd [200,0,200]);
_testobject = "Land_LightHouse_F" createVehicleLocal _pos1;

_pos2 = ((getPos player) vectorAdd [0,200,200]);
_new_carrier = "Land_Carrier_01_base_F" createVehicleLocal _pos2;
systemchat format ["new carrier: %1", _new_carrier]; // 2f25294fe0# 1780002: carrier_01_hull_base_f.p3d
_new_carrier setPosATL _pos2;
_new_carrier setDir 0;
[_new_carrier] call BIS_fnc_Carrier01PosUpdate;
#

but it doesn't work. if i check on my carrier, it returns an object, but there is no object visible. a test object spawned in the same fashion (lighthouse) is visible.

#

am i insane or is this broken?

subtle ore
#

why would you want to create it locally?

#

anyhow, they are each a individual object, it's essentially a composition

#

so I am pretty sure they have multiple functions for the individual parts.

waxen tide
#

i'm creating it locally since i'm having it drive around for a cutscene. doesn't work if you create it on a server, too many position updates, lag, etc.

#

if you just use createvehicle, it works like a charm. the issue starts with using createvehicle local

subtle ore
#

is this remote exec'd ?

waxen tide
#

no.

subtle ore
#

So this is local to the player?

waxen tide
#

yes

#

i tried initplayerlocal and debug console with exec local

subtle ore
#

Not sure why it wouldn't work, maybe it's simply incompatible.

waxen tide
#

works for lighthouses, doesn't work for carrier

#

also createvehicle works if you run it on server just fine

subtle ore
#

afaik the only difference between the main createVehicle and createVehicleLocal is just the locality difference

waxen tide
#

ahhh wait

#

i forgot

#

first line in "BIS_fnc_Carrier01PosUpdate" is: if (!isServer) exitWith {};

#

i copied that script, removed the line, and called my modified copy. doesn't work

subtle ore
#

copied the function?

waxen tide
#

yes.

#

because obviously calling that fnc locally is of no effect

subtle ore
#

Sure.

waxen tide
#

sigh.

#

maybe i need to call BIS_fnc_Carrier01Init first?

#

negative.

astral tendon
#

moveInGunner car1;

waxen tide
#

i have no clue whats up with that damn carrier

astral tendon
#

this is a trigger with a thislist condition

#

what object i put?

#

this is to work for AI and players

waxen tide
#
_pos1 = ((getPos player) vectorAdd [200,0,100]);
_testobject = "Land_LightHouse_F" createVehicleLocal _pos1;
_testobject setPosATL _pos1;
_pos2 = ((getPos player) vectorAdd [0,200,100]);
_new_carrier = "Land_Carrier_01_base_F" createVehicleLocal _pos2;
systemchat format ["new carrier: %1", _new_carrier]; // 2f25294fe0# 1780002: carrier_01_hull_base_f.p3d
[_new_carrier] call BIS_fnc_Carrier01Init;
[_new_carrier] call Ivan_fnc_Carrier01PosUpdate;
_new_carrier setDir 0;
_new_carrier setPosATL _pos2;
#

spawns a nice lighthouse, but no visible carrier

subtle ore
#

Dunno

#

Does anyone have any idea how to add ace actions for the gestures class parent?

#

I can do the main actions, self actions. Tried "ACE_Gestures","ace_gestures", and "gestures" but no go.

subtle ore
#

disregard last

waxen tide
#

my getDir in line 62 always seems to return 0 no matter what dir the object is facing

#

I'm a bit clueless as to why?

robust hollow
#

is the object those things are being attached to facing 0?

waxen tide
#

no its multiple objects in random directions

#

uhm

#

sorry i missunderstood your question

#

yes, it is facing 0

robust hollow
#

save the dir before you attach it and set it again after

#

attaching an object sets its dir to the dir of the thing its attached to

waxen tide
#

oh jeez i have the wrong order inside the foreach 😳

#

thanks

robust hollow
#

ur carrier still invisible?

waxen tide
#

yeah

#

i'm working around the issue spawning the carrier as global vehicle that is synced over network, since that works

#

but i can't have it drive around then which is a bit sad

robust hollow
#

its cause the init script has the isserver check for the visible parts

waxen tide
#

?

robust hollow
#

you know how you had to make your own setcarrierpos fnc cause only the server could run the BIS one? its the same deal for showing the carrier parts. the BIS script only lets the server do it

waxen tide
#

is it Carrier01Init?

robust hollow
#

yea

waxen tide
#

i looked at that

#

but i brainfarted at interpreting the first line again i guess.

#

i'll try that. thanks

#

trying to do complicated stuff that requires knowledge in lots of things isn't all that fun sometimes.

#

Ahh yes, this reduced randomly exploding objects on the carrier deck to a reasonably low number.

#

Do you know a way to access the units placed as "playable" in the editor that work as slots for players to join?

robust hollow
#

what do you mean?

waxen tide
#

well if you design a multiplayer mission you usually put down a bunch of units and tag them "playable" and these units don't spawn if you set "disabledAI" in the description.ext. so how to access those invisible, not-jet-spawned units?

robust hollow
#

i dont think you can? if they arent spawned they dont exist so.....

waxen tide
little eagle
#

If you disable the AI, then the units don't exist unless someone joins that slot and respawn is enabled.

#

There are no objects to access.

waxen tide
#

scratches his head

#

i guess thats why on all these dayz mods and w/e you always spawn in some odd place and then you're teleported.

little eagle
waxen tide
#

well the issue is, these units are on the carrier. i move the carrier. so JIPs end up in water

little eagle
#

Just move "respawn_west" marker.

waxen tide
#

ohhh. thanks.

little eagle
#

I'm pretty sure that's enough for JIP players. If not, then you could also just setPos them instead, no?

waxen tide
#

with an onConnect eventhandler or something?

little eagle
#

initPlayerLocal.sqf

waxen tide
#

hmm

#

gotta think about offsets

little eagle
#

The onPlayerConnected one fires on the server. Dunno about the delay, could still make you drown and look weird.

waxen tide
#

i'll try it out.

little eagle
#

Just attach a logic to the carrier and setPosASL or something.

waxen tide
#

?

little eagle
#

Game logic or some other kind of dummy object.

waxen tide
#

whatfor?

little eagle
#

_unit setPosASL getPosASL my_logic
in initPlayerLocalsqf

waxen tide
#

why not use the carrier directly?

little eagle
#

Would spawn you inside it, no?

waxen tide
#

oh well yes, but offset?

#

vectorAdd [0,0,25]

little eagle
#

Yeah, but you need to rotate that, What a pain.

waxen tide
#

rotate?

little eagle
#

The carrier doesn't always point in the same direction, does it?

waxen tide
#

well it does, but lets assume it doesn't, i don't see the issue?

robust hollow
#

modeltoworld

#

ezfix

little eagle
#

If you're just going to spawn them in the middle of the carrier and z=25 above, then it makes no difference.

#

But if you'd spawn them off center, you'd need to rotate the vector or do stuff with modelToWorld as Connor pointed out, idk.

waxen tide
#

i see

waxen tide
#

I somehow permanently fucked up BIS_fnc_Carrier01PosUpdate

#

always looks like this now (with slight variations)

robust hollow
#

is it your modified version or u using the actual BIS one?

waxen tide
#

original BIS

#

calling it on editor-placed, server-setpos'sed carrier.

#

worked fine 30 times

#

now doesn't

#

line 82

#

I mean i know american build quality can leave things to be desired but ...

robust hollow
#

haha, yea idk why its doing that.

waxen tide
#

jesus. god damn arma quirks.

#

puts the πŸ‘’ to the server

waxen tide
#

I'm trying to create an array that contains a copy of each object on a carrier to replicate the same objects on a locally spawned carrier. i kind of need to sort out the carrier parts

#

this only works partially

#

OBJECTS: all objects

#

DELETED: deleted objects because they're carrier parts

#

SPAWN: objects that will be spawned on new carrier

#

apparently some parts of the carrier aren't children of "Land_Carrier_01_hull_base_F" ? BI inconsistency or am i being stupid?

robust hollow
#

you're needing an array of the carrier parts itself or things uve put on the deck?

waxen tide
#

things i put on the deck

#

i'm getting too fancypants over this.

#

minor issues. nobody will notice if i put a bit of fog over this.

subtle ore
#

is it seriously true that serverCommand can only be executed through a user interface event handler?

#

Ah fuck, nevermind. Read further, apparently as of Arma 3 V1.39 serverCommand can be used on HC's and Dedicated

tulip cloud
#

The campaign has a flashback ripple effect. It isn't documented on the latest release. Does anyone know how to use it?

still forum
#

The script functions are only available in the campaign. So you can't really call them from your code

#

The shimmer effect is just a particle effect. I posted the script for that here a couple days ago ( Last Friday at 3:23 PM CET - It's 7:53AM CET now)

tough abyss
#

Any one have a good link to a burning wreck script?

waxen tide
#

@still forum any idea how to get rid of these carrier parts in that array?

still forum
#

What array :U

waxen tide
#

posted it like 3 of my messages up

still forum
#

The duplicates on your screenshot?

waxen tide
#

yes.

still forum
#

Trial and error

waxen tide
#

well i tried everything i could come up with

still forum
#

remove one.. If it wasn't it remove another one and try again

waxen tide
#

oh no thats not the issue

#

i KNOW which ones but i can't get my script to delete them

#

isKindOf etc all fails

#

its like i dont have the proper classname

still forum
#

because they are all the same isKindOf

waxen tide
#

it works for like 8 of 12 parts

#

they're not?

#

the 2nd carrier i spawn isn't part of the array.

still forum
#

They should all inherit from the same class. As they are all basically the same just with different models

waxen tide
#

yeah i thought so, but only 8 share a common base class. 4 are oddballs

still forum
#

you can check typeOf and compare the classnames directly

waxen tide
#

i did that, too

#

no effect

#
{
    diag_log format ["OBJECTS: %1", _x];
    if (_x isKindOf "StaticShip") then {
        _spawn_carrier = _x;
        _deleted_array pushBack _x;
        _objects_array deleteAt _forEachIndex;
    }else{
    if (
        (_x isKindOf "Land_Carrier_01_hull_base_F") or
        (_x isKindOf "Land_Carrier_01_island_02_F") or
        (_x isKindOf "Land_Carrier_01_island_03_F") or
        (_x isKindOf "Land_Carrier_01_hull_02_F") or
        (_x isKindOf "Land_Carrier_01_hull_05_1_F") or
        (_x isKindOf "Land_Carrier_01_hull_07_1_F")
        )
        then {
        _deleted_array pushBack _x;
        _objects_array deleteAt _forEachIndex;
    };
};
#

the first condition works for like 8 parts, but thats about it.

still forum
#

Go to the leftover parts.
typeOf cursorTarget to get the classname. And then check config viewer

waxen tide
#

well since they're being spawned and in the spawn array i did typeOf to diag_log

#
 8:04:24 "DELETED: 2f0b7871a0# 1779916: carrier_01_hull_04_2_f.p3d"
 8:04:24 "DELETED: 2f0b782d20# 1779918: carrier_01_hull_05_2_f.p3d"
 8:04:24 "DELETED: 2f0b7835b0# 1779920: carrier_01_hull_06_2_f.p3d"
 8:04:24 "DELETED: 2f0b780ae0# 1779922: carrier_01_hull_07_2_f.p3d"
 8:04:24 "DELETED: 2f0b781c00# 1779927: carrier_01_island_01_f.p3d"
 8:04:24 "DELETED: 2f0b787a30# 1779924: carrier_01_hull_08_2_f.p3d"
 8:04:24 "DELETED: 2f0b788b50# 1779926: carrier_01_hull_09_2_f.p3d"
 8:04:24 "DELETED: 2f0b7781e0# 1779911: carrier_01_hull_01_f.p3d"
 8:04:24 "DELETED: 2f0b7857f0# 1779914: carrier_01_hull_03_2_f.p3d"
 8:04:24 "DELETED: 2f0b777950# 1779910: carrier_01_hull_base_f.p3d"
 8:04:24 "DELETED: 2f0b778a70# 1779913: carrier_01_hull_03_1_f.p3d"
 8:04:24 "DELETED: 2f0b780250# 1779915: carrier_01_hull_04_1_f.p3d"
 8:04:24 "DELETED: 2f0b784f60# 1779919: carrier_01_hull_06_1_f.p3d"
 8:04:24 "DELETED: 2f0b781370# 1779923: carrier_01_hull_08_1_f.p3d"
 8:04:24 "DELETED: 2f0b7882c0# 1779925: carrier_01_hull_09_1_f.p3d"

 8:04:24 "SPAWN: 2f0b7893e0# 1779928: carrier_01_island_02_f.p3d"
 8:04:24 "typeOf _x: Land_Carrier_01_island_02_F"
 8:04:24 "SPAWN: 2f0b7846d0# 1779929: carrier_01_island_03_f.p3d"
 8:04:24 "typeOf _x: Land_Carrier_01_island_03_F"
 8:04:24 "SPAWN: 2f0b77f9c0# 1779912: carrier_01_hull_02_f.p3d"
 8:04:24 "typeOf _x: Land_Carrier_01_hull_02_F"
 8:04:24 "SPAWN: 2f0b786080# 1779917: carrier_01_hull_05_1_f.p3d"
 8:04:24 "typeOf _x: Land_Carrier_01_hull_05_1_F"
 8:04:24 "SPAWN: 2f0b786910# 1779921: carrier_01_hull_07_1_f.p3d"
 8:04:24 "typeOf _x: Land_Carrier_01_hull_07_1_F"
#

bottom ones not being deleted

still forum
#

also not with your second if statement?

waxen tide
#

no.

#

that catches all the top ones

still forum
#

then compare the classname. Instead of using isKindOf

#

Because it might not be kindOf itself

waxen tide
#

ooh.

#

also slightly annoyed that the carrier parts don't ALL share a common base class -.-

#

tried both of these

#
(typeOf _x isEqualTo "Land_Carrier_01_island_02_F")
(typeOf _x == "Land_Carrier_01_island_02_F")
#

no bueno.

still forum
#

the second one should work... according to your diag_log output from above

still forum
#

After removing them all. Print out _object_array again to see if they were really not removed

waxen tide
#

still there

#

I noticed that they all inherit from the "House" class

#

but if i delete all with isKindOf, the pattern stays the same

#

so i suspect a bug with these parts.

still forum
#

Soo.. The if statement doesn't detect that part. Although typeOf _x == "classname" does return true? wtf

waxen tide
#

?

still forum
#

(typeOf _x == "Land_Carrier_01_island_02_F") never returns true although the strings match?

waxen tide
#

no.

#

well, actually i have no clue

still forum
#

can you get the object into cursorTarget and print typeOf in debug console

waxen tide
#

it might, but the deletion might fail

#

i'll see what i can do

still forum
#

do a select in..... Wait...
Wow...
You go to element 0. no match
you go to element 1. Match! remove element one. Every other element jumps back one index so element 2 is now on 1
you go to element 2. No match... Ouh.. Wait.. We just skipped one element and didn't even check it.

#

So... Use the right tool for the job instead of a hackjob that doesn't work.
select was made for this

waxen tide
#

πŸ˜’

#

yes yes i'm stupid.

#

its not that i didn't look at select. I tried to use it and failed.

still forum
#

try again and succeed!

waxen tide
#

well thanks for the help i would have never found that one.

#

also this seems to work fine

#
private _spawn_carrier = _objects_array1 select {_x isKindOf "StaticShip"};
private _objects_array2 = _objects_array1 select {!(_x isKindOf "Land_Carrier_01_hull_base_F")};
#

but i have a headache so i'll stop for now.

still forum
#

use one select with &&

#

Do it or I'll get angry

peak plover
#

πŸ™ƒ

astral tendon
#

Condition: vehicle player in thisList
Activation: player moveInGunner car1;

#

this one does work but only for players

#

i would like that AI would also be teleported as a gunner to car1

grizzled spindle
#

Silly question but is it possible to make a config file server side like you would define it in description.ext

slender halo
#

i think you can't

#

however, you can execute a script which is located outside the mission folder

grizzled spindle
#

yeah just wanting something with the configFile >>

#

But was thinking if i can save space on mission file id rather have it server side

still forum
#

you can make a serverside only Mod.. Ofcause...

#

But you can't write into missionConfig with a Mod.
Also.. Isn't this #arma3_config ?

grizzled spindle
#

Where would you include the config and how would you include it

slender halo
#

config is not that heavy, does it really worth separate config/script/mod ?

still forum
#

again... #arma3_config
Just make a config.cpp in a PBO. And Load that as Mod on the server.

copper raven
#

@astral tendon just use trigger condition as "this" without "", and select activation Anybody or the side u want, and select type present, make sure its a repeatable trigger if you want to have it for multiple uses

astral tendon
#

but still, only the Player will be teleported inside on the gunner

#

i wanna the AI who set off the trigger to be in it

copper raven
#
{
    if (_x isKindOf "Man") exitWith {_x moveInGunner myCar};
}forEach thisList;

@astral tendon put this in activation field

astral tendon
#

thanks man, i will save that

#

i finded another way around to what i want

still forum
#

found*

astral tendon
#

english machine broke

simple solstice
#

does anyone have a script that would diag_log every class name and display name for each loaded vehicle into the game?

little eagle
#

"loaded into the game"?

#

You mean like present in the mission?

#

@simple solstice

{
    diag_log configName _x;
    diag_log getText (_x >> "displayName");
} forEach ("true" configClasses (configFile >> "CfgVehicles"));

???

muted parcel
#

I want to make a mission that has a bigger aspect on surival then the most others. This means that you start with nothing but can collect weapons. (Just like in the beginning of PUBG) But when you die everything is lost and thats a bit hard when you play hours on hours to achieve this. So I need a feature to save the players loadout. I already have figured out how to safe it but the question now is: Can you make something like a button with the mouse-wheel-menu to execute that code?

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;
#

I made a onPlayerRespawn.sqf with this inside

[player, [missionNamespace, "inventory_var"]] call BIS_fnc_loadInventory;

In order to load the loadout when respawning

still forum
#

addAction

muted parcel
#

How exactly?

still forum
#

addAction. Check BI wiki

muted parcel
#
addAction [save Loadout, execVM "saveLoadout.sqf";];
#

Will this work?

still forum
#

Check Wiki.

#

No

#

Syntax is completly invalid

muted parcel
#

yeah thats the problem. Ok I will have a look

#

Ah _act = player addAction ["Exec the file", "somescript.sqf"]

#

I think that is what IΒ΄m looking for. But I have a last question: Will this execute the code locale? So just for the person who presses the button or for all players?

still forum
#

How do you want to build such a big mission/gamemode without a clue on how SQF works?
Yes this is local.. Please Check Wiki.

muted parcel
#

I have a very basic knowledge on sqf and me and my friend built already very big missions but the main problem is the bad performance from the engine than my sqf skill

still forum
#

engine performance is quite good. If you don't trash it with bad scripts.. Atleast that's my experience.

muted parcel
#

no the problem arent the scripts. If you have thousands of objects it will lagg. And I have a new PC with i7 and GTX 1070

still forum
#

simpleObjects. Caching. Stop having thousands of objects.

muted parcel
#

I think I have to write the code into the initServer.sqf ?

#

Yeah but huge missions are cooler

#

Or does init.sqf also work? IΒ΄m really sorry but IΒ΄m pretty new to sqf

waxen tide
#

@muted parcel before you ask a question, at least read the BIKI article about the command you're asking about. chances are the explaination in the BIKI will answer your question, if not you can still ask. Asking lots of trivial questions will tire people and then they won't feel inclined to answer you anymore.

#

just ... personal observations.

muted parcel
#

Yeah sorry.

#

I just like it more to talk to people and ask them as reading a wiki

waxen tide
#

sure thing, but i consider help i receive here by asking questions as a limited ressource and i always feel like wasting time of highly competent people.

muted parcel
#

Ok I tried out init.sqf and initServer.sqf but both donΒ΄t work :/

waxen tide
#

It is very important where you test things.

#

If you use the editor in SP mode, the init.sqf and the initplayerlocal.sqf should be executed. if you run it in MP mode, the initServer.sqf should be executed, too. but your player will be LOCAL to the "server". you need to start a seperate dedicated server to simulate MP correctly.

muted parcel
#

I tested with scenario if the main script works. But when I host the server it doesnt work

#

Yeah the init.sqf worked in SP

muted parcel
#

thx

#

But canΒ΄t I simply put the execVM into onPlayerRespanw.sqf ?

waxen tide
#

onPlayerRespawn.sqf is an event script. Those event scripts are executed whenever the event happens.

#

you want to save gear when a player dies and then restore it on respawn?

muted parcel
#

Yeah I know but initServer.sqf doesnt work

waxen tide
#

then onPlayerRespawn.sqf should be the right place to RESTORE the gear - but you need to SAVE it before you can do that?

muted parcel
#

I just want to execute a script when the game starts.

waxen tide
#

show the code you put into the initServer.sqf

muted parcel
#
_act = player addAction ["Save Inventory", "saveLoadout.sqf"];
#
[player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory;`
waxen tide
#

okay so the server i think is a "player" itself that connects to .. itself. so i think you're attaching an addAction to the server.

muted parcel
#

This is the saveLoadout.sqf

waxen tide
#

you need to put that into the initplayerlocal.sqf

#

if you want it to be executed on each player

muted parcel
#

ok thx

#

No also doesnt work

waxen tide
#

so in my initplayerlocal.sqf is the following line:

#

execVM "debug.sqf";

#
player addAction ["Teleport",
  "[""teleport_id"", ""onMapSingleClick"", ""Ivan_fnc_teleport_player""] call BIS_fnc_addStackedEventHandler;openMap true",
  nil,1.5,false,true,"DEBUG_SWITCH = true"];
#

and thats what my debug.sqf looks like

#

and it works just fine!

muted parcel
#

SP or MP mission?

waxen tide
#

MP

muted parcel
#

hm

#

I will test it again

#

wtf now I respawn at 00000

#

I put it into onPlayerRespawn.sqf and this works.

simple solstice
#

@little eagle yes, thankyou!

#

wouldn't that be better?

muted parcel
#

Why?

#

I mean with loadInventory and saveInventory I have everything I need

#

The problem now is that the script does not work by running it with init.sqf, initServer.sqf or initPlayerLocal.sqf

#

Wiht onPlayerRespawn.sqf it works but thats not a good solution

serene basin
#

can you detect if an AI (civie) is in a panicked state or has spotted a hostile ?

muted parcel
#

what?

#

You donΒ΄t talk with me are you?

serene basin
#

no sorry, seperate question

indigo snow
#

you might check their combat mode, Katsu

astral tendon
#

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

#

i wanna this to work only with a especific group and count only the amout alive inside of the group

#

so, if a group have 4 units, 2 of they die this trigger must work for those 2 units left

little eagle
#

And they all have to be gunners?

astral tendon
#

this trigger will ativate once there is 4 gunners inside in one of those 6 vehicles

#

in case 2 of the units that are supouse to in die i wan it to still trigger by the amout of units in alive on that group

waxen tide
#

@still forum as DEMANDED by you i utilized select.

#

all objects are placed correctly on the carrier i copy the data from, and i tread all objects in the same foreach loop. so i don't know why the position in Z is off for like half of them?

subtle ore
#

At that res it looks perfect

waxen tide
#

its not only the res, steam compresses screenshots to death with jpg

subtle ore
#

Even so, looks like you shot that at 1280x720

waxen tide
#

its 1920x1080

#

despite armas ability to scale UI, 4k downsampling doesn't work properly.

rose hatch
#

Any reason why this wouldn't work as an if statement condition?
(typeof getConnectedUAV player == "C_IDAP_UAV_06_antimine_F")

subtle ore
#

No looks perfect. @Nutter#5134

rose hatch
#

Yippee

subtle ore
#

@waxen tide 4k almost looks akward without antialiasing

waxen tide
#

what. downsampling 4k -> 1080p is high quality antialiasing

subtle ore
#

Yes, my response was unrelated.

#

Sorry

waxen tide
#

You should be terribly ashamed of yourself.

subtle ore
#

Don't doubt it one bit, crying myself to sleep tonight.

waxen tide
#

according to the log my planes all share the same Z height. sigh

ionic orchid
#

@waxen tide I used to get Z offset issues all the time until I realised I needed to use setPosASL to avoid any weird Z behaviour

#

if I used setPos it would ignore Z and try to figure out its own height - so I'd have NPCs on rooftops and stuff

#

could be something to look into?

waxen tide
#

oh yeah! lemme try

#

i don't setPos them at all, i just createVehicleLocal them and then attachTo

ionic orchid
#

hmm, that's not something I've really used 😦

waxen tide
#

i can't spawn an aircraft carrier with 20 planes on it, glue it together with attachTo, and then have a loop move it 0.2m as fast as the loop will go for 6000 iterations, AND send this pile of a mess to every connected client.

#

so i'm doing all that rubbish locally.

ionic orchid
#

:S

waxen tide
#

you owe me 20 F/A 181's

#

they're all gone now

ionic orchid
#

hahah

#

they're probably under the sea

waxen tide
#

well my log output says they're 23m above sea level.

#

just like before

ionic orchid
#

so what I'd do is...

_planePos = _accObj modelToWorldWorld [x, x, x]; 
_plane setPosASL _planePos;
#

where [x, x, x] is the position on the plane relative to its local centre

waxen tide
#

ahh wait, i forgot to add the vectordiff of the carrier.

#

so i set them to around 0,0

#

okay now the ones that were at proper height? they're still there and at proper height. but the "too high" ones are gone.

#

@ionic orchid i have no clue what your command seems to do?

ionic orchid
#

which one?

waxen tide
#

the one in your second last message... modelToWorld ...

ionic orchid
#

okay that's a way to turn an object space position into a world space position...

#

so like, if you know the top of a player's head is at [0, 0, 2] ...you can use that command on any player to find the top of the head in world coordinates

#

so if that player walks around, you can always track the top of their head just by doing

_headPos = player modelToWorld [0, 0, 2];
#

and the same goes for your air-craft carrier....if you know where you want the planes to rest, you can use that command to find exactly where they need to be in the world, no matter where you put the ACC

waxen tide
#

i see

#

i've used setPosASL now to nail them into place

#

thats what my logging throws out

#

half of the planes are visible, half isn't

#

i'll try modelToWorld

ionic orchid
#

those negative Z values will place them under the sea

waxen tide
#

@ionic orchid you is of genius! it wΓΆrks!

#

I don't see why my approach didn't work but whatever.

ionic orchid
#

awesome!

#

glad I could help

waxen tide
#

now i need to get the landing gear of the supersonic jets retracted and i can finally put this script to rest

rose hatch
#

How can I create an array with x number of empty elements. For example, if _number = 3 then I get ["","",""]

waxen tide
#
_my_empty_array = [];
_number = 3;
  for "_i" from 1 to _number step 1 do 
  {
      _my_empty_array pushBack "";
  };
#

oh wait you wanted strings.

rose hatch
#

Ahh, yeah

#

I feel dumb today πŸ˜›

waxen tide
#

i'm sure dedmen will come up with something thats 10x faster and requires only 1 line of code.

little eagle
#
private _array =  [];
_array resize 3;
_array = _array apply {""};
rose hatch
#

0_0 genius

waxen tide
#

dark voodoo magic.

rose hatch
#
if (isnil _pylons) then {
    _numHardpoints = count (configfile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons");
    _pylons = [];
    _pylons resize _numHardpoints;
    _pylons = _pylons apply {""};
};
{
    _vehicle setPylonLoadOut [_forEachIndex + 1, _x, true, -1] 
} forEach _pylons;

Can now either clear or set a vehicles pylons w/ an array... If anyone was interested in my end goal

little eagle
#

First line should be:
isnil "_pylons", no?

#

With quote marks.

halcyon crypt
#

do we have a way to do something continue like in loops yet? πŸ˜ƒ

rose hatch
#

Seems to work without quotes when I try...

little eagle
#

No, marcel, only breakOut/To and exitWith.

halcyon crypt
#

bleh 😦

#

wasn't there some breakOut/To trick to break to the top of the current scope?

little eagle
#

The syntax is:
isNil STRING
with the string being the variable name.

halcyon crypt
#

nvm breakOut "" apparently mimics exitWith

little eagle
#

No.

ivory vector
#

is it possible to do a waitUntil along with onPlayerConnected to remoteExec a function to that client once he has picked a slot and spawned in?

little eagle
#

Why though?

#

initPlayerLocal.sqf
or
initPlayerServer.sqf
is what you're trying to reinvent.

ivory vector
#

im trying to make a server addon pbo for a phone system im working on for my server, im just trying to hide as much as i can server side.

peak plover
#

What does a phone have to do with onPlayerConnected?

little eagle
#

Then make it a CfgFunctions function with postInit set to 1. The player will exist.

ivory vector
#

gotta set the players number to the player.

peak plover
#

Don't have to set it onPlayerConnected

ivory vector
#

i have a query that runs on the server when the player connects to get the players number from the database.

peak plover
#

Using CBA?

ivory vector
#

vanilla

peak plover
#

initPost XEH and isPlayer

#

Time to get CBA

little eagle
#

CfgFunctions
postInit = 1
That should be enough for vanilla.

peak plover
#

Yeah

little eagle
#

Hmm wait.

#

Server addon. Making stuff unnecessarily complicated again.

#

πŸ€”

peak plover
#

"But 'muh Dark RP server"

ivory vector
#
ADT_OnPlayerConnected = compileFinal "
  params [""_uid""];
  waitForClient = _uid spawn {
    _clientNotFound = true;
    while {_clientNotFound} do {
      {
        if (getPlayerUID _x == _this) exitWith {
          [_x]remoteExec [""ADT_Querynumberserver"",2];
          _clientNotFound = false;
        };
      }forEach playableUnits;
    };
  };
";
``` would that work ? @little eagle  im just trying to hide as much as i can
little eagle
#

This is just an assignment. It does nothing.

ivory vector
#

But I can call this function with onPlayerConnected ?

little eagle
#

It looks unnecessarily complicated.

ivory vector
#

probably, just at the moment all of the functions are server side, only 1 of the functions are being published to the client