#arma3_scripting

1 messages Β· Page 295 of 1

plucky beacon
#

using a preinit function, and send the passcode for that instance to a briefing file

#

create a diary record and stuff

#

more importantly how do I get the randomized number to by synced globally

#

well this is a unique issue

#

I want the passcode to be 8 digits, but randomly getting a number that long will change it to scientific notation

#

looks like I'll just have to concatenate numbers together

#

from a string

leaden knoll
#

Hi guys, just a quick question. When someone climbs into the driver seat of a vehicle. Locality of the vehicle is transfered to the driver correct? So if I use allowDamage command I need to execute it on the client who is the driver correct?

thin pine
#

It's a good read

tough abyss
#

@leaden knoll using remoteexec can handle for stuff like that. i.e target can be object + it will get executed where the object is local.

leaden knoll
#

Thanks guys @thin pine @tough abyss

late gull
#

hi, is there any way to get the player inventory class to restrict vehicles?

#

and wich is the best way to restrict a vehicle

#

i mean, how to get this driver and pilot class:

// Description.ext
class CfgRoles {
    class Assault { /*codes*/ };
    class Support { /* codes*/ };
}
class CfgRespawnInventory {
    class Driver { /* codes*/ };
    class Pilot { /*codes*/ };
};
little eagle
#

Wait, @late gull . Do you know what CfgRoles is for??

late gull
#

@little eagle not at all, any reference pls?

little eagle
#

It's scripting.

#

playerInitLocal.sqf is the best place to start with this imo.

split coral
#

Roles are for loadouts, I don't think you can handle vehicles with it

late gull
#

umm

little eagle
#

Any details, Greenfist?

split coral
#

the new respawn menu

#

in biki possibly

little eagle
#

Documentation respawn menu, ok.

little eagle
#

All the loadouts available in a mission are now divided into various roles.
Mission designer can use roles already created in the game config

#

My German soldiers don't have the role config entry. I was considering adding it, but had no idea what it meant.

#

Now I know that it's kinda important for mission makers. Will add it.

late gull
#

where u find this?

split coral
#

It's in the cfgVehicles, but is it connected to the description.ext roles? I can't see how. πŸ€”

late gull
#

so, there is no way to get wich role or inventory is assigned to the player?

little eagle
#

The addon config has the default value of the role for each classname.

late gull
#

so, i can use the default role for loadouts?

little eagle
#

See:

      class WEST1 {
           vehicle = "B_soldier_AR_F"
           role = "test1";
      };
late gull
#

vehicle?

split coral
#

men are vehicles too.

late gull
#

ohh

little eagle
#

I edited it. This would assign role "test1" to the "B_soldier_AR_F" class soldiers.

#

By default (addon config) they are "MachineGunner".

late gull
#

but what if : ```SQF
class WEST1 {
role = "B_soldier_AR_F";
};

#

?

little eagle
#

No, role is the CfgRoles entry, not the classname

#

classname is vehicle =

#

Currently all my Bundeswehr soldiers are "Rifleman", because I never set the entry for each classname.

late gull
#

but i have to add lobby class? all my slots are VR xD

#

yes the same, i'm startring mp coop mission

#

from scratch

little eagle
#

Not the same. I'm talking about mod config.

#

Not a mission.

late gull
#

ohh, i'm talking about playable units, all of them are VR entity, so i will need to add the correct unit like "B_soldier_AR_F" or ?

#

nvm, will test it

little eagle
#

I never used this. I just told you that I learned about this 1 5 minutes ago.

late gull
#

jeje oki, ty for helps :p

#

hmm, using "vehicle" will override all your own loadout

#

also the role

#

and yes, you need the slot linked to the class

little eagle
#

Yeah of course.

#

That is how it's determined. Slot's classname.

#

Either via the "role" entry of the class in the addon config.
Or the classname directly ("vehicle" entry) in the mission config.

#

I think this is a band aid solution tbh. They should've made something more general.

#

w/e

late gull
#

but if i make my own string in vehicle = "my_power_name" ? this will give a kernel panic? :p

little eagle
#

Probably just sits there in memory, because no classname searches for that.

#

Matches no classname = unreachable code.

thorn saffron
#
            //--- Grid and elevation next to cursor
            CONTROL ctrladdeventhandler [
                "mousemoving",
                    format [
                        "
                        _map = _this select 0;
                        _text = (ctrlparent _map) displayctrl 1016;
                        _over = ctrlMapMouseOver _map;
                        _isTask = if (count _over > 0 && {_over select 0 == 'task' || {_over select 0 == 'taskTooltip'}}) then {true} else {false};

                        if (_this select 3 && {!_isTask}) then
                        {
                            _mapPos = _map ctrlmapscreentoworld [_this select 1,_this select 2];
                            _textPos = ctrlposition _text;
                            _textPos set [0,(_this select 1) + 0.02];
                            _textPos set [0,(_this select 1) + (_textPos select 2) / 4];
                            _textPos set [1,(_this select 2) - (_textPos select 3) / 2];
                            _text ctrlsetposition _textPos;
                            _text ctrlsettext format [
                                '%2\n%3 m',
                                mapgridposition _mapPos,
                                round getterrainheightasl _mapPos
                            ];
                            _text ctrlsettextcolor %1;
                            _text ctrlsetfade 0;
                            _text ctrlenable false;
                            _text ctrlcommit 0;
                        }
                        else
                        {
                            _text ctrlsetfade 1;
                            _text ctrlcommit 0;
                        };
                    ",
                    _trackColor,"%1","%2","%3"
                ]
            ];
#

Its a part of the UI, I'm trying to make the grid number and attitude next to the map cursor bigger. Any idea what part sets formating for the font size of the grid number and ASL?

#

@zenith bramble

little eagle
#

Your only chance to change the font size with scripts is structured text, but I'm not sure the control supports TEXT and not only STRING.

austere granite
#

Is there any good commands to add a magazine to a unit (ideally vest) bypassing the size restrictions ?

little eagle
#

Overloaded vest?

austere granite
#

I just need a temporary add, so the equipped launcher comes loaded at start

#

Add magazine (overload), add launcher, magazine goes into launcher and vest = fine

#

_unit addItemToVest _item; thought this did it, but nope

little eagle
#
(vestContainer _unit) addMagazineCargoGlobal
thorn saffron
#

@little eagle I just want to change size, I already made a little mod that change the font sizes using config, but I was unable to find the grid number next to the cursor. 041019, 35m
http://i.imgur.com/o8HnM55.jpg

little eagle
#

try this. The cargo commands usually don't check for overloading, which is probably a bug

thorn saffron
#

its all vanilla Arma 3 stuff

little eagle
#

It's not vanilla anymore if you make a "little mod".

austere granite
#

Works, thanks commy πŸ˜ƒ

little eagle
#

yw

austere granite
#
            _x params [["_item", "", [""]], ["_itemQty", 1], ["_forceAddToVest", 0]];
            if (_forceAddToVest == 1) then {
                // -- Only add the first magazine to vest
                (vestContainer _unit) addMagazineCargoGlobal [_item, _itemQty];
                _itemQty = _itemQty - 1;
            };
            if (_itemQty > 0) then {
                _unit addMagazines [_item, _itemQty];
            };

πŸ˜ƒ

little eagle
#

sizeEx="0.8 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";

#

upscale the 0.8

#

That should do it. You need to make it for 2 or 3 displays, since there are different maps for SP / MP host and MP client.

#

class CA_MouseOver: RscText

#

That one at least uses the same idc, so it must be it as far as I can tell.

#

Congratz Adanteh. That looks like actual SQF,

austere granite
#

needs more spawns and execVMs tbh fam

#

Can never have enough of those

tough abyss
#

How do I change the player's side? The following isn't working. ```SQF
// Player is on west
_eastHQ = createCenter east;
_dummyGroup = createGroup east;
[player] joinSilent _dummyGroup;

little eagle
#

createCenter does nothing in Arma 3.

#

How do you determine if the player changed sides? playerSide will always report "west", because that is what you chose on the slot selection screen.

#

Stuff like Altis Life and Exile uses playerSide command all over the place instead of the correct side group player, so you cannot change sides in those mods.

tough abyss
#

Wait, so createCenter is redundant here also? ```SQF
private "_curator";

if (isNil "nev_sideCenter") then {
nev_sideCenter = createCenter sideLogic;
publicVariable "nev_sideCenter";
};

_curator = (createGroup nev_sideCenter) createUnit ["ModuleCurator_F", [0, 0, 0] , [], 0, ""];
player assignCurator _curator;
openCuratorInterface;

#

I don't see how it work otherwise.

#

And it wouldn't work if it didn't do anything.

little eagle
#

createCenter does nothing in Arma 3, so yeah

#

In Arma 3, the centers for all sides are created for you. An attempt to create center for existing side is ignored.

#

I don't see how it work otherwise.
Just remove the if-block and replace nev_sideCenter with sideLogic.

And it wouldn't work if it didn't do anything.
Tautology

tough abyss
#

As in nev_sideCenter = sideLogic?

#

Or ```SQF
_curator = (createGroup sideLogic) createUnit ["ModuleCurator_F", [0, 0, 0] , [], 0, ""];
player assignCurator _curator;
openCuratorInterface;

little eagle
#

the latter

tough abyss
#

Yep, just checked, it works. So does checking the player's side with side group player.

#

Thanks @little eagle!

little eagle
#

yw

rigid plover
#

So is anyone familiar with the gcam mod?

thin pine
#

Modified it a while ago, what's up? @rigid plover

rigid plover
#

@thin pine I have modified it a bit myself but only in the config file :D. I was wondering if you would know how to add a camera speed feature in game?

#

I don't have a controller and quitting the game to change the camera speed is so time consuming.

#

also is there a way to smooth the movement? so that you can move in more than 1 direction at a time.

zenith bramble
#

@thin pine That one is for you kind sir πŸ˜ƒ

unreal siren
#

Simple question here

#

I'm making a helper function for 3Den to dump the getPosATL without array brackets ([]), how would I go about using a var in this situation? ["example text, @%!@$"] call BIS_fnc_filterString;

halcyon crypt
#

use format

unreal siren
#

Erm

halcyon crypt
#

or str I guess

unreal siren
#

It's the Syntax, specifically lol

halcyon crypt
#

πŸ€”

thick oar
#

To get to each component of the getPosATL array use select _index

unreal siren
#

["hint 'lololololol', @%!@$"] call BIS_fnc_filterString; returns "hintlololololol" as intended, I'm not sure how to actually use format/variables in it.

halcyon crypt
#

or just do what @thick oar says, waaayyyy better

thick oar
#

Many ways to solve the thing, it all depends on what exactly you need. πŸ˜„

little eagle
#
format (["%1,%2,%3"] + getPosATL _object);
unreal siren
#

Return getPosATL without the array brackets in text form

thick oar
#

Then commys's way is correct.

halcyon crypt
#

damn that's fancy

#

πŸ‘

little eagle
#
private _posStr = str getPosATL _object;
_posStr = _posStr select [1, count _posStr - 2];
#
(str getPosATL _object splitString "[]") joinString "";
#

How many more?

unreal siren
#

O:

thick oar
#

Two.

#

One involving modelToWorld, please.

unreal siren
#

XD!

#

I was this way with Glua. Still have a lot to learn for SQF.

little eagle
#
private _posStr = "";
{
    _posStr = _posStr + str _x;
} forEach getPosATL _object;
#

I guess that's missing the commas.

#
(getPosATL _object apply {str _x}) joinString ",";
#

pick your poison.

unreal siren
#

``'
copyToClipboard ((getpos (get3DENSelected "" select 0 select 0)) call {
_posStr = format ["%1",_this];
format["%1",(_posStr splitString "[]") joinString ""]
})```

#

Wow I suck at markdown. That's what I ended up using.

indigo snow
#

you know you can log positions through the right click context menu, right?

unreal siren
#

Uhh

#

Yeah, but

#

[16736.5,17217.3,2.67029e-005] is the result

#

compared to 16736.5,17217.3,-0.00243187

indigo snow
#

those are virtually identical

unreal siren
#

But one hurts my eyes... 😦

thin pine
#

@rigid plover you could always rewrite portions of the gcam.sqf - I reckon an easy way to change camera speed without having to quit the game all the time or do any editing to gcam.sqf at all would be to change the defines in gcam_config.hpp. e.g. remove the #define CFMOVE and add a global var instead; CFMOVE = 0.8;
You could easily influence that variable w/ the debug console or write a script that changes the speed using the KeyDown EH.
Regarding smoothing - I cant remember but if gcam indeed does not have smooth movement interpolation like camera.sqs, you'll have to do some maths yourself and modify the gcam.sqf.

#

@zenith bramble you filth πŸ˜›

thick oar
#

camera smoothing can be enabled via:
_camera camCommand "inertia on";

thin pine
#

For gcam though?

thick oar
#

if it creates a camera using camCreate, then yes.

thin pine
#

I've never messed with that actually, does that automatically convert the camera scene/object to freeroam mode? or is camSetPos still needed? edit: tested it, camera is nice and smooth, does require camSetPos. Untested with gcam though

unreal siren
#

Why does setpos not like putting units in buildings?

thin pine
#

setPosATL/ASL

unreal siren
#

Why does it do this?

halcyon crypt
#

because Arma 😁

thick oar
tough abyss
unreal siren
#

Gotcha

#

So getPos uses AGLS...

tough abyss
#

just work with either ASL or ATL cositently

unreal siren
#

Could also try the funky function on the Position page, lol

little eagle
#

getPos AGLS
setPos AGL

unreal siren
#

setPosATL didn't change the building issue..

little eagle
#

What are you doing?

unreal siren
#

Trying to teleport a unit exactly where the setPos/setPosATL is

#

But it's being offset in most cases to the nearest outside place

indigo snow
#

you need to getPosATL too

little eagle
#

^

unreal siren
#

Yeah, used getPosATL

indigo snow
#

see that third index, its near 0

#

then you do it wrong

unreal siren
#

16436.7,17175.3,0.374245

#

Is result

little eagle
#

That is about 0

#

Definitely not second floor

unreal siren
#

This is first floor, lol

#

This is weird...

#

player setPosATL([16436.8,17175.3,0.378138]); works as intended

#

And setPos

#

Something is mucking up in sqf

little eagle
#

?

unreal siren
#

I'm retarded.

#

I had findEmptyPosition in use to prevent players spawning on players...

plucky beacon
#

If I want to read the first character of a string, I would do that by converting a string to an array right?

unreal siren
#

That would definitely be responsible for my problems, lol

little eagle
#

_string select [0, 1];

#

0 first index
1 length

plucky beacon
#

oh okay

unreal siren
#

Would there be a way to make findEmptyPosition work with buildings?

little eagle
#

probably not

unreal siren
#

Could always make a check that looks for nearby buildings first...

plucky beacon
#

havin' a bit of a scuffle with the hold action script, can't figure out how to pass a variable

[
    _object,
    "Search for Passcode",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
    "_this distance _target < 3",
    "_caller distance _target < 3",
    {/*started*/},
    {_this call bomb_fnc_searchingSound;},
    {/*script*/},
    {/*interrupted*/},
    [],
    12,
    0,
    false,
    false
] call BIS_fnc_holdActionAdd;

https://community.bistudio.com/wiki/BIS_fnc_holdActionAdd
now I know the wiki says

_object = this select 0;
_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString;

if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") exitWith {
    _filename = selectRandom ["typing1","typing2","typing3","typing4","typing5"];
    _soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
    playSound3D [_soundToPlay, _object, false, getPos _object, 0, 1, 5];
};

says it can't find _object

dusk sage
#

What says it can't find object?

indigo snow
#

typo

#

_this select 0

dusk sage
#

well spotted batman

plucky beacon
#

it says it passes the array though

#

and 0 is the object source

indigo snow
#

yea using the _this variable

#

it needs the underscore

plucky beacon
#

oh

#

fuck me

indigo snow
#

this is only in de eden init code box

plucky beacon
#

I see

#

I didn't see but now I do

#

derp

compact galleon
#

Anyone know what the scripting command for the "Show Model" option in Eden is?

plucky beacon
#

hideObjectGlobal

compact galleon
#

@plucky beacon IS that it? Or are you assuming?

plucky beacon
compact galleon
#

I'm ASKING whether you KNOW that's the exact command they're using, or whether you're just assuming based on its behaviour

indigo snow
#

dude whats with that tone

compact galleon
#

@indigo snow What? I'm asking a question

indigo snow
#

its coming accross in a kind of rude way

compact galleon
#

You're reading too much into it.

inner swallow
#

did someone spam @ everyone or what

plucky beacon
indigo snow
#

you're in luck tho, DriftingNitro was entirely correct.

                        property = "hideObject";
                        control = "CheckboxReversed";
                        displayName = "$STR_3DEN_Object_Attribute_HideObject_displayName";
                        tooltip = "$STR_3DEN_Object_Attribute_HideObject_tooltip";
                        expression = "if !(is3DEN) then {_this hideobjectglobal _value;};";
                        defaultValue = "false";
                        wikiType = "[[Bool]]";
compact galleon
#

@plucky beacon @indigo snow Good, thanks, that's all I wanted to know

plucky beacon
#

Is .wss a weird bohemia format thing?

compact galleon
#

yes.

#

well, it's a BIS format

#

don't know if it's weird

indigo snow
#

Microsoft Windows Sound System file

compact galleon
#

Bis-proprietary WSS files store Pulse Code Modulated (PCM) sound data. It's format is a variant of RIFF WAVE file format used for .wav

indigo snow
#

mhm funky

plucky beacon
#

weird Audition doesn't export to .wss

compact galleon
#

It's BIS proprietary

indigo snow
#

for most things arma, .ogg is good enough tho

plucky beacon
#

playsound3d isn't taking my .ogg

#

I wanna see if using a diffrent format works

#

oof that file size though

compact galleon
#

@indigo snow Did you extract that from the PBOs or is there some online site with all the eden source?

indigo snow
#

from the addon yea

#

you can look at it in the config browser too

compact galleon
#

right

#

How are you supposed to check how many opfors have died when their side changes to civ when they die?

thin pine
#

check their group

compact galleon
#

doesn't work if they're one man groups

#

the group changes to civ too when all members are dead

#

I'm using { side group _x } count allDeadMen

#

which returns 2 after killing like 7

thin pine
#

side group _x == east you mean?

compact galleon
#

yes

#

here's my actual trigger condition { side group _x == opfor } count allDeadMen >= 5

#

okay, it actually works ONLY for men who are alone in a group

#

If they're in a group with multiple units, they get moved to a new civ group when they die,

#

oh, and it seems the 1 man groups are removed too after like 10 seconds of them being dead

#

hmpf

#

that's counter productive

thin pine
#

it is possible to avoid the auto deletion of groups now (since 1.66 or 1.68, not sure)..though I wouldn't recommend that

compact galleon
#

@thin pine In either case, checking how many are dead is problematic at best

thin pine
#

Maybe check how many are alive πŸ˜›

compact galleon
#

well, that's as bad as making an array when the game starts of all opfor units. If adding more units, the arrays would need to be updated

#

or the counter, in case of your suggestion

zenith bramble
#

@thin pine πŸ˜›

#

@compact galleon
I would use a gvar in the onKilled on the unit to add 1 death to the gvar.
much like
OpforTotalDead = OpforTotalDead + 1;
You can use a switch to split up the different sides or groups if you would like to get detailed or have multiple groups in the mission and want to track them all individually

compact galleon
#

@zenith bramble I can think of enough ways to do it. The problem is, that it's a simple problem that should have a simple solution. Yet you have to deal with events and whatnot, just to check if a couple of enemies are dead

rigid plover
#

@thin pine Like I say im not well versed in scripting within arma, I have only gone as far as to edit the config.hpp to remove some messages that pop up. I don't suppose you could add a camera speed function for me? I fully understand if you don't want to.

zenith bramble
#

@compact galleon πŸ˜‰ I feel your pain but if it was too easy, we would be out of a hobby and the game would have clones all over the place

compact galleon
#

I very strongly disagree with that statement.

#

Especially because it hasn't always been like that

plucky beacon
#

I looks like playsound3d does only work with wss files, even using BIs file directories only the wss files work

#

wav and ogg won't play

compact galleon
#

@plucky beacon This command works well with addon sounds, however getting it to play mission sound files is a bit tricky. Follow this guide -Killzone_Kid

plucky beacon
#

I did

#

that's why I mentioned the BI directories

compact galleon
#

also why do you need it specifically? why not just use say/say3d?

plucky beacon
#

because multiplayer?

compact galleon
#

so execute it on all players?

zenith bramble
#

remoteExec on all players, you too fast Mulle πŸ˜‰

plucky beacon
#

I want to use the volume and isInside parameters

compact galleon
#

I haven't played arma for like a year. Does it have any query commands?

#

like _opforUnits = allUnits where { side group _x == opfor };

zenith bramble
#

@plucky beacon You could also create a function on the clients for playing the sounds using playSound3d.
Then use the remoteExec to call that function on the clients πŸ˜ƒ

plucky beacon
#

TFW you're about to test to see if you can hear something but your roomate turns the vacuum on

zenith bramble
#

@compact galleon thats why an array is useful.
When I spawn in a zombie or an ai unit in my eXpoch A4E write.
I add that units info to an array that is stored server side only.
When dead that onKilled can do anything to the array since it processes on the dead unit.

plucky beacon
#

okay so now it is working with my ogg files

indigo snow
#

there is the new ARRAY select CODE syntax @compact galleon

plucky beacon
#

what did I change

compact galleon
#

@indigo snow Cool, that's what I was hoping for.
I had just finished writing

_allOpfor = [];
{
    if (side group _x == opfor) then
    {
        _allOpfor pushBack _x;
    }
} forEach allUnits;
indigo snow
#

saw you used the csharp syntax, theres a sqf syntax too

compact galleon
#

really? is that discord global?

#

or can you somehow add custom syntax highlighters on your server?

#

Well, now I'm doing

_allOpfor = allUnits select { side group _x == opfor };```
indigo snow
#

global

compact galleon
#

sure that's Arma 3 sqf and not some other lang?

indigo snow
#

theres the new private syntax too

#
private _a = [1,2,3] arrayIntersect [2,3,4];
compact galleon
#

There. This should work

if (isNil "_allOpfor"} then
{
    _allOpfor = allUnits select { side group _x == opfor };
};

_deadEnemies = { not alive _x } count _allOpfor;
_deadEnemies >= 5;```
#

(trigger condition)

indigo snow
#

!isNil

compact galleon
#

no?

indigo snow
#

oh i see what youre doing

#

my bad

#

but why not use count in the first place?

compact galleon
#

oops, there's a mistake in the if

#

curly end bracket xD}

indigo snow
#

{!alive _x && {side group _x == east}} count allUnits

compact galleon
#

welcome to the discussion xD

#

that's why I'm doing this, because that won't work

#

since groups are set to civ when units die

indigo snow
#

its using the same logic as _allOpfor = allUnits select { side group _x == opfor };

#

nvm i again see what youre doing

compact galleon
#

I need all units, so I can check who's died

indigo snow
#

late friday night ><

compact galleon
#

since you can't check side of dead units

#

so I need to init all opfors on startup

indigo snow
#

wont work with local vars in a trigger condition check though

#

that at least im fairly sure of

compact galleon
#

you're right, but that's not a problem

#
{  
    _allOpfor = allUnits select { side group _x == opfor };  
};  
  
_deadEnemies = { not alive _x } count _allOpfor;  
_deadEnemies >= 5;}```
#

uuh

#

actually, that's a problem xD

#

I'll need a public

indigo snow
#

at least allOpfor would need to be a global

compact galleon
#
call {if (isNil "allOpfor") then  
{  
    allOpfor = allUnits select { side group _x == opfor };  
};  
  
_deadEnemies = { not alive _x } count _allOpfor;  
_deadEnemies >= 5;}```
#

there

#

call{} to allow _deadEnemies

dusk sage
#

eh?

compact galleon
#

@dusk sage Eh??

indigo snow
#

that trick might work if you refine it a bit more

dusk sage
#

What's the current issue w/o the call..?

indigo snow
#

never solved the issue like that though

compact galleon
#

@dusk sage You can't use local variables in a trigger condition

dusk sage
#

What do you mean by 'cant'? You are

compact galleon
#

because I'm using call

#

@dusk sage Without call

#

"Condition: Local variable in global space"

#

Hmpf, stupid you can't post images

#

Now I just need to figure out why the condition seems to not be executed at all

#

oh

#

lol

#

undid the change from private to public

plucky beacon
#

How do I get a player to force open a breifing subject and title tab on the map? I remember seeing somewhere else do it but I forget where from.

compact galleon
#

@plucky beacon Briefing subject and title tab? Not sure what you're refering to

plucky beacon
#

when you go to the map there is a briefing tab

#

then there are subjects in that briefing tab

#

and you can force open the map but not that tab

#

aka journal

late gull
#

guys, where i can find a list for isKindOf ?

plucky beacon
#

it uses the config files, if you're in arma go to config viewer

late gull
#

yes, just found it xD, ty

plucky beacon
#

πŸ‘

vital onyx
#

Guys, any advice on accessing userconfig's files from a function?

halcyon crypt
#

what's the use case? userconfig files are pretty much dead since filePatching has been disabled by default

queen cargo
#

yes and no @halcyon crypt

#

just means you have to provide a pbo instead

#

or enable filepatching again

halcyon crypt
#

πŸ˜ƒ

vital onyx
#

well, it is actually for an addon

#

I just wanted some parameters to be changed between the restarts

#

or what's the best way to include the file outside of PBO in addon config?

halcyon crypt
#

but beyond that no clue

#

all I know is that everyone is, where possible, transitioning to CBA's settings framework

#

or what @queen cargo said I guess

queen cargo
#

profileNamespace

#

is what i say to such things

#

no need to change between restarts

#

does not require CBA reference

#

just some custom UI

#

or ... use CBA

vital onyx
#

no CBA

queen cargo
#

profileNamespace

#

profileNamespace setVariable ["foo", "bar"]

vital onyx
#

I know, I know

compact galleon
#

Pretty stupid that AT AIs always walk as slow as fucking possible, wtf

halcyon crypt
#

they're "aiming" πŸ˜›

plucky beacon
#

you try running with a rocket launcher on your shoulder

unreal siren
#

So uhh...

#

Retrieving the missionConfigFile path for future use; would it be a bad idea to do so on every on killed event?

#

Since it's only needed once, I could define it somewhere else...

halcyon crypt
#

either way would work, don't think the player would notice any difference

#

it is "better" to store things you reuse at later points but I wouldn't worry about it too much

#

configFile stuff is pretty fast and probably is already loaded in memory though Β―_(ツ)_/Β―

unreal siren
#

Ah, I used __EXEC (MISSION_ROOT = __FILE__ select [0, count __FILE__ - 15]);

#

Combined with _root = parsingNamespace getVariable "MISSION_ROOT";

#
 _root = parsingNamespace getVariable "MISSION_ROOT";
        _randomscreamus = ["us\usscream1", "us\usscream2", "us\usscream3", "us\usscream4"];
        _randomscreamru = ["ru\ruscream1", "ru\ruscream2", "ru\ruscream3", "ru\ruscream4"];
        _randomscream = ["arm"];
        if (side (_this select 0) == west) then {_randomscream = _randomscreamus} else {_randomscream = _randomscreamru};
        _selectsound = _randomscream call BIS_fnc_selectRandom;
        playSound3D [(_root + "sounds\shoutouts\" + _selectsound + ".ogg"), false, getPos (_this select 0) , 1, 1, 0];'
#

This is complaining about 0 elements provided, 3 expected... What did I break?

#

Solved. didn't define an element, lua is different from sqf... lol

vital onyx
#

why you do not like missionConfigFile?

unreal siren
#

No reason- would it work from desc.ext?

#

And how would I go about dumping a list of vars used by a mission for security reasons?

plucky beacon
#

is modelToWorld known to be unreliable at all? Every so often the box that's supposed to be in a tower is above it

#

it's so weird, I think it has to do something with if anyother building si beneath it

little eagle
#

probably an error on your part with handling the various position types ASL/ATL/AGL/World/AGLS

plucky beacon
#

Very rarely is it the code's fault ya

little eagle
#

rule 1: never use getPos

plucky beacon
#
tower setVehiclePosition [_pos, [], 0, 'none'];
_posTower = tower modelToWorld [-3.2,-3.0,2.467];
terminal setpos _posTower;
terminal setDir 180;
little eagle
#

And the terminal is stuck with the wrong height?

plucky beacon
#

sometimes it's on the roof of the cargo tower, other times it's way above it like 4 meters

#

it's perfect when it's not on top of any buildings

#

for context I'm testing in the VR area

little eagle
#

The tower is or the terminal?

plucky beacon
#

the tower is fine and placed on the ground

#

the terminal farther above where it's supposed to be when the tower has other building beneath it

little eagle
#
tower setVehiclePosition [_pos, [], 0, 'none'];
_posTower = AGLToASL (tower modelToWorld [-3.2,-3.0,2.467]);
terminal setDir 180;
terminal setPosASL _posTower;
plucky beacon
#

I'll try that

#

but I can confirm it's because of buildings the tower is on top of

little eagle
#

Definitely execute this on the machine where the tower is local.

plucky beacon
#

so server

#

πŸ‘Œ it works

#

just gotta make sure it stays local

#

Can't I just target it with remoteExec?

little eagle
#

What you think the problem was?

#

setPos or being executed on the wrong machine?

plucky beacon
#

setpos

#

I haven't tried executing it on a diffrent machine

little eagle
#

or maybe setDir after setPos??

#

I had problems using setPos a long ass time ago.

plucky beacon
#

im gunna try that setdir

little eagle
#

It would behave as expected for everything except boats.

plucky beacon
#

setting direction doesn't seem to do anything diffrent before or after

#

lol boats, poor boats always gettin' the short straw

little eagle
#

ok. The problem with setDir is, that it has local effects or something

#

so to synch the direction one has to use setPosX afterwards

plucky beacon
#

I know that in zeus, if the server owns a unit you can't change it's direction

little eagle
#

Might be no longer true in A3 though.

plucky beacon
#

it's extremely fustrating actually

little eagle
#

Yeah, setDir requires a local object

#

setPosX works on remote objects

#

it probably just fails silently with zeus on remote units, because shit scripting.

plucky beacon
#

it's a real shame too because it's been like that forever

#

should probably see if a ticket is submitted or something

little eagle
#

fix is done in 30 seconds

plucky beacon
#

I know, that's the worst part

#

is it possible BI just doesn't know?

little eagle
#

Zeus is not moddable at all unfortunately. The opposite of modular just like the arsenal

#

Unlike 3den

plucky beacon
#

I'm happy with the modularity in 3den

#

Zeus can have some modules added but that's about it

little eagle
plucky beacon
#

wai wat

#

that's not in yet is it?

#

7 days ago so no

little eagle
#

3.3

#

Triggers apparently have the same "problem". Maybe I can solve it there too similarly. Maybe not though.

plucky beacon
#

Just registered the Phabricator account

#

Hmmm, don't have much of a relative view on teh severity of this bug, I guess it would qualify as minor

little eagle
#

which bug?

plucky beacon
#

the setDir one in zeus

#

It's not game breaking but it makes a commonly used and basic feature unusable

#

or tweak whatever that is

little eagle
#

The problem is that you would have to replace a whole script file if you'd fix it.

plucky beacon
#

you replace the curator addon?

little eagle
#

And then if BI patches something, your file is missing out on the changes and probably breaks.

#

You don't need to remove anything, but you have a lot of copy pasted code in your mod.

plucky beacon
#

wat, your losin' me

little eagle
#

And you have to maintain it and check every update for changes you have to mimic to not break other things.

plucky beacon
#

what's this relative to my file?

little eagle
#

"your file"?

plucky beacon
#

ya

#

if we're talking about zeus changing direction of units that's encapsulated seperately isn't it?

little eagle
#

No, it's probably in one huge ass file that handles all kinds of things just like the arsenal.

plucky beacon
#

but what part of that enables zeus to change direction of units, and regardless of the size of a file why wouldn't it be fixed

little eagle
#

Probably one like
_x setDir _dir

#

lol

#

Who knows.

#

[_x, _dir] remoteExec ["setDir", _x]

#

there

#

fixed

#

The arsenal is beyond saving anyway.

plucky beacon
#

arsenal is good for exporting cfg loadouts

little eagle
#

You can lag out a MP game with it for everyone else by spamming certain keys / mouse buttons

plucky beacon
#

ya, a brute force method of solving that would be making local changes to gear before confirming

#

Imma help BI out and give a vid for reproducing it

#

maybe I just want to try and be thorough

plucky beacon
little eagle
#

ahahaha, they even turn back when changing their position

plucky beacon
#

it must be the locality if they turn after remote controlling them

#

it's just all pointing in that direction

little eagle
#

@plucky beacon

//init.sqf
{
    _x addEventHandler ["CuratorObjectEdited", {
        params ["", "_object"];

        if (!local _object) then {
            [_object, getDir _object] remoteExec ["setDir", _object];
        };
    }];
} forEach allCurators;
#

put this in your mission and try again

plucky beacon
#

Oh shit uhh

#

Turned off my comp

#

Dammit

#

I'll do it tomorrow

little eagle
#

ok

vital onyx
little eagle
#

nope

snow raft
#

Is there a way to detect which item has been taken out of a container?
I am using the Take Eventhandler but have troubles to determine one looted item

#

It is my first mission and I dont know how I am selecting the item that was looted

little eagle
#

"selecting"

snow raft
#

_this select 0?

#

i figured it is something like that

little eagle
#

It says on the wiki

snow raft
#

so then it would be _this select 3?

little eagle
#

No, you always start at 0 in informatics

snow raft
#

yep worked, thanks for the push in the right way πŸ˜ƒ

little eagle
#

yw

snow raft
#

--

little eagle
#

Is this morse code?

#

... --- ...

plush cargo
#

been going crazy trying to find if position is near water. Messing around with bisfncfindsafepos and isflatempty. Cant get it working well. Seems unreliable.

arctic igloo
plush cargo
#

dont need to find if the surface is water but if there is water near a location, like within 500m

polar folio
#

yea but you could use this and then run a circle around you position in a radius of 500 m and check, if you find a position that is water

#

or something.

plush cargo
polar folio
#

i remember those being more slow than unreliable

#

didn't it give you what it should?

plush cargo
#

its deff slow, but no matter, only runs at beginning of mission

#

_overWater = !(_locPos isFlatEmpty [-1, -1, -1, 1000, 2, false] isEqualTo []);

#

you can see one location in pic marked as shore and another that deff should be

#

but is not

polar folio
#

so you need something right on the shore or just know if water is in the radius of 500 m?

plush cargo
#

yeah just need to know if water is close

#

mission startup gets all locations and has 20% chance of putting enemies there. If location is near water, i want to add enemies in ships

polar folio
#

ah. sounds cool

#

there was a thread about that command some time ago. i think. explaining it. one sec

little eagle
#

hmm, find the nearest water?

#

isFlatEmpty won't help you with that.

polar folio
#

we made a quick and dirty fnc for it. maybe someone can optimise it

little eagle
#

This is a interesting math / informatics problem. You can just do a long as search through all positions, but that will be slow as hell.

plush cargo
little eagle
#

That isn't exactly the nearest position under water though.

polar folio
#

i think he needs to check each town for near water. so this should be good enough. but maybe other ideas? i find this interesting too

indigo snow
#

If you just want to check if its near water, you can exitWith the check as soon as its returned true for a position.

polar folio
#

the purpose is to find "some" water positions near a town to spawn ships there. not sure if nearest is important. could be wrong

#

still won't be nearest then though

little eagle
#

If the question is if there is water, then cptnnick is right, but I doubt it is.

plush cargo
#

nearest not important, only that there is water nearby so enemies can be spawned. Will use exit with

#

maybe a check for depth

little eagle
#

well there you go.

indigo snow
#

you might want to wait until its found a few to make sure you didnt hit someones pond or something

little eagle
#

No ponds in Arma

polar folio
#

lol. imagine that. giant destroyer spawned in a pond πŸ˜„

plush cargo
#

surfaceiswater only works with sea water says the wiki

indigo snow
#

Finding the nearest water position is a cool problem too though

little eagle
#

It's talking about some fake water that doesn't exist in A3 anyway.

indigo snow
#

Maybe some arc sweeping thing where you decrease the radius each time you hit the arc endpoints

polar folio
#

so what would be ideas for a less quick and dirty but accurate way to find nearest? create grid and check all positions in it?

little eagle
#

Yeah. fnc_nearestWater is much more interesting.

#

How to create a grid in a circle in the first place?

polar folio
#

you could filter the stuff inside the circle out or something

#

you want the nearest position so wouldnt matter of circle or not

little eagle
#

If you use circle coordinate system (r,alpha), the grid point density should be: r*sqrt(2), so all points have the same distance from each other.

indigo snow
#

use bedbensons fnc to find all water positiond on the arc, then a line check from the origin to each point getting the first position where there is water, and then selecting the closest one from that would work 100% of time but be inefficient.

#

you could cache the current minDistance and abort the line check if the current distance is greater than that

polar folio
#

what's a circle coord system?

little eagle
#

I thought about something using the terrain slope, but usually it's the highest near mountains and super flat on beaches.

polar folio
#

i shall google πŸ˜„

little eagle
#

Get all points in a circle of the maximum radius like bb function

#

And then do a terrainIntersect on the water surface height.

#

from all the points.

#

The one that is the longest is the nearest to the center.

#

But that is missing out on all closed water sources inside the circle

indigo snow
#

you could do a 1m lineIntersect whose beginning point starts from the origin and travels out towards the arc

polar folio
#

hm. imaginative approach though

indigo snow
#

but i wonder if a lot of lineintersects are more expensive than surfaceIsWater

little eagle
#

You cannot start a intersect from under the ground unfortunately

polar folio
#

a grid is the most accurate i think but heavy

#

not even the non terrain intersect ones?

indigo snow
#

there arent really any grid style commands in arma so youd just scale down the problem to gridsize

little eagle
#

Considering SQF is super slow and the intersect does a lot of stuff without writing down much, the intersect variant could still be faster.

indigo snow
#

mhm. maybe have the terrainintersect origin point 500m above the origin and scan towards points on the arc radii? if false you hit water

little eagle
#

You still don't know where the water starts then

indigo snow
#

youd iterate all [alpha,r] from [0,0]

#

so youd know the angle and radius and calculate back the position

tough abyss
#

Is surfaceIsWater taxing?

indigo snow
#

no

tough abyss
#

Phew.

indigo snow
#

0.001 ms

indigo snow
#

mhm, water counts as terrain for terrainIntersect

indigo snow
#

Well, made this.
http://pastebin.com/cVWtkGtm

0: ORIGIN (2D or 3D position), array (2,3)
1: RADIUS, number
2: MINIMUM DEPTH, number
3: RADIUS INTERVAL, number
4: ANGLE INTERVAL, number

Can obviously be fairly expensive. One could try scripting multiple circles and having a different angle interval in the smaller ones to take advantage of point density.

#

You can make it faster if you add in a few assumptions such as the final point must be on water too, so you can skip checking that angle

dusk sage
#

@indigo snow
Careful with your first for loop, you're going to overshoot 360 pretty quick

indigo snow
#

in a for loop, it'd only overshoot it once, right?

#

But I just thought of a better way to handle point density, rewriting it a bit

#

( i meant, it might hit e.g. 367 or whatever, but it wouldnt progress past that, right)?

dusk sage
#

Tbh, if anything it won't let you past 360

#

So it won't check the last x sweep

#

for "i" from 0 to 360 step 31 would probably stop at 341

tough abyss
#

Is there a way to delete an icon created using drawIcon3D?

indigo snow
#

go into the next frame?

tough abyss
#

What if it's using an onEachFrame?

indigo snow
#

remove the onEachFrame handler

dusk sage
#

lol

tough abyss
#

Hmm, right.

#

Mind = blown.

dusk sage
#

I had a play with your function @indigo snow

#

For a proof of concept way to really reduce overhead for precise searching

#

for a 1 degree/ 1m param set its an order of magnitude (and more) quicker

#

However, the number of iterations is proportional to the distance squared, so r=1000+ can start causing issues

little eagle
#

lol, cptnnick blew Neviothr's mind

meager granite
#

Why not use getTerrainHeightASL for depth checks? πŸ€”

little eagle
#

surfaceIsWateralready reports a boolean, so it's probably faster

#

surfaceIsWateralready _pos

#

vs

#

getTerrainHeightASL _pos < 0

meager granite
#

They have _minDepth as argument

#

so they need a number anyway to check

indigo snow
#

yea that depth check would be better with that

little eagle
#

I don't think your function is right cptnnick

#

or rather it has a problem

#

with how the points you check are distributed

indigo snow
#

yes

#

thats what i was working on

meager granite
#

So what is the goal? Find THE closest water from point with as less error as possible?

#

Also surfaceIsWater checks if grid is lower than sea level, not exact position

#

basically floors X and Y

#

Doesn't matter for this kind of search though

late gull
indigo snow
#

not for this

little eagle
indigo snow
#

yea

#

you can say the angle step is 360?dr

meager granite
#

lol I did exact same thing month ago

indigo snow
#

that already spaces points better

little eagle
#

CBA_fnc_randPos
was very bad

#

It used a square

#
_origin getPos [_radius * sqrt (random 1), random 360]
#

now it's this ^

#

This syntax of getPos is probably helpful for this problem too

#

z is land surface in format PositionAGL

#

So you might not even need getTerrainHeight

#

Or maybe you do... AGL is ASLW over water ...

indigo snow
#

hm got it down quite a lot

#

typically stays < 10 ms but accuracy decreases with range

#

optional density parameter to "help" with that

#

Thinking about the point distribution, this would work good for smoother coasts but have issues with really jaggy ones with lots of inlets

meager granite
#

What are you trying to do anyway?

indigo snow
#

wasting a saturday afternoon πŸ˜„

#

It started with someone needing to figure out if a position had nearby water

#

and devolved into finding the closest position where there is water

dusk sage
#

Didn't expect to see the golden ratio in ARMA

#

gj with that

meager granite
#

I started doing some crazy stuff as well

indigo snow
plush cargo
#

was me who wanted the help! glad i asked. been following this convo with great interest

meager granite
dusk sage
#

lol

meager granite
#

Wanted to do it like this and then I realized it wouldn't be THE closest position

indigo snow
#

gridlike?

meager granite
#

It works but it is not the closest, just first to find going around wider and wider square clockwise

#

Laziest and quickest solution to find water assuming all map edges have water would be to cast a ray from your position in direction outgoing from center of the map

#

Which was what I did on Tanoa to quickly find which terrain is on main island and which is not

#

I didn't need to check each 1x1m patch of land though

#

comes down to required precision

#

Not optimized at all, don't judge me

polar folio
#

can you pass parameters into the code that is executed by BIS_fnc_loop? kind of confused about that

tough abyss
#

I have a script which created a 3d waypoint, similar to the player placed vanilla one. Thing is, whenever I use a teleport script, and try to move the waypoint - the 3d icon will stay in the same location, regardless of it's location of the map. Is there a way to fix that? ```SQF
// Waypoint script
disableSerialization;

if (hasInterface) then {
waitUntil {!isNull (findDisplay 12)};

_mapDisplay = findDisplay 12;
_mapControl = _mapDisplay displayCtrl 51;

_mapControl ctrlAddEventHandler ["MouseMoving", {
nev_mainMapMouseOverCustomMark = "customMark" in (ctrlMapMouseOver (_this select 0));
}];

["nev", "onMapSingleClick", {
if (_shift) then {
nev_customMarkLocation = _pos;
};
}] call BIS_fnc_addStackedEventHandler;

_mapDisplay displayAddEventHandler ["KeyDown", {
if (!isNil "nev_mainMapMouseOverCustomMark" && {nev_mainMapMouseOverCustomMark} && {(_this select 1) == 211}) then {
nev_customMarkLocation = nil;
};
}];

addMissionEventHandler ["Draw3D", {
if (!isNil "nev_customMarkLocation") then {
drawIcon3D [
"\A3\ui_f\data\igui\cfg\cursors\customMark_ca.paa",
[1,1,1,0.6],
[nev_customMarkLocation select 0, nev_customMarkLocation select 1, nev_customMarkLocation select 2],
1.1,
1.3,
0,
"",
0,
0,
"TahomaB",
"",
false
];
};
}];
};

#
// Teleport script
openMap true;
onMapSingleClick "player setPos _pos; onMapSingleClick ''; openMap false; true;";
little eagle
#

the 3d icon will stay in the same location, regardless of it's location of the map.

#

what

#

Oh

#

You broke your "onMapSingleClick" BIS_fnc_addStackedEventHandler by using onMapSingleClick

#

In order to keep compatibility between official and community content the functions BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler should be used instead.

tough abyss
#

Alright, I'll try those.

indigo snow
#

hm, surfaceIsWater returns true if its a rock over water.

tough abyss
#

Not sure I'm following you here, @little eagle. I'm already using BIS_fnc_addStackedEventHandler with onMapSingleClick.

#

Should I be using MapSingleClick?

indigo snow
#

Your teleport script should also use the onMapSingleClick BIS_fnc_addStackedEventHandler

tough abyss
#

I'll explain the issue again: I open the map, and shift click on a certain location, a 3d icon is created in said location. I then use a teleport script in order to teleport to another location on the map. After teleporting, I open the map and yet again, shift click on a different location in order to move said 3d icon, which does not move.

#

If I don't teleport and just move the icon around, it moves.

indigo snow
#

yes i understand you fix it by doing what i said above

still forum
#

using the onMapSingleClick function breaks the Stacked Eventhandler. That's why the stackedEH is not executing after you broke it with your teleport script

indigo snow
#

specifically, onMapSingleClick '' in the teleport script breaks it

tough abyss
#

So the teleport script is the issue, correct?

#

Is there anyway around that?

indigo snow
#

yes, you rewrite it to use the BIS_fnc_addStackedEventHandler too

#

like you do here

["nev", "onMapSingleClick", {
    if (_shift) then {
        nev_customMarkLocation = _pos;
    };
}] call BIS_fnc_addStackedEventHandler;
tough abyss
#

Would that work if I only use it on demand? I have a UI with a button, when I click it, it opens the map and allows me to teleport.

indigo snow
#

It works exactly the same

still forum
#

You'd have to remove the stackedEH again after it executed

tough abyss
#

Like so? ```SQF
["nevTeleport", "onMapSingleClick", {
player setPos _pos;
}] call BIS_fnc_addStackedEventHandler;
["nevTeleport", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;

still forum
#
["nevTeleport", "onMapSingleClick", {
    player setPos _pos;
    ["nevTeleport", "onMapSingleClick"] call BIS_fnc_removeStackedEventHandler;
}] call BIS_fnc_addStackedEventHandler;
tough abyss
#

Ah, alright. Thank you!

#

I didn't realize you could nest EHs within each other πŸ€”

still forum
#

You don't.

#

you can but that script is not doing that

tough abyss
#

Well you're putting a stacked EH within the scope of another stacked EH...?

halcyon crypt
#

I think you're not reading attentively 😁

tough abyss
#

Oh

#

remove

halcyon crypt
#

πŸ˜›

tough abyss
#

🀦

slim apex
#

Is there any way i can check if onMapSingleClick "vehicle player setPos _pos"; is ran?

bleak schooner
#

I want to move a player which i'm aiming at in a vehicle. _vehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0; _target = _cursortarget; _target moveincargo _vehicle; wont work

indigo snow
#

typo? _target = _cursortarget;

slim apex
#

OH

#

WAIT

#

nvm

#

Ignore i said that

#

I read your sentence wrong

bleak schooner
#
_target = cursortarget;
_target moveincargo _vehicle;
``` is actually the correct version
#

but wont work either

indigo snow
#

no

slim apex
#

Shouldn't it be this select 0, not select 0?

bleak schooner
#

that part works

slim apex
#

I've not scripted in a few weeks, need to remember what everything does xD

bleak schooner
#

if i use _vehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0; bob moveincargo _vehicle;
while bob is my player I want to move it works

indigo snow
#

and cursorTarget is returning an object to you?

slim apex
#

I see your issue

#
_target = _cursortarget;
_target moveincargo _vehicle;
#

What's _cursorTarget defined as?

#

Shouldn't it just be cursorTarget?

bleak schooner
#

as I wrote the correct one is ```_vehicle = nearestObjects[getPosATL player,["Car","Ship","Submarine","Air"],10] select 0;
_target = cursortarget;
_target moveincargo _vehicle;

indigo snow
#

@bleak schooner the issue might be cursorTarget not returning an object to you

#

check if it does in your debug console

bleak schooner
#

but why should it not?

indigo snow
#

check it though

#

cursorTarget can have quite a temper.

#

you might also wanna try the new-ish cursorObject

bleak schooner
#

cursortarget gives me a value

polar folio
#

regarding cursorObject vs cursorTarget. first one is way more accurate. but for some things you want something that takes general direction and is more open like cursorTarget. so both are useful still. latter might use bounding box as reference. don't know for sure though

bleak schooner
#

But it wont work

polar folio
#

good to see i'm not the only one using bob fo testing πŸ˜„

bleak schooner
#

bob is love bob is life.

#

but that doesn't help me fixing my problem

#

oh and when i use a bot it works as well

indigo snow
#

ah, try remoteExecuting it to that player

#

moveInCargo has local arguments

polar folio
#

you might also need assignAsCargo. not sure. stuff is annoying so i try to stay away

weak obsidian
#

After you do "Assignascaro" for each member of the group

#

Do: (units <groupname>) orderGetIn true; that should do it

#

First you tell them "This is your vehicle you should use" then you tell them to get in

plucky beacon
#

@little eagle that event hanndler you wrote last night looks like it didn't work

little eagle
#

😦

plucky beacon
#

hello darkness my old friend

little eagle
#

It's the only idea I had.

#

Not really much you can do with zeus scripting.

plucky beacon
#

riperoni

little eagle
#

But the script did execute, right?

#

It's just the getDir that reports the false direction anyway

#

right?

plucky beacon
#

I didn't add any formatted hints, I know it ran though

little eagle
#

lol how

plucky beacon
#

a hint

#

not formatted

little eagle
#

Β°_Β°

plucky beacon
#

that's it i'm making everything logged

#

gimme a min

little eagle
#

maybe you can hack something together with the current mouse position

plucky beacon
#

When launching a server without mods it feels like mach 3

little eagle
#

ACE adds like 15 seconds to game start.

plucky beacon
#
14:34:13 "trying to rotate B Alpha 1-2:1 REMOTE"
14:34:13 "Checking if the execution is local"
14:34:13 "B Alpha 1-2:1 REMOTE is local"
14:34:13 "Trying to rotate the direction to 175.854"
14:34:13 "B Alpha 1-2:1 REMOTE has attempted to be rotated"
14:34:13 "current direction is 175.854"
#

he just turns around again though

little eagle
#

try it with a vehicle?

plucky beacon
#

fkin great didn't add description.ext

#

REBOOT

#

works for vehicles but not turrets

#

it does a little spaz out before sitting in the right direction

#
14:49:30 "trying to rotate 4c9e8100# 31: offroad_01_unarmed_f.p3d REMOTE"
14:49:30 "Checking if the execution is local"
14:49:30 "4c9e8100# 31: offroad_01_unarmed_f.p3d REMOTE is local"
14:49:30 "Trying to rotate the direction to 53.0397"
14:49:30 "4c9e8100# 31: offroad_01_unarmed_f.p3d REMOTE has attempted to be rotated"
14:49:30 "current direction is 53.0397"
unreal siren
#

How would I go about replicating my colorcorrections for each client?

little eagle
#

"turrets"?

#

@plucky beacon
Can you try adding

[_x, getDir _x] remoteExec ["setFormDir", _x]

BEFORE the remoteExec setDir part?

plucky beacon
#

Use remote exec to a script Sturm

little eagle
#

don't forget the ;

#

"Sturm" who?

plucky beacon
#

Guy with yellow icon?

little eagle
#

derp

plucky beacon
#

Lol

unreal siren
#

Wait

dry egret
#

im going to need some help again lol

unreal siren
#

I need to stay off discord when I'm shy on sleep. I wanted to ask if the color corrections in the menu can be retrieved via script

#

And/or if the numbers are the same

little eagle
#

what menu, what "color correction"?

unreal siren
#

Contrast, Saturation, etcv

#

etc*

little eagle
#

Menus don't have color corrections.

unreal siren
#

Help, my brain is having a stronk

#

The post process color corrections that are available under options menu

little eagle
#

I don't think there is any way to read that setting, just like how it's impossible to retrieve or set the gamma setting.

dry egret
#

im having a hell of a time getting my Bis_fnc_spawnvehicle working correctly lol. Im spawning in a chopper in flight and im attempting to script the waypoints i need it to fly to

extractChopper_1 = [[getMarkerPos "extractionSpawn_1" select 0, getMarkerPos "extractionSpawn_1" select 1], 270, "B_Heli_Transport_03_F", Veh_1] call Bis_fnc_spawnvehicle;
Raider_1 = extractChopper_1 select 0;

//Extraction Waypoints
_wp = Veh_1 addWaypoint [position ab1, 0];
[Raider_1, 1] setWPPos getpos ab1;
_wp setWaypointType 'MOVE';
_wp setWaypointSpeed "limited";

#

chopper spawns in find but i cant seem to figure out why the waypoints not working since addWaypoint seems to be erroring about no group

little eagle
#

groupName addWaypoint [center, radius, index, name]

#

I guess Veh_1 is the helicopter?

dry egret
#

in the bis_fnc_spawnvehicle code Veh_1 is the part of the function that dictates side or group correct

#

or is it inside of (extractchopper_1 select 1)

little eagle
#

why is a GROUP named "veh" like "vehicle" though?

dry egret
#

its just something i called it to test with

little eagle
#

best would be to copy paste the error message from the RPT file.

dry egret
#

ok

#

Woot i figured it out

little eagle
#

It's a secret!

dry egret
#

lol

#

extractChopper_1 = [[getMarkerPos "extractionSpawn_1" select 0, getMarkerPos "extractionSpawn_1" select 1], 270, "B_Heli_Transport_03_F", WEST] call Bis_fnc_spawnvehicle;
Raider_1 = extractChopper_1 select 2;

//Extraction Waypoints
_wp = Raider_1 addWaypoint [position ab1, 0];
[Raider_1, 1] setWPPos getpos ab1;
_wp setWaypointType 'MOVE';
_wp setWaypointSpeed "limited";

#

apparently the WEST is to dictate the side or group

#

was reading it wrong on the wiki

#

in the array for extractChopper_1 =0 is the vehicle itself, = 1 is for the crew and = 2 is for the group as a whole

#

WOOOT i am learning this stuff lol

little eagle
#

could've just used group ( select 0) too

dry egret
#

lol

#

next step is to figure out how to do multiple choppers using 1 spawnvehicle call

#

extraction is kind of a pain since i dont know what players are still alive and what boat they took

#

16 player coop and 2 gun boats

#

they are choppered in via sling load at mission start but for extraction im going to attempt to do the reverse

#

have chopper come in a re-sling load them and carry them out

#

but if the boats are destroyed i have to make it flexable so they can land and extract that way

#

or rather backup extraction points

#

@little eagle you think it would be best to do one big nested if tree or just move into FSM?

little eagle
#

Dunno, but I know that some people use "mission flow" FSM's and it kinda makes sense to I guess.

dry egret
#

i think the larger issue that i have no idea on how to fix is getting the chopper to move directly above the boats

#

with waypoints their is always a room for error when setting them noted in the wiki

little eagle
#

Can't you attach the waypoint to the boat or something like that?

tacit mauve
#

HI

dry egret
#

ab1 in that code is the boats location for this test but when the chopper arives its still like 50m away lol

#

07

#

ill make another one to see if attach can get closer

#

if not, what i'll end up doing is transition to a cut scene to hide the possition differance and use a cut away to hide the hooking up to the boat

#

or rather cut scene from inside the chopper while its sitting still and spawn a new boat below each chopper and move the players to the new boat when off camera

#

this way i can show the sling load from a camera sequance

plush cargo
#

pretty sure you can only attach waypoints to vehicles/objects that are created in the editor

little eagle
#

Alternative Syntax
Syntax:
waypoint waypointAttachObject object
Parameters:
waypoint: Array - format Waypoint
object: Object - static object

#

dunno what "static" means

dry egret
#

means the waypoint will only work on static objects, as in not a vehicle moving

#

im working with it right now since players have to be in a moving boat

#

the way i think i may go about it, set up 2 triggers for exfil

#

one to kill power to the boat which will spawn in the extraction chopper

#

and one to set that choppers waypoint once the boat drops below speed to grab its current possition and set a new waypoint to that pos

weak obsidian
#

So attach the trigger to the boat then, once the chopper is in say 200m range you can kill the power

dry egret
#

but if the players keep moving away then the chopper will never catch up

#

as waypoints dont update with vehicles pos in motion

little eagle
#

what a game

dry egret
#

even attaching a trigger to a vehicle, the triggers possition is not updated so that will not work either

#

the only way i could think of getting the same effect as a roving trigger is to use a size 0, and set it condition to "distance Raider_1 < #

#

it would be nice if BIS had a special waypoint that would work for this. like have a checkbox for special state of attaching a waypoint to a moving vehicle and it will update its possition until the completion radius is triggered

plush cargo
#

you can run a loop that check pos of the boat deletes the helis waypoints and updates it with new ones

weak obsidian
#

Wait if you attach a trigger to a vehicle, it won't give it's current position when triggered?

dry egret
#

attaching a trigger to a vehicle does not update the triggers pos when the vehicle is moved

#

trigger attachTo [boat, [0,0,0]];

#

when the boat moves the triggers position does not

#

its activate field is still in its inital pos

#

im going to check to see if their is a CBA command that can do this

weak obsidian
#

Well then I guess you'll have to get the position of the vehicle every second or so and update the waypoint as was suggested, probably the easiest way.

plush cargo
#

you can get vectordir of the boat and use vector multiply to get a pos ahead of the boat and update the waypoint with that pos if it cant keep up

weak obsidian
#

I don't know how everything is set up - if I'd do something like that I'd probably kill the boat speed as soon as the helo has reached a certain WP and from then on give it a wp to the vehicle's last known position.

dry egret
#

im thinking the best way will be to kill the speed of the boat first and then grab possition

#

players wont be in harms way at this point

weak obsidian
#

Yeah can't let players mess up an epic exfil!

dry egret
#

lol

#

im just doing it in reverse for extraction

late gull
#

simple question, wich license i have to use for a script, only want to keep credits

#

and no monetize ofc

weak obsidian
#

"just doing it in reverse" ;-D

indigo snow
#

Write that in the header. "Free to use, no monetization, credit me if you use it"

dry egret
#

kinda walked into that one lol

late gull
#

@indigo snow is that enought? :p

indigo snow
#

sure

dry egret
#

@late gull whats the script do?

late gull
#

just a joke script, taru pods work
parachute the pod from taru

indigo snow
#

if you want to go formal it would probably be the MIT license plus the monetization

little eagle
#

OS / GPLv2 does not prevent monetisation.

#

Those licenses are pointless anyway, because there is no way to enforce them.

late gull
#

i know, but atleast the copy paster will know who creates the cript :p

little eagle
#

// by commy2

dry egret
#

lmao

late gull
#

hehe

little eagle
#

That's what I do

#

lol

plush cargo
#
/*
KOTH Gear Menu
Created for AFC
Author: Soolie
I don't remember how any of this works
*/
late gull
#

hahahaha great

dry egret
#

got another question

#

at the end of my mission their is a possability that the players will not have enough boats to extract everyone. What im thinking of doing is having a secondary extraction from an on land point if the boats get destroyed

#

was wonding what is the best way about doing multiple extraction points

plush cargo
#

depends on how your mission works i guess

dry egret
#

its a simi-open sandbox

#

you can go anyware but you have a single objective

#

and after its complete you have to extract

#

thing is due to the nature of the AI on the map i can not controle what they do

#

so if the boats are destroyed i have to extract via land

late gull
#

guys any documentation about runserver.bat or something like this?

weak obsidian
#

Do they have the boats from beginning to end ?

dry egret
#

players have boats that are slingloaded in at mission start, its how the insertion works

weak obsidian
#

You could make them indestructiable or give em the ability to repair, but what are you going to do when they beach the boats? It's the #1 problem with such missions

dry egret
#

but im trying to take into account of player dumbassery lol so if the boats are destroyed or if AI kill them. then their will be a fail safe extraction method

#

boats and be pushed off

weak obsidian
#

oh ok

little eagle
#

boats kaput = mission lost

dry egret
#

i guess my main concern is mission performance, so im trying to stay away from doing things like loops and massive ammounts of triggers lol

weak obsidian
#

Yeah - you can't accomodate for each and every evantuality

dry egret
#

oh no way am i doing that lmao

weak obsidian
#

Hand them a repair kit, give a TL or SL the ability to repair and tell them to pray to Joe Pesci that all goes well

dry egret
#

been working on trying to get a system so their are at least 3 fail safe backup extractions in most missions. If the LZ is too hot and cant be secured then fall back to secondary extraction

#

just need to figure out a propper controler so the system and decide on what to do without player input

#

im working on the assumption that players are too stupid to know how to use the radio menu lol

weak obsidian
#

Yes.

#

I'd drop all the failsafes, tell them to exfil at locaction X and when they arrive spawn the two boats all new and shiny so they can get out and ride into the sunset

#

(just guessing two boats)

#

For a misison that may be only played once and lasts 2-3 hours it's not worth it to make such an elaborate failsafe system imho

#

If I've learned anything is that the more realism and believable mission flow you want to put in, the more issues you have to work around, I try to keep it balanced

#

For example I had a hostage rescue mission and at the end it was scripted taht once the hostage is freed, he un-surrenders, goes to the extraction zone (without grouping), helo gets called, when helo is X m away smoke gets launched to mark LZ, helo lands, hostage walks up to helo, gets in, players board - all ride off into sunset

#

What it turned out to be was hostage un-surrenders, when helo lands he walks out, moveincargo, helo waits for 5 minutes (yes ... ) before taking off

#

Somehow there were issues with hostage and helo - the way AI enters a vehicle they need a certain space for their pathing and it just did not work if the helo did not land exactly in one position

#

So yeah - never trust players do to the smart thing and don't count on the AI either ^^

#

signing off for tonight πŸ˜ƒ hf

late gull
#

πŸŒƒ

#

not awesoame, but usefull with no mods

indigo snow
#

Cool stuff man!

late gull
#

ty, will add the rest of pods someday xD

dry egret
#

oh that thing

#

i was wondering what you were talking about lol

plush cargo
#

@late gull is english your second language?

late gull
#

yes, not second i just try xD

plush cargo
#

Not too bad πŸ˜ƒ I play a lot with austrians and germans, always rewriting stuff for them and their servers

#
This is a simple Taru pod management system

Included is a Stratis test mission for understanding how it works
You need to precompile the functions and add them to the vehicle(Taru)
No further explanation needed
Media https://youtu.be/yT8hIKDQUgk

To Do
Add support for other pods
Add support for other Taru's
Delete the pod after some time (maybe)
late gull
#

my language is Spanish

#

πŸ˜„

plush cargo
#

Im a chef in NYC, everyone here speaks spanish

late gull
#

haha thats nice

dry egret
#

back again lol

#

having some issue with camera system

#

i can create cameras just fine but im having an issue with one of my shots

#

_car = RaiderChopper_1;
_cameraExit = "camera" camCreate [0,0,1000];
showCinemaBorder true;

//Opening shot from inside the cockpit
_cameraExit AttachTo [_car,[0,6,-0.5]];
_cameraExit cameraEffect ["External", "LEFT TOP"];
sleep 15;

//;comment "wide shot of chopper";
_cameraExit camSetPos [7527.845,3622.061];
_cameraExit camSetTarget _car;
_cameraExit cameraEffect ["External", "LEFT TOP"];
_cameraExit camPrepareTarget _car;
_cameraExit CamCommit 5;
waitUntil {camCommitted _cameraExit};

#

for the wide shot i want to switch to a camera outside the chopper but have it looking back at the chopper

plush cargo
#

whats happening exactly

dry egret
#

iv been trying to set the cameras possition to a object and have it face another object

#

arma is just not liking me today lol

#

whats happening is i create the camera just fine

#

its attached to the chopper just like i want

#

but i want to change possition to a wide shot from a distance after a few seconds

#

in the new shot i want the new camera position to be facing the chopper from its new position

#

it should work like im doing but its not

#

the camera just sticks inside of the chopper at 000

#

i think bis either broke the camera system or they changed how it works and did not make the changes on the wiki

plush cargo
#

if you use campreparetarget you want to use camcommitprepared

dry egret
#

ahh ok

#

i figured out what was going on

#

in one of the last updates bis must have changed the camera system

#

before when you attached a camera to an object and wanted to move to another possiton you could do so by setpos

#

but now you can not do that

plush cargo
#

ahhh

dry egret
#

you have to detach the camera now were as before you didnt have to

#

you can move from objec to object via attach to without detaching but your locked into view i think

#

i will play around with it some more to see what i can make of it lol

#

due to the nature of what im doing using a scrip system like alias easy cutscene system will not work for me.

#

but it should make for some great exit sequence now

#

now to figure out how the hell BIS had those vertical rolling credits at the end of the campaign lol

#

i dont think they used a video file for it.

dry egret
#

anyone know how to lower the sound in a created camera?

#

fadesound does not seem to work

#

looking to lower the engine sounds from the chopper

meager granite
#

fadeSound works with any camera, you're doing something wrong

dry egret
#

CutText ["","Black in", 3];
_car = RaiderChopper_1;
_cameraExit = "camera" camCreate [0,0,1000];
1 fadeSound 0;
showCinemaBorder true;

#

i still get sound

#

even just doing fadeSound from the debug consol does not work

#

nvm i think i might have solved it

#

problem with ace mod

#

got to disable the hearing for this seq

rugged basalt
#

hello

#

little question

#

do I need to check if isServer everytime when script is spawning some units or other players than server are automatically ignored?

#

are triggers even called on multiplayer players other than server?

still forum
#

triggers's code is executed on every client & the server

#

so you need the isServer check if you want something to only exec on the Server

rugged basalt
#

I wonder what happens when the other guy receives spawn script

#

it sends to server request to spawn as many times as players received command?

#

or some units spawn on the local scope of other players and other players can't see them

indigo snow
#

Every connected client would execute the code and spawn units

#

Unless you do special stuff with createVehicleLocal theyre there for every client

rugged basalt
#

so If i would have 5 players

#

then units will spawn 5 times and will be seen on every computer?

#

hmmm maybe that's why I got red army size enemies group last time I played with a friend lol

meager granite
#

createUnit is global command, no matter where you execute it, all clients will get the units

rugged basalt
#

okay thanks

tough abyss
#

a question to SimpleObjects, is there any safety problem with spawning simple objects locally or why is this command global only? If there is any opportunity to spawn them locally, let me know either πŸ˜„

nocturne iron
#

what usage are you envisioning?

tough abyss
#

just simply spawn a SO locally, so other players don't see them. Just like createVehicleLocal

nocturne iron
#

yeah

kindred lichen
#

Hey man, does anyone know if it's possible to mount an infantry weapon onto a vehicle?

#

Like make the crew served weapon something normally held by infantry?

little eagle
#

Not without editing the models.

kindred lichen
#

Not too concerned about what it looks like.

#

I know I switch to different vehicle weapons.

#

we have a flamethrower in our mod pack, and want to mount it to a m113.

little eagle
#

A crew served weapon is not the same as a "infantry weapon" which would mean rifle/handgun/launcher in the context of Arma, no?

#

That will only work with crew served weapons / "turrets" though.

#

And even then it has a lot of problems.