#arma3_scripting

1 messages Β· Page 319 of 1

thick sage
#

(to confirm, the example you gave has no errors)

#

but [] call { _x } count [1] + [2]; has a warning: "Local variable "_x" is not from this scope (not private)"

#

(evaluation is done from left to right when both operators have the same precedence)

#

in any case, I am always looking for people to find errors in the parser. So, if you are able to find one, please let me know!

#

[] call ({ _x } count [1] + [2]); gives an error since call only accepts code in rhs (and count returns a number)

rotund cypress
#

Hey guys, can someone see what I'm doing wrong here? I've been sitting here pulling my eyes out. https://hastebin.com/asagadoceb.scala

Basically, ControlGroups Loadouts are showing correctly, although not at correct position (It's shoing upper left corner) and ControlGroups ListVehicles is not showing at all. I kinda have an idea as to why the first controlsgroup is weird, but it seems weird listvehicles group is not showing at all.. 😭

halcyon crypt
#

maybe use some sensible idcs instead of the huge numbers πŸ˜›

#

also idcs don't need to be unique since they're local to the display idd

#

and ListVehicles is inside the Loadouts class

#

it should probably be outside of it

little eagle
#

1212312312313123123123123 is definitely too huge for an idc. SQF numbers are all single floating point numbers and that number cannot be represented accurately.

rotund cypress
#

That is not the problem though, as it was the same when they were -1 or 1, 2, 3, 4 etc @little eagle

vapid frigate
#

i don't think the structure is right

rotund cypress
#

Hmm

vapid frigate
#
    class Controls {
        class Loadouts: GW_RscControlsGroupNoScrollbars {
            class Controls {
           
            };
            class ListVehicles: GW_RscControlsGroupNoScrollbars {
                class Controls {
                    class Background: GW_RscText {```
#

ListVehicles needs to be in a Controls { }

rotund cypress
#

Ye I know that, it must be a mistake from the version I uploaded

#

One sec

#

Updated version with the same problem

vapid frigate
#

same with that one

#

ListVehicles is just in Loadouts

#

not in Controls

rotund cypress
#

No its not

#

Must be something on your end that is messing it up πŸ€”

vapid frigate
#

if you delete the controls you have this:

    class Controls {
        class Loadouts: GW_RscControlsGroupNoScrollbars {
            class Controls {

            };
            class ListVehicles: GW_RscControlsGroupNoScrollbars {
                class Controls {

                };
            };
        };
    };
};```
rotund cypress
#

Now I see what you mean xD

#

Okey, so now I have this

#

Problem still persists however

vapid frigate
#

yeh i don't see any other issue, should be 2 controls sorta on top of eachother

#

it's not because u just can't see the one behind?

rotund cypress
#

Basically the loadouts group shows left top side of screen, should be in middle. The listvehicles group doesn't show at all

vapid frigate
#

safeZoneX, safeZoneY is the top left

rotund cypress
#

I don't want the controlsGroup to position anything, that is why i set it to full screen

#

or safeZoneX, SafeZoneY, safezoneW, safezoneH

vapid frigate
#

yeh fair enough, can't see what would be wrong though

#

looks like it would all be on the left side fo the screen.. but sorta hard to tell exactly

rotund cypress
#

That is how it looks like

vapid frigate
#

yeah i don't know sorry, doesn't look like what i would have thought from that code

#

shouldn't be anything visible at safezonex, safezoney

#

i assume you don't have any safezonex/y macros

rotund cypress
#

No I don't 😦

delicate lotus
#

is the a script command which loads a mission?

vapid frigate
halcyon crypt
#

@rotund cypress did you try my suggestion? Pretty sure ListVehicles needs to be a child of GW_SandBox_RscDisplayDynamicLoadouts::Controls

rotund cypress
#

oh sorry, didn't notice your answer hehe

#

I was pretty sure it was, I'll have a look

#

The things you mentioned I am aware of, I just put a bunch of jibberish IDCs for testing purposes.

#

As for in needs to be inside controls, it is

#

Otherwise it would give me a plethora of errors

#

I can't understand what the problem is, at this point I am literally pulling out my eyeballs πŸ˜„

halcyon crypt
#

you might have to position Loadouts instead because the children of Loadouts are positioned relative due to the ControlsGroup thing

#

IIRC

vapid frigate
#

ah yeah that's right..

#

either that or you have to remove +safezoneX from all the controls

#

0,0 = top left for your controls

#

not safezonex, safezoney

rotund cypress
#

ah so basically remove just the safezone and keep everything else?

#

and have safezone as I have on parent ctrl?

vapid frigate
#

remove the +safezoneX and +safezoneYs

#

leave it for the 'root' controls (loadouts/listvehicles)

rotund cypress
#

ye alright ill try that

vapid frigate
#

i think it's a coincidence that it moves to the top left because your controls start at 0,0 in 'screen space'

#

which is in the middle of the screen in that 800x600 box

rancid ruin
#

@delicate lotus there are these commands playMission playScriptedMission hostMission and i think there's a load of commands related to singleplayer campaigns, but i've no experience with any of these.

little eagle
#

playMission is used in the main menu to open the Arsenal mission

#

So you could add a button to the main menu and use playMission inside the onButtonClick event to start some kind of mission put into an addon.

rancid ruin
#

that's only good for single player missions though right? you still can't make a button that says "connect to ip x.x.x.x.x.x" ?

little eagle
#

SP only from what I can tell and from how it's used.

tough abyss
#

if you have six octets in an IP address I think you're having some very serious issues to begin with. πŸ˜›

delicate lotus
#

xD

little eagle
#

48

rotund cypress
#

Works great, thanks! You made me not have to pull my eyeballs out. πŸ˜› @vapid frigate @halcyon crypt Cheers guys!

halcyon crypt
#

πŸ˜ƒ

warm thorn
#

Is there a list or a way to get all predefined variants of all dynamicLoadOut vehicles? I mean the presets like CAS or AT, Heavy AT that can be selected in the Editor. Like "variant_buzzardCAS" or "variant_buzzardAA"

plucky beacon
#

I tried changing the side of the new Sentinel UAV to EAST but it didn't work. Is there a way by script to do this?

tough abyss
#

Does anyone have an example of 'setPylonLoadout'?

#

i don't know who wrote in the parameters for it but

#

To put it bluntly, the page isn't well-written

still forum
#

The page is written using the documentation I had.. Which was everything that is in the Game.

tough abyss
#

ah

#

it's really wonky

still forum
#

For better Documentation we need a dev to add it. Without me there probably wouldn't even be any wiki page about that command

tough abyss
#

Are there any examples floating around yet?

still forum
#

Haven't seen any

tough abyss
#

I want to have a wipeout with 13 GAU-8s is what i'm getting at

still forum
#

There is a new Loadout wiki page that explains some stuff.. Don't have link right now

tough abyss
#

ty

#

Awesome, thanks.

subtle ore
#

Wait a sec. So they did get dynamic loadouts into stable now?

tough abyss
#

Does it work with anything in CfgMagazines or just things prefaced with pylons @tough abyss

#

@subtle ore yes

subtle ore
#

Shouldn't there be a seperate class for dynamic loadout variants of planes? I'm not seeing any for the wipeout?

subtle ore
#

Wow well that was confusing, since in the dev branch it was labeled (Dynamic Loadout) in the editor listings

native hemlock
#

Yeah, I guess since they made the dynamic loadout variant the only one available in the editor, they thought having "(Dynamic Loadout)" was unnecessary. If you hover over one of the planes/helicopters in the editor, you will see the classname has dynamicloadout in it

subtle ore
#

Yep yep, I see it.

subtle ore
#

Can I get some second pair of eyes on this? Didn't get much sleep lol. (getArray(configFile >> "CfgWorlds" >> worldName >> "centerPos")) nearRoads (getNumber(configFile >> "CfgWorlds" >> worldName >> "mapSize"));

#

"Error: zero elements provided, 3 expected"

#

sigh nevermind. For those who didn't see it either. centerPos should be centerPosition since the position has 3 int entries in the array.

rancid ruin
#

centerPosition in the config isn't necessarily the actual center of the map

#

you're best off using mapSize / 2 @subtle ore

#

sorry, worldSize

subtle ore
#

@rancid ruin I'm not too worried about accuracy in this case

rancid ruin
#

alright

#

i'm not sure you can even rely on it being in a map's cfg though so maybe worth bearing that in mind

ocean veldt
#

@subtle ore

_worldSize = worldSize/2;
_allRoads = [_worldSize,_worldSize] nearRoads _worldSize;
subtle ore
#

I understand the usefulness of worldsize now and it has been posted twice now. I was looking to quickly test something, no more.

#

@rancid ruin I don't rely soley on a map's cfg. It is however, nto a hit or miss.

warm gorge
#

Is the only way to override BIS functions through mods?

thick sage
#

why would you want to override BIS functions?

split coral
#

What happens if you try to override it in a mission?

warm gorge
#

I just wanted to know if its possible without mods because I saw someone do it with a mod to try and change the isDebugConsoleAllowed function

#

I tried doing it in a mission but didnt work very well

split coral
#

not very well, but it did work a bit?

warm gorge
#

I cant even remember what error I got, ill have to try it again to see

split coral
#

Many bi functions use other files than just that single sqf. Maybe you were missing something

#

What's the isDebugConsoleAllowed function by the way? I can't seem to find anything like that.

warm gorge
#

@split coral Its a BIS function used by the debug console which runs a few checks whether a player can use the debug console or not

#

Any idea why this is not working? How do you override them? @tough abyss

class BIS_Override {
    tag = "BIS";

    class Debug
    {
        file = "core\";
        class isDebugConsoleAllowed {};
    };
};
#

Well thats pretty much what I just did above, but it doesnt work, no errors

#

@tough abyss Are you able to give me an example CfgFunctions for it? Cause ive tried doing it how you said and the example above, no errors, it just doesnt override the function and uses the original

#

Aight when you can, just @ tag me in ill be on for a while

warm gorge
#

Ill give it a go doing it like that. Hopefully it will work in a vanilla mission (non-modded). Ill let you know how I go shortly

#

@Quiksiler Ah yeah fuck wont work on a vanilla mission then, oh well, I guess ill just have to make a custom debug console lol

warm gorge
#

Whats different from a RscListNBox over a RscListBox? I cant even tell the difference

warm gorge
#

I seem to be having trouble with the GUI Editor, when I position everything in a menu in the editor, export it, and make it into a proper menu, the positions are all off and different from the GUI editor. Any ideas why this is happening?

#

This is through using GUI_GRID btw

warm gorge
#

Ah yep, I see cheers

#

Now im just unsure of why im having issues with this GUI_GRID shit. I dont know if I should just use safeZone instead

delicate lotus
#

I want to show some values on a players screen. how can I do that in a good looking way? (Like Altis life does it with the bar at the bottom)

warm gorge
#

So would I be better off using safeZones for menu creation or GUI_GRID?

vivid locust
#

@warm gorge That's personal choice to be honst. I always prefer safezone as I am using this for years now. But there are some difficulties if you want to use them aswell. If you change the sizeEx (text size) for example, this is still saved in GUI_GRID format.

#

Maybe I should add that I am an A2 guy and GUI_GRID is not even working there :D

warm gorge
#

@vivid locust Yeah safezones seem to be working better with larger menus. But was just curious what most people use nowadays

#

Bit confusing how GUI grids work, im not sure if theres any disadvantage over using safe zones for example

vivid locust
#

GUI_GRID does not use pixel accurate coordinates like the safezone does. This is affected by interface size so the user has the ability to scale this on the screen.

#

I think the most easy way to understand that is an example. So let's say you make a player menu with safezones. When users use a different resolution and interface size than you, the menu should still look the same. When using gui grid, it gets stretched to the other format. Like when you create it on a 16:9 screen it will have more height when using a 16:10 screen while with safezone it will have the same height.

warm gorge
#

Do you reckon that might become an issue though? For people with smaller monitors for example for menus using safe zone. I dont want it to get wacky on different screen sizes

vivid locust
#

When I say that it stays the same size that doesn't mean that it will overlap the borders of a smaller screen when filling up a whole 16:9 screen. It's scaled down aswell but while GUI_GRID stretches the menu, safezone will keep it in the same proportion. As I said, never used something else than safezone and never had problems with it.

jade abyss
#

imho: safeZone = πŸ‘

warm gorge
#

Alright cheers for the advice boys, ill probs just use safe zone to avoid the issues im having with gui_grid

jade abyss
#

Safes you from Headaches.

little eagle
#

Neither safezone nor GUI_GrID are pixel accurate and why would you even care if they are?

#

🀦

#

And even if GUI_GRID doesn't exist in A2, you could easily copy paste the like 8 lines to define them.

vapid frigate
#

you could use it with pixel accuracy when combined with getResolution, but yeah not sure why you'd want to

warm gorge
#

Im not too concerned about pixel accuracy, just as long as it works for all different sized menus (I know GUI_GRID is limited) and doesn't have any major flaws

jade abyss
#

You are talking about the InterfaceSize, right?

tough abyss
#

Hello, i've got a question, what code line have to to put in the sentinelle to have the wings folded??

still forum
little eagle
#

Depends on how deep you nest the sub turrets.

still forum
#

So.. there is no real limit?

little eagle
#

No, but since even 1 nested turrets are partially broken, stuff probably no longer works after a few layers

#

e.g. commander smoke or [0,1] turret reloading and then firing causing the gunner weapon selection to break

tough abyss
#

Ehu, did some one know a complete tutorial to learn sqf??

plucky beacon
#

complete is a strong word

worthy spade
#

Can I change the livery of a vehicle by script? I want the Gryphon to be gray.

brazen sparrow
#

looking for some help with eular/quaternions/ direction -> rotation conversions. Please PM me ❀

still forum
#

runs away

brazen sparrow
#

the problem im trying to, im 100% many people will find it helpful :P
scripting a way add objects into EDEN but be able to turn the vectorDir/vectorUp into EDEN rotation. Im sure others have wanted to stick "boxes" into EDEN and turn them up-side down...

#

or add old "sqf added" map content into an eden mission

#

and then edit it

#

i need to find someone who has done this shit at uni or something lol

indigo snow
#

its degrees of rotation about the separate XYZ axes right?

brazen sparrow
#

the only actual info i have (from an "inside" source) is this:
"Local rotation in degrees. X is pitch, Y is roll and Z is yaw.
Euler as X>Z>Y CCW RH"

indigo snow
#

thats what i can tell you at least

#

you can also execute this in your 3DEN debug console

#
removeMissionEventHandler ["Draw3D",missionNamespace getVariable ["drawHandler",-1]];
drawHandler = addMissionEventHandler ["Draw3D", {
    {
        comment "LINES";
        drawLine3D [_x modelToWorld [0,0,0], _x modelToWorld (vectorDir _x), [0,1,0,1]];
        drawLine3D [_x modelToWorld [0,0,0], _x modelToWorld (vectorUp _x), [0,0,1,1]];
        drawLine3D [_x modelToWorld [0,0,0], _x modelToWorld vectorNormalized((vectorDir _x) vectorCrossProduct (vectorUp _x)), [1,0,0,1]];


    } forEach (all3DENEntities select 0);

}];
#

and itll draw the rotated axes

#

apparently also N = vectorNormalized(Z vectorCrossproduct [0,0,1])

native hemlock
#

No quaternions? πŸ˜›

indigo snow
#

quaternions, of course, are satanic constructs

native hemlock
#

I faintly remember some mention of using quaternions for Eden, but that might just be in the engine

indigo snow
#

really anything that involves 3D graphics uses them in the background

#

physics that study rotations too

#

You can find alpha, beta and gamma using the wiki and those XYZ vectors but i havent checked if theyre the same as the 3den rotation values

native hemlock
#

Found what I was thinking of
https://youtu.be/TlOOrIJHSXo?t=3m24s

One of the more significant technological challenges was the object rotation. This was mainly because the engine uses matrices and quaternions to represent rotation, while the user needs to be able to set every object in an angle.
rancid ruin
#

if you want to see quaternions causing a lot of pain, just google "unity + quaternion"

indigo snow
#

I just await a MATRIX type in sqf

#

I expect to be waiting for a while... :P

brazen sparrow
#

ive tried using both quaternions and direction cosine matrix's. i just dont seem to be able to get consistent results

rotund cypress
#

@vivid locust SizeEx problems can be solved with multiplying it by safezoneH. @warm gorge I would suggest safezones since that is the easiest to get it to work on all different resolutions.

However, pixelGrid has been introduced a while back and that honestly seems like a better option than safezones. I still use safezones though.

#

Would be nice however if Bohemia adds PixelGrid to GUI Editor.

vivid locust
#

@rotund cypress Havn't had any issues with sizeex yet, why are you saying hat

rotund cypress
#

I was referring to If you change the sizeEx (text size) for example, this is still saved in GUI_GRID format.

#

GUI_Grid would mean it's not accurate over different resolutions, however this can be solved with multiplying by safezoneH

#

And if pixel accuracy is wanted, as @little eagle said, safezone or GUI_grid is not it. PixelGrid is however.

grizzled spindle
#

Does anyone know where i can find the functions for: BIS_fnc_EGSpectator?

little eagle
#

GUI_GRID is just as accurate over different resolutions as safezone is. 😐

vivid locust
#

@rotund cypress That's not a solution. Let me give you an example. If you use the GUI editor in arma 3 and you enter 1.5 for the sizeEx in the editor, then the dialog class will look like sizeEx = 1.5 * GUI_GRID;
You can't just replace * GUI_GRID with * safezoneH, as 1 is already the whole screen so 1.5*safezoneH is already one and a half of your screen and way bigger than you wanted it. I calculated the value to convert GUI_GRID to safezone and that's how I am doing it.

rotund cypress
#

Well that needs getResolution I think @little eagle

little eagle
#

GUI GRID needs as much getResolution as safezone does

rotund cypress
#

I wasnt talking about GUI editor @vivid locust

#

Hmm okey

native hemlock
#
getVectorDirAndUpFromAngles = {
    params ["_x", "_y", "_z"];
    _vectorDir_x = cos (_y) * sin (_z);
    _vectorDir_y = (sin (_x) * sin (_y) * sin (_z)) + (cos (_x) * cos (_z));
    _vectorDir_z = (cos (_x) * sin (_y) * sin (_z)) - (sin (_x) * cos (_z));

    _vectorUp_x = -sin (_y);
    _vectorUp_y = sin (_x) * cos (_y);
    _vectorUp_z = cos (_x) * cos (_y);
    [[_vectorDir_x, _vectorDir_y, _vectorDir_z], [_vectorUp_x, _vectorUp_y, _vectorUp_z]]
};
_dirAndUp = [0, 21, 42] call getVectorDirAndUpFromAngles;

@brazen sparrow The code posted above should work for X, Y, and Z rotation from Eden converted to the format for setVectorDirAndUp. I think you want to go from setVectorDirAndUp to Eden rotation, but it's a little too late in the night for me to solve for those terms

warm gorge
#

@rotund cypress @little eagle The only reason I wanted to know if safezone was a decent option over GUI_GRID is because I was having issues with GUI_GRID and the GUI editor positioning being all messed up when I turn the exported dialog into a proper dialog

queen cargo
#

@warm gorge you might want to test ArmA-UI-Editor if it is a new ui
Could be useful

rotund cypress
#

This a new thing? @queen cargo

queen cargo
#

nope

#

pretty old, outdated kinda (as i stopped working on it in favor of ArmA.Studio)

rotund cypress
#

Oh is that the Windows client? @queen cargo

rotund cypress
#

Ah yes, actually used that a while back, but never got into it.

delicate lotus
#

I have a question about scripting: Is there a way to detect if the player is still in a loading screen?

#

because I want to have a intro in my mission but the intro should only start if youre not longer in the loading screen

#

Also the mission is a MP Mission

rotund cypress
#

waitUntil {isNull (findDisplay 46)} @delicate lotus

delicate lotus
#

okay

#

A long time ago I found a BIS function whhich could detect that too

#

but I forgot its name

#

I hope that will work the same ^^

rotund cypress
#

Why use a function when you can just do that? πŸ€”

delicate lotus
#

I will use that

#

but I still cant get searching for that function out of my mind ^^

rotund cypress
#

I'm not sure I follow

delicate lotus
#

well I know there is a BIS function which does the same but I cant remember its name. And that is really bugging me for some reason

rotund cypress
#

πŸ‘

delicate lotus
#

@rotund cypress I used the code you gave me and its working but apprently there is a second loading screen after the first one?

#

or atleast is not working right

#

I still see the loading screen

#

like I see the loading screen, it finishes, reopens and plays the intro music

#

but display 46 is objNull

rotund cypress
#

Intro music must be something in your mission

#

There is only one mission loading screen in arma

#

Which shows the mission splash image as well

delicate lotus
#

well its not the intro

#

its the loading screen

#

in my game its still there will its not existing

vapid frigate
#

display 46 is the game ui, so wouldn't u want to waitUntil { !isNull ?

delicate lotus
#

wow thank you

#

I think that was the function im searching for all days

#

holy duck

#

it works

#

@vapid frigate thank you very much ^^ ^^ ^^

vapid frigate
#

np

#

i learned it from Sa-Matra in here.. found it from the search history from last time i asked

delicate lotus
#

okay

#

I always searched for "load" in the Community wiki. Bad thing it only shows things starting with "load" :/

rotund cypress
#

Haha, what I meant πŸ˜„ πŸ˜‚ @delicate lotus

#

Just a bit of brain freeze πŸ˜‰

delicate lotus
#

K

hoary sentinel
#

Hey folks, may you can help me out. I use Eden editor and ItΒ΄s MP testmode to test with some friends jets and stuff. Is there a way to bring a server sided earplugs script into this Ad-hoc like Server?

indigo snow
#

your client is the server

leaden plover
#

i have a question regarding the "Jets_Officerspilling" animation. how do i give the NPC a cup to drink at? unless its automatically given a cup now that its released? tried it the last time on dev-branch but the NPC just does the animation without a cup on his hand

jade abyss
#

Tweaked: Precision of the intersectWithGround command was improved
intersectWithGround <- ???

vapid frigate
#

does pretty much what it says?

jade abyss
#

Mr. Smartass, have you seen the command in the wiki?

vapid frigate
#

i thought it was, i've used it

jade abyss
#

lineIntersectSurface maybe

vapid frigate
#

oh ok

#

or terrainIntersect

jade abyss
#

No clue, i just never heard of the intersectWithGround before.

vapid frigate
#

i guess they need a patch for the patch notes

warm gorge
#

Yeah ive never seen that command before either

delicate lotus
#

Is addMissionEventHandler global or local?

jade abyss
#

local

delicate lotus
#

so if I add the event only on the server side, things like incrementing a value would be local too right?

jade abyss
#

yep

tough abyss
#

There's no intersectWithGround on the wiki.

delicate lotus
#

okay

jade abyss
#

Thats the point, Neviothr.

tough abyss
#

Any clue what that is, <@&105622502444711936>?

still forum
#

intersectWithGround doesn't exist.

#

Not on the Wiki not in the Game.. To me that sounds like terrainIntersects

#

maybe intersectWithGround is their internal function name

#

Nope.. intersectWithGround is a internal engine function. For example used for screenToWorld and a lot of collision stuff

jade abyss
#

good to know.

delicate lotus
#

is there a way to get the name of a vehicle? Like from a blackfoot the name blackfoot?

indigo snow
#

getText(configFile >> "cfgVehicles" >> typeOf _myVehicle >> displayName")";

delicate lotus
#

thanks ^^

brazen sparrow
#

is anyone interested in a tool to remove required addons in a eden mission.sqm (unbinned)?

delicate lotus
#

well... couldnt you just remove it on your own using notepad++?

brazen sparrow
#

u tried doing that when you have like 50 requirements πŸ˜›

delicate lotus
#

not really

#

and thats the point where such a tool is handy

#

are you going to upload it to armaholic or something?

brazen sparrow
#

i dunno, if people thought it was useful ye, if not then i wasnt going to bother

delicate lotus
#

well it is useful

rotund cypress
#

Hey guys, I have overwritten the key for interrupt menu and made my own. I now want to add Video Options and Audio Options to it, however using createDialog "RscDisplayOptionsVideo" and createDialog "RscDisplayOptionsAudio" it is not loading the script for it properly. Anyone who have a way I can circumvent this?

warm gorge
#

@brazen sparrow Yeah I wouldnt mind having a tool like that

brazen sparrow
#

ill get it up on github, not going to lie, wrote it fast so, there may be bugs. It creates a backup so :D
its a nodejs thing but i will add an exe version along with it

#

prob later tonight

#

ive tested with rediculasly large mission so fingers crossed lol

warm gorge
#

Sounds good

waxen tide
#

how do i call a script every 10 +/- 1 minutes with little performance impact?

warm gorge
#

Through a loop with suspension using sleep

#
while {true} do {
    //
    //Do stuff
    //
    
    sleep 60; //Sleep for 1 minute
};
jade abyss
#

*uisleep

warm gorge
#

Or through uiSleep πŸ˜‰ Im still in a habbit of using sleep, slowing starting to use uiSleep more often

queen cargo
#

@warm gorge sleep is actually the way to go unless it is a "time critical" task for eg. user interfaces. then you should use uiSleep as it provides more precision then sleep does.
for pretty much all tasks ohowever, sleep is enough

still forum
#

@warm gorge Make a list of missing functions. And post it in #community_wiki

#

I already said that before.. People say "There is lots of stuff missing" but no one says what is missing. How should the guys doing the Wiki know what they need to add?

warm gorge
#

@still forum It would be painful to list every single function that is missing when someone could easily just run BIS_fnc_exportFunctionsToWiki and load the contents on the Wiki. Much easier than individually identifying whats missing. Theres too many for that.

waxen tide
#

@warm gorge Thanks, thats how i'm doing it, i was just concerned i was wasting perf after reading lots of alternative methods.

warm gorge
#

Nah there's nothing wrong with doing it that way

still forum
#

@warm gorge give me atleast one example of a missing function please. And also this talk belongs into #community_wiki

jade abyss
#

intersectWithGround πŸ˜„

#

(j/k)

still forum
#

As I said not a command

#

and even less a function

still forum
#

Commands != functions @jade abyss

jade abyss
#

you are boring

brazen sparrow
warm gorge
#

@still forum All of the EG spectate functions, BIS_fnc_getIntersectionsUnderCursor, BIS_fnc_enginesOn, BIS_fnc_enginesOff, BIS_fnc_radioMusicNext, BIS_fnc_radioMusicOff, BIS_fnc_ambientShips, BIS_fnc_findAllNestedElements, BIS_fnc_advHintFormat. < Just a few examples

#

I havent gone through every single missing function, but there are definitely a few.

still forum
#

Thx. So it's definetly data missing and not that page being cached to a old version

warm gorge
#

Yeah. I do remember bringing this up a few weeks ago, I think Dwarden said something like there was going to be a wiki update soon, but I cant confirm

delicate lotus
#

Can I use sleep in OnPlayerRespawn?

stable vault
#

Hey fellas

#

Iim getting so mad with this. Cant find the answer online at all. And i've searched for hours. I have an addaction Teleport script, that works fine until, either caching or respawn takes place in MP. Then it stops working, WHY?... I presume to be the fact that I do not have any event handlers. Or publicVaribles? Is this the cause of such a thing?
Clint/Server not synced?
// name your MHQ or forward deployment vehicle something you want showing up in the player messages
/* just add the following line into your teleporter (flag pole) init
this addAction ["Move to USS Freedom", "teleportMHQ.sqf", USS]; this addAction ["Move to APX HQ", "teleportMHQ.sqf", HQ];
** just remember to name the vehicles you want to telport to MHQ1 MHQ2 ect...
*/
//Place below in flagpole
// this AddAction ["<t color=""#FFED21"">" +"Move to USS Freedom", "teleportUSSFreedom.sqf", respawn_west_2];

_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["APX ELITE PILOT's Requires JETS DLC...","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];
^^^ WORKS FINE...untl the game somehow Changes its varible name or something?
it stops working?
10 minutes into the game. the addaction at the flagpole fails...and cant find the "OBJECT" anymore?

brazen sparrow
#

if (canSuspend) then {sleep 10}; πŸ˜„

little eagle
#

Objects don't lose their variable name when a player respawns.

stable vault
#

to rephrase my cut n paste error: WHY would an addaction (a teleport script) <Using a vehicle [MoveInCargo]> all of a sudden stop working in a MP dedictaed environment? 5 to 10 minutes into the game. When its never destroyed?

#

Script =

#

_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["APX ELITE PILOT's Requires JETS DLC...","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];

#

this allowDamage false; this AddAction ["<t color=""#FFED21"">" +"APX ELITE PILOTS: Move to USS Freedom", "teleportUSSFreedom.sqf", USS];

#

USS is variable name of the vehicle

#

Do certain conditions in MP cause things to get renamed somehow?

delicate lotus
#

@little eagle so if I have a addaction on a player, and that player respawns, has it still the addAction?

little eagle
#

No, iirc. They don't carry over to the respawned entity unlike eventhandlers iirc.

#

But this is about an action added to a vehicle.

#

Do certain conditions in MP cause things to get renamed somehow?
No

delicate lotus
#
_unit reveal mob;
_unit assignAsCargo mob;
_unit moveInCargo mob;

_unit allowDamage false;
sleep 10;
_unit allowDamage true;
_unit addAction ["Refuel - Rearm - Repair (2500$)","refuelrearm.sqf",nil,6,false,true,"","cash>=2500 and (vehicle player) != player",-1];
#

will this add the action again? (its written in OnPlayerRespawn)

stable vault
#

further how'd u paste ur code into that textbox ?

#

in discord?

#

mine just shows up as text

little eagle
#

```sqf
code here
```

coarse dagger
#

hi what dose worldId mean ?

stable vault
#

World ID?

little eagle
#

Altis, Stratis, VR
?

coarse dagger
stable vault
#

so like an example of my problem commy2: When u assign an insignia to a unit....and the unit respawns (via your own custom .paa) the patch is gone

#

even though its defined in description.ext

#

cfg

#

_setUnitInsignia

#

call BIS_function__setUnitInsignia

coarse dagger
#

? is that for me lol

stable vault
#

^not typed right but u get the idea

coarse dagger
#

if that is for worldId i have no idea

stable vault
#

no

#

for commy

coarse dagger
#

kk

stable vault
#

@little eagle ???

#

^

little eagle
#

Yeah, insignia don't carry over to a respawned unit, because the whole insignia system is build on retexturing. And respawned units don't keep their textures.

#

Unless they added a work around for that. I never use insignia.

#

Don't think so.

open tendon
#

So I just noticed testing locally, if a unit has enablesimulation false and dies, the corpsemanager does not delete the unit from array alldead. after doing enablesimulation true on the corpse it does sink the bodies underground but still not deleted from array alldead.

#

I wonder how this would behave on dedicated server...

magic hamlet
#

how do i get the carrier to resupply my jet/planes when they land on it

hallow spear
#

is there a way to add additional custom edits to menu when you double click an object in Eden editor? Object: type, Object: init, etc.

indigo snow
#

very much yes

hallow spear
#

awesome ty. always tough for me to put thoughts to word for searching. much appreciated

delicate lotus
#
    if({group _x side == east} count allUnits < (count allPlayers*10)) then {
        _bool = true;
    } else {
        _bool = false;
    };
#

will this work?

hallow spear
#

i just ran it and got "generic error"

still forum
#

_bool = ({side group _x == east} count allUnits < (count allPlayers*10))

little eagle
#

side group _x == east

#

not

#

group _x side == east

native hemlock
#

Has anyone tried drawing icons/hooking into the GPS or custom info minimap since 1.70? I've attempted to do so but been unsuccessful. From what I can tell the display is 311, and the ctrl is 101, so I tried this

_ctrl = (findDisplay 311) displayCtrl 101;
_ctrl ctrlAddEventHandler ["Draw", {systemChat format ["frame: %1, this: %2", diag_frameNo, _this];

I'm not even sure if that ctrl is correct and being loaded though

weak tiger
#

is KK's url_fetch DLL still the only way to HTTP? or is there something in A3/CBA to use?

#

what I cant draw on atm is artillery computer

still forum
#

htmlLoad is also a way to HTTP

weak tiger
#

cheers Ded!

still forum
#

There are many ways to HTTP. But this is my way.

weak tiger
#

blocking operation though?

#

even in sched env?

still forum
#

I think so yeah πŸͺ

weak tiger
#

not ideal

#

TFAR uses this to reach TS?

still forum
#

No... Don't see a reason why you would send a request to a remote webserver.. just to get a message to a different program on the same computer ^^

weak tiger
#

haha ofc lol

#

well then better add a fake delay on my webserver and start testing

still forum
#

If you need to communicate with something external then Extensions are almost always the best way

weak tiger
#

yeh ok

#

thx for help πŸ˜ƒ

native hemlock
#

Have you tried the GPS thing on this patch? I tried what you posted and that didn't work

warm gorge
#

Any idea why I cant get the scroll bar working of a RscControlsGroup with a RscStructuredText inside? Ive set it up properly from what I can see

warm gorge
#

So ive got it working a bit, I had to increase the height/size of the RscStructuredText. Not sure why I have to do that though I thought it automatically sizes

tough abyss
#

So since 1.70 I can no longer open the debug console from my menu (a dialog) on BIS' showcase (and other community made) missions. I'd open the dialog using a bind I've created with CBA_fnc_addKeybind, and will press the button that opens the debug console action = "closeDialog 0; createDialog ""RscDisplayDebugPublic""";, though the only thing that happens is that the game is paused a cursor appears.

#

There's nothing out of the ordinary in the RPT. Any clue why is this happening?

untold gazelle
#

Are you sure the key is still bound? A couple of my keybindings are gone too after the update.

warm gorge
#

@tough abyss This is because of the security changes that were made to the debug console. You now must be a logged in admin to access it unless you have it set for everyone to use in your mission description.ext. The only workaround to this is to make your own custom debug console dialog, which is what I did and just edit the scripts behind it.

#

If you need any help just let me know.

untold gazelle
#

I'm looking for the script commands to get and set the new dynamic loadouts and appearance settings like camo and fold wings. BIS' respawn module does not remember these settings when respawning vehicles.

little eagle
#

It's bugged in local hosted server Eden Editor. You can't open the debug console there either.

tough abyss
#

Ok, thanks @warm gorge.

delicate lotus
#

Is there a function to set if units should leave the vehicle when attacked or immobilized?

#

I know there was one

#

and again, I cant remember the name

untold gazelle
delicate lotus
#

@untold gazelle no not combat mode

#

it was a function with two params

#

one was for transport to auto unload when attacked

#

and the other one for immoblized

#

The search function in the BI Community wiki is really cancer

untold gazelle
delicate lotus
#

thank you

#

I searched for the word Unload

#

and it gave me no results...

untold gazelle
#

np

delicate lotus
#

now I have another question, how can I get all cargo places for units? or atleast all vehicle seats.

untold gazelle
#

_positions = (_vehicle emptyPositions "cargo");

delicate lotus
#

thank you

untold gazelle
#

And the other ones:
_vehicle emptyPositions "Gunner";
_vehicle emptyPositions "Driver";
_vehicle emptyPositions "Commander";

delicate lotus
#

will a vehicle unload its transport even when the transport is the same group?

untold gazelle
#

I believe so yes

delicate lotus
#

Im working right now with pylon settings and I am trying to give the CSAT Orca two miniguns instead of a rocket launcher. Will that work? And is the AI able to use it?

untold gazelle
#

I want to use _result = [_veh, _textures, _animations] call BIS_fnc_initVehicle; to copy one vehicle's look to a different vehicle (like camo type). I can't find a function to get the original vehicle's init though. Any idea's?

delicate lotus
#

well couldnt you just copy the "color" variable?

#

as far as I know, camo is in the color variable too

#

When you disable randomization you can set color using _vehicle setVariable ["color",X]. So I assume you can get the current color using _vehicle getVariable "color";

untold gazelle
#

I'm afraid not.
For a jet with a camo pattern and folded wings the code looks like this:
[
_veh,
["DarkGreyCamo",1],
["wing_fold_l",1,"wing_fold_r",1,"wing_fold_cover_l",1,"wing_fold_cover_r",1]
] call BIS_fnc_initVehicle;
But I can't find a command to get the vehicle's textures and animation states.

delicate lotus
#

mmh

#

I just spawned an orca with changed pylons with this code:


_veh = createVehicle ["O_Heli_Light_02_dynamicLoadout_F",_position,[], 5,"FLY"];
_vehicle = _veh;

private _pylons = ["PylonWeapon_300Rnd_20mm_shells","PylonWeapon_300Rnd_20mm_shells"];
private _pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply {getArray (_x >> "turret")};
private _nonPylonWeapons = [];
{ _nonPylonWeapons append getArray (_x >> "weapons") } forEach ([_vehicle, configNull] call BIS_fnc_getTurrets);
{ _vehicle removeWeaponGlobal _x } forEach ((weapons _vehicle) - _nonPylonWeapons);
{ _vehicle setPylonLoadOut [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex] } forEach _pylons;

_veh engineOn true;

_grp = createGroup [east,true];

_grp createUnit ["O_T_Helipilot_F",_position,[],2,"NONE"];
_grp createUnit ["O_T_Helipilot_F",_position,[],2,"NONE"];

_grp setCombatMode "RED";

_veh setUnloadInCombat [true, false];

{_x moveInAny _veh;}forEach units _grp;

broadway sideChat "We have a Orca on our radar. Prepare yourself for its attack!";```

The result is a bit handicapped. Cuz the chopper is almost infinitly flying upwards. With almost I mean, after sometime it stopped flying upwards like crazy.
#

Why is that so?

inland condor
#

hey guys, I would love to get rma to tell me list of all available maps in my modpack. We are deleting and adding map mods quite regularly and I would like dynamicly generated list. I need it to create .pbo file for each map so I would need the missionname.mapname.pbo ...

#

Could you point me to right direction ?

delicate lotus
#

so you want a app which randomly grabs missions from a folder and puts it into the server mission folder?

inland condor
#

Nope, I have that script, I just need list of mapnames which are available in my modpack right now.

indigo snow
#

you need this list inside arma?

#

the way to go about it would be trawling cfgWorlds

inland condor
#

Yup, i just want to run SQF script that returns all map names

indigo snow
#

theyre all registered in the config

#

iirc cfgWorlds

inland condor
#

And some small handy script to list them all for my dividid by line bereak @indigo snow ?

#

Also that odesnt looks like are the same mapnames that are use in missionnme.mapname.pbo....

#

I take that back they are the same names...

#

So at least some function that could traverse that cfg ?

indigo snow
#

_worlds = "true" configClasses (configFile >> "cfgWorlds");

tough abyss
#
  call fn_Something;
  hint "Inside";
}];
player addEventHandler ["GetOutMan",{
  removeAllActions player;
  hint "Outside";
}];```
#

is there anything wrong with calling that client side in SQF/

tough abyss
#

thats odd. that shit wont hint anything when going in a vehicle

#

script is executed via execVM. will try hint before call

inland condor
#

Got the thing btw, if anybody wants it...

"getText(_x >> 'skyObject') == 'A3\Map_Stratis\data\obloha.p3d' " configClasses (configFile >> "CfgWorlds");
#

Still full of junk, but at least they are all maps...

tough abyss
#

@tough abyss use var = compileFinal preProcessFileLineNumbers "path\to\your\file"; instead of execVM

#

then remoteExec["var"];

#

@tough abyss will try

#

πŸ‘ŒπŸΏ

warm gorge
#

Has anyone here had any success working with the arma 3 weather system? I cant help but experience issues with transition times for weather related commands not being accurate

little eagle
#

You have to enable "manual overwrite" in rain/wind/overcast etc.

warm gorge
#

How do you mean by that?

little eagle
#

using the weather command when these are disabled, which they are by default, causes the weather ti bug out. E.g. extreme winds changing every second.

#

There is a option in Eden to disable them.

#

Well "enable" the "manual overwrite" of all of those. Internally it's the other way around. You disable "auto wind", "auto rain" etc.

warm gorge
#

Alright ill give that a go. The issues ive been having is the weather commands wouldnt actually take how long you specify to transition. For example 60 setOvercast 1 wouldn't actually transition over 60 seconds. Same with the other weather commands as well. After some research I found many people who have put up feedback tracker issues claiming it as a bug, so wasn't sure if anyone knew anything about it

little eagle
#

Yes, the weather commands are riddled with bugs and I can't remember all the details.

warm gorge
#

Are there any workarounds for the setOvercast issues? Other than through using forceWeatherChange. I saw a few people use skipTime 24 and then skipTime -24 alongside setOvercast, but I couldnt imagine that being a very good option

tough abyss
#

object lock true; if executed on client doesnt seem to work. I can still jump out of my vehicle

little eagle
#

It has to be executed on the "object"'s machine, not the players machine.

tough abyss
#

Ah

#

thanks

little eagle
#

yw

untold gazelle
#

Looking for a function that grabs the information from a vehicle to be used in BIS_fnc_initVehicle. Basically almost the same output you get from clicking export in the vehicle appearance screen.

warm gorge
#

Have you tried looking at how the arsenal/garage does it?

untold gazelle
#

No, is it possible to see the script that creates the export?

warm gorge
#

Yes

#

One sec

little eagle
#

They use bis_fnc_exportVehicle and some other voodoo

#
    ///////////////////////////////////////////////////////////////////////////////////////////
    case "buttonExport": {
        _display = _this select 0;
        _exportMode = _this select 1;
        _center = (missionnamespace getvariable ["BIS_fnc_arsenal_center",player]);
        _centerType = "";

        _br = tostring [13,10];
        _export = "";
        if (_exportMode == "init" && !is3den) then {

            //--- Get all classes using the model
            _export = "comment ""Related vehicle classes:"";" + _br;
            _data = missionnamespace getvariable "bis_fnc_garage_data";
            _modelData = [];

            _currentTextures = getobjecttextures _center;//_center getvariable ["bis_fnc_initVehicle_textures",[]];
            {_currentTextures set [_foreachindex,tolower _x];} foreach _currentTextures;

            {
                _items = _x;
                _ctrlList = _display displayctrl (IDC_RSCDISPLAYARSENAL_LIST + _foreachindex);
                if (lbcursel _ctrlList >= 0) then {
                    _i = _ctrlList lbvalue lbcursel _ctrlList;
                    _modelData = _items select (_i + 1);
                    {
                        _export = _export + format ["comment ""%1"";" + _br,configname _x];
                        if (_centerType == "") then {
                            _textureList = getarray (_x >> "textureList");
                            for "_i" from 0 to (count _textureList - 1) step 2 do {
                                _textureSource = _textureList select _i;
                                _textures = getarray (_x >> "textureSources" >> _textureSource >> "textures");
                                _selected = true;
#
                                {if ((tolower _x) find (_currentTextures select _foreachindex) < 0) exitwith {_selected = false;};} foreach _textures; //--- First backslash may vary
                                if (_selected) then {_centerType = configname _x;};
                            };
                        };
                    } foreach _modelData;
                };
            } foreach _data;
            _export = _export + _br;
            if (count _modelData == 1) then {
                _export = "";
            };
        };
        if (_centerType == "") then {_centerType = typeof _center;};
        _export = _export + ([_center,_centerType] call bis_fnc_exportVehicle);
        _export spawn {copytoclipboard _this;};
        ['showMessage',[_display,localize "STR_a3_RscDisplayArsenal_message_clipboard"]] call bis_fnc_arsenal;
    };
untold gazelle
#

can't find this function on their bis functions page. is this from the config viewer?

little eagle
#

"C:\Arma 3\Mark\Addons\functions_f_mark\a3\functions_f_mark\Vehicles\fn_garage.sqf"

untold gazelle
#

Thanks, will give that a go

untold gazelle
#

_export = [_vehicle] call BIS_fnc_saveVehicle; _animations = (_export select 1); _textures = (_export select 2); _result = [_vehicle, _textures, _animations] call BIS_fnc_initVehicle;
Using this now. works for the animations but not the textures. Doing some more digging πŸ˜ƒ

still forum
onyx geode
#

Is it possible to move only some ctrls of a dialog when movingEnabled is set to true?

little eagle
#

No, the whole display moves.

rotund cypress
#

Hey guys, quick question, command utils in debug console is a scripting command right? As in I can use it outside debug console?

#

It's not listed on BI wiki soo

native hemlock
#

Doesn't look like it's a script command. They have some special handling for it
Some snippets from a3\ui_f\scripts\GUI\RscDebugConsole.sqf

#define UTILITIES_KEYWORD "utils"
...
_input = ctrlText _input;

//--- Utilities keyword: utils or utils <number>
private _args = "";
private _len = count UTILITIES_KEYWORD;
if (
    _input select [0, _len] == UTILITIES_KEYWORD 
    &&
    {
        _args = _input select [_len] splitString " " joinString "";
        _args isEqualTo "" || {"0123456789" find (_args select [0, 1]) > -1}
    }
) 
exitWith 
{
    parseNumber _args execVM "\A3\Functions_F\Debug\Utilities\lib\index.sqf";
};
rotund cypress
#

ah okey, that makes things hard for me 😦

#

Meh, ill find some way

little eagle
#

omg who wrote this 🀦

rotund cypress
#

lol

#

Question, when using controlsGroupNoScrollBars, do I need to use ctrlSetFocus or am I doing something else that is causing that I cannot press everything?

hollow lantern
#

dead simple question I think but I just know the c# approach. Inside a if statement I have a local variable with _nameOfVar thats only valid within the if scope. I tried to declare it first outside of the if statement with _nameOfVar =""; but that wasn't working. In c# I also have the var keyword or const is there something on sqf?

rotund cypress
#

Code snippet?

#

@hollow lantern

hollow lantern
#

No specific but thats my approach.

_coolObj = "";
if (_bla isEqualTo "Bla") then {
_coolObj="Nice"
}  else 
{
_coolObj="Noooo!"
};
// do something here with _coolObj returns in a undefinied variable
#

so after I set the variable in the if snippet its not gonna get applied to the variable. I think I just need to work with private varName I think

rotund cypress
#

That will work

#

and yes

#

make top one private

#

also make sure you are using ;

#

_coolObj="Noooo!" -> _coolObj="Noooo!"; @hollow lantern

hollow lantern
#

I know but just for that example it wasn't needed πŸ˜›

rotund cypress
#

its because of the ifs, that it wasnt needed

dusk sage
#

No need to have the semi colon there πŸ˜›

rotund cypress
#

I know, but /shrug

#

I mean, I would always have it either way

hollow lantern
#

@rotund cypress thats not 100% true πŸ˜› If I would have another code below the line I still would need the semicolon regardless of the if πŸ˜›

rotund cypress
#

well ye 🀣

#

I mean
if (true) then {"true"} else {"false"};

#

Would not have semi colon

#

If (true) then {
"true";
} else {
"false";
};

#

Thats my style

#

not that they re needed

#

but I add them anyways

hollow lantern
#

well we live in a world where we don't stingy with bytes so just keep 'em πŸ˜„

rotund cypress
#

^

hollow lantern
#

ah but now I got a real "error" with this.

            // _null = [Freedom, KI_plane02,"Catapult3"] execVM "scripts\ki_launch.sqf"

        params["_carrier","_plane", "_catapult"];

private ["_carrierObj"];
        
if (_catapult isEqualTo "Catapult1" or _catapult isEqualTo "Catapult2") then
        {
        _carrierObj = "Land_Carrier_01_hull_04_F";
        } 
else
        {
        _carrierObj = "Land_Carrier_01_hull_07_F";
        };

        _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult; ```  The  _carrierObj should be setted like _catapult in the _carrierPartCfgCatapult but thats not working?! What am I doing wrong? _catapult works maybe because its directly getting transfered as "Catapult3"? hmmm
little eagle
#

My brain can't process this.

rotund cypress
#

A bit cleaned up ```sqf
// _null = [Freedom, KI_plane02,"Catapult3"] execVM "scripts\ki_launch.sqf"

params ["_carrier", "_plane", "_catapult"];

private _carrierObj = if (_catapult isEqualTo "Catapult1" || {_catapult isEqualTo "Catapult2"}) then {
"Land_Carrier_01_hull_04_F";
} else {
"Land_Carrier_01_hull_07_F";
};

private _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult;

#

dont use private in array

#

much slower than just privatizing variable directly

#

What is your actual problem?

#

Not getting the config from class Catapults with configname land_carrier...?

hollow lantern
#

if I do it directly it works but when I want to dynamiclly set the configname over a variable (_carrierObj) it wont work for me

rotund cypress
#

oh god its tooooo late for me lol

hollow lantern
#

your code above btw tells me generic error in expression πŸ˜„

little eagle
#

The code above and the original code don't do anything.

#

So no wonder nothing happens.

hollow lantern
#

its not the full code but part from it

rotund cypress
#

I suggest posting the full code

hollow lantern
#

well my style is fucked up but...

        /*
            author: @Aebian
            description: Launch script for AI catapult start from USS Freedom
            returns: nothing
            created: 2017-05-02
            // _null = [Freedom, KI_plane02,"Catapult3"] execVM "scripts\ki_launch.sqf"
        */

        params["_carrier","_plane", "_catapult"];


    private _carrierObj = if (_catapult isEqualTo "Catapult1" or _catapult isEqualTo "Catapult2") then
        {
        _carrierObj = "Land_Carrier_01_hull_04_F";
        } else
        {
        _carrierObj = "Land_Carrier_01_hull_07_F";
        };

        (driver _plane) disableAI "MOVE";

        sleep 10;

        _carrierObjects = _carrier nearObjects [_carrierObj, 40];

        _CarrierPart = _carrierObjects param [0, objNull];

        _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult;
        _CarrierPartanimations = getArray (_carrierPartCfgCatapult >> "animations");
        [_CarrierPart, _CarrierPartanimations, 10] spawn BIS_fnc_Carrier01AnimateDeflectors;

        sleep 14;
        _plane engineOn true;

        [_plane] call BIS_fnc_AircraftCatapultLaunch;

        sleep 5;
        (driver _plane)  enableAI "MOVE";
        sleep 4;
        [_CarrierPart, _CarrierPartanimations, 0] spawn BIS_fnc_Carrier01AnimateDeflectors;```
rotund cypress
#

oh lol

#

wait scratch that lol

#

ok and what is not working?

#
    _carrierObj = "Land_Carrier_01_hull_04_F";```?
#

No wonder you are getting a generic error in expression

little eagle
#

Yeah, you made a mess.

hollow lantern
#

the part with _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult; I'm only able to set the part via _carrierPartCfgCatapult = configfile >> "CfgVehicles" >> "Land_Carrier_01_hull_04_F" >> "Catapults" >> _catapult; directly

#

but I want to set it dynamiclly

#

and it should work because it worked with my passed _catapult string

little eagle
#

This is how I would do that if-block:

private _carrierObj = "Land_Carrier_01_hull_07_F";

if (_catapult in ["Catapult1", "Catapult2"]) then {
    _carrierObj = "Land_Carrier_01_hull_04_F";
};
#

idk, that seems most logical to me

rotund cypress
#

ye ^ πŸ˜‰

little eagle
#

Although naming a variable that holds a classname xObj is weird. Classnames are not objects.

hollow lantern
#

well the blast deflector does not getting animate. if I replace the _carrierObj with the actual classname with strings "Land_Carrier_01_hull_07_F" it works, weird

rotund cypress
#

U wot

little eagle
#

Well if _catapult is either Catapult1 or Catapult2, then _carrierObj will be Land_Carrier_01_hull_04_F and not Land_Carrier_01_hull_07_F.

hollow lantern
#

yeah thats right

#

but it doesn't work either for the catapults

#

because I did _null = [Freedom, KI_plane05,"Catapult1"] execVM "scripts\ki_launch.sqf";

#

and thats clearly catapult 1 but the blast deflector is not getting animate. But doing it manually by replacing the variable in the command with "Land_Carrier_01_hull_04_F" works. @rotund cypress Instead of doing sqf carrierPartCfgCatapult = configfile >> "CfgVehicles" >> _carrierObj >> "Catapults" >> _catapult;
this works:

carrierPartCfgCatapult = configfile >> "CfgVehicles" >> "Land_Carrier_01_hull_04_F" >> "Catapults" >> _catapult;```
little eagle
#

You're doing something wrong. Add some diag_log to check what values the variables take in the critical parts of the script.

still forum
#

Or #UseADebugger

vapid frigate
#

it's not just that 40m isn't big enough?

little eagle
#

I wouldn't trust a debugger written by people that can't even spell the name of the game

still forum
#

I wrote the debugger and I know how to spell it ^^

little eagle
#

😈

still forum
#

It is spelled D-E-B-U-G

little eagle
#

I'm purposefully confrontational, because contentedness makes fat and lazy.

jade abyss
#

diburg?

waxen tide
#

I'm using diag_log and hints to display debug info. i was wondering if there is an easy way to display lots of debug info on the screen permanently and have it updated at a reasonable rate? like, a bigger hint box which isn't the hint box.

vapid frigate
#

you can make your own display to do it

#

anyone know if you can preprocess #defines etc in the debug console? or you have to use 'preprocessFile'?

subtle ore
#

Anybody have the blood.p3d file directory on hand?

#

or rather, know the classname used for particle sources with blood.

warm gorge
#

@still forum Nice, good to see those missing functions in πŸ˜ƒ

icy mauve
#

Hi there, I might need some help please. I'm new to scripting in Arma 3, I programmed in other languages before but I just don't get what's wrong.
I'm trying to spawn a Vehicle (will vary) using an action in an action menu when looking at a Laptop. I'm struggling at the point to set the position and the rotation of the Vehicle as it's supposed to spawn inside a Hangar. This is inside the Init of the Laptop:

_spawnPos = [14321, 16300, 0];
this addAction ["Spawn Darter", {createVehicle ["B_UAV_01_F", "_spawnPos", [], 0, "NONE"]}]
dim notch
#

@tough abyss _spawnPos isn't local to the addAction code parameter, you'll need to either use a global variable or define _spawnPos inside the addAction

#

So either spawnPos = [14321, 16300, 0]; this addAction ["Spawn Darter", {createVehicle ["B_UAV_01_F", spawnPos, [], 0, "NONE"]}] or this addAction ["Spawn Darter", {_spawnPos = [14321, 16300, 0]; createVehicle ["B_UAV_01_F", _spawnPos, [], 0, "NONE"]}]

icy mauve
#

ummm, Β΄setVariable ["name", value]Β΄ ?

#

I will add more actions later when this works, spawnposition will not change tho.

dim notch
#

The one above where spawnPos is global should be fine then

icy mauve
#

Ohh wait wait wait

#

the underscore changes the scope of the variable?

dim notch
#

Yeah

icy mauve
#

faceplant okay.

#

'|#|createVehicle ["B_UAV_01_F", "spawnpos",...'
Error 0 Elements defined, 3 expected

dim notch
#

There shouldn't be quotation marks around spawnpos there at least

icy mauve
#

it doesn't error now but it doesn't spawn either.

dim notch
#

It might spawn somewhere away from the hangar to avoid collision?

icy mauve
#

nvm, I may have had an error in the coordinates

dim notch
#

You could try changing "NONE" to "CAN_COLLIDE", but then if you plan to spawn other stuff at the same position they'll spawn on top of each other

icy mauve
#

14321 instead of 14231

#

worked, awesome

#

thanks a lot, guess I should take a chrash-tutorial about variable in arma 3

#

wait, how do I set the rotation?

dim notch
#

this addAction ["Spawn Darter", { _spawnedObj = createVehicle ["B_UAV_01_F", spawnPos, [], 0, "NONE"]; _spawnedObj setDir 180 }]

rotund cypress
#

Question, when using controlsGroupNoScrollBars, do I need to use ctrlSetFocus or am I doing something else that is causing that I cannot press everything?

icy mauve
#

@dim notch Thanks a lot!

vapid frigate
#
_spawnPos = [14321, 16300, 0];
this addAction ["Spawn Darter", { private _thePos = _this select 3 select 0; createVehicle ["B_UAV_01_F", _thePos , [], 0, "NONE"]}, [_spawnPos]];``` you can pass variables into addActions like that too
#

if, for example, the position was going to be different for multiple actions

icy mauve
#

oh indeed, but that looks way too complicated

#

except they just keep spawning in front and behind each other if I continue pressing the buttons

#

Might need a if-sentence there, or can I change the "NONE" to something that prevents spawning more while there is already another vehicle?

#

I added a fourth vehicle and everything exploded.

sleek nova
#

Hello all, i am Trying to convert this value into an array : ""[""""test""""]""

#

I entered it into a module I created like so: ["test"] and I saw in my diag_log that is looked something like this ""[""""test""""]""

#

So maybe I am doing something wrong?

tough abyss
#

Having a bit of trouble converting these 2 lines to CBA macros ```CPP
onLoad = "[""onLoad"",_this,""BisDisplayDebugPublic"",'GUI'] call SR_fnc_debugConsole";
onUnload = "[""onUnload"",_this,""BisDisplayDebugPublic"",'GUI'] call SR_fnc_debugConsole";

#

Hmm, how would I go about creating a macro that converts SINGLEQUOTE(someVar) into 'someVar'?

#

Found a workaround #define SINGLE_QUOTE_GUI_TEXT 'GUI'.

#

Don't ask.

#

Shit, doesn't compile.

#

Help.

warm gorge
#

Is there any way to make a map native building invincible? allowDamage doesn't seem to work, and I read somewhere that this is intentional.

#

Any workaround to this? I guess I could remove the building and replace it, making that one invincible with allowDamage false. Unless you mean this objects in view distance issue applies for all occurances of allowDamage?

#

Alright yeah ill just do that. Cheers

stable vault
#

i need help with is trying to figure out why my teleport to MHQ script stops working when the vehicle respaws. It seems as though it is losing its same name or "index"?
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", Ghost_1];
Ghost_1 is the varible name of the chopper
What would cause it to not work anymore after respawning?
the above goes inside an .sqf
which is called on init

#

the teleport MHQ script is:

#

_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
_caller moveInCargo _teleporTo;
player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];

sleek nova
#

@tough abyss thanks I'll give that a go!

icy mauve
#

Hi, I need some help. I want to spawn a Vehicle at a certain position if there is not other vehicle at that position, if yes: remove vehicle, spawn anyways, if no, just spawn. THis is what I got:

spawnpos = [14243.3, 16227.3, 0];
spawnUAV = {
    params ["_vehicle"];
    
    nearv = nearestObjects [spawnpos, ["UAV"], 5];
    if (count nearv > 0) then {
        deleteVehicle nearv select 0;
    };
    
    _v = createVehicle [_vehicle, spawnpos, [], 0, "NONE"]; 
    _v setDir 303;
};
#

unfortunately, at "deleteVehicle nearv..." it says it gets an array while expecting an object, which makes sense.

#

Any Idea to retrieve the vehicle-object using the element from that array?

warm gorge
#

@icy mauve ```sqf
deleteVehicle nearv select 0;

to

deleteVehicle (nearv select 0);

tough abyss
#

Anyone know how to get the first hit pos of a bullet from the Fired event?

icy mauve
#

@warm gorge nice, works now!

stable vault
#
_mhq = [Ghost_A,Ghost_B,Ghost_C,Ghost_D];
params["_HQ","_mhq"];
_hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", _mhq];
_unit = _this select 0;
_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
   _caller moveInCargo _teleporTo;
   player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
   player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];

/* INFO: This is for a MP Dedicated environment:
---------------------------------------------------------------------------------------------------
Varible names of the 4 Ghost hawks acting as MHQ's : "Ghost_A","Ghost_B","Ghost_C","Ghost_D"
Variable name of the Addaction source (flagpole) is : "HQ"
The addAction is called via a .sqf called APXteleport.sqf < the .sqf contents are:

HQ AddAction ["<t color=""#FFA600"">" +"Move to FIXED WING", "teleport.sqf", [FixedWing]];
HQ AddAction ["<t color=""#FFA600"">" +"Move to ROTARY WING", "teleport.sqf", [RotaryWing]];
HQ addAction ["<t color=""#FFA600"">" +"Move to TEST RANGE", "teleport.sqf", [TestRange]];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", Ghost_A];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Bravo", "teleportMHQ.sqf", Ghost_B];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Charlie", "teleportMHQ.sqf", Ghost_C];
HQ addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Delta", "teleportMHQ.sqf", Ghost_D];

Then i fire the sqf via init.sqf
icy mauve
#

Just a side-question. Is there a way to create a Simple UI? I want to click "Spawn Vehicle" in the Action Menu and then open a list to select one out of 10/15?

stable vault
#

Do you guys see any error in this ?

warm gorge
#

What script error are you getting @stable vault

stable vault
#

not a script error as of yet as i havent incorporated it yet. I'm asking if i did it wrong in the _variables etc. As it is my first time trying to script at this level.

#

Which is why i put all the info in there for ya ? πŸ˜›

#

Just need to know it its not written WRONG

warm gorge
#

You're missing a couple of semi-colons and why have you got your variable names as strings in the _mhq array?

tough abyss
#

^

#

sqflint is op

stable vault
#

exactly my question see...i knew it.

#

so no quotes?

warm gorge
#

Correct

#

And missing semi-colons at the end of line 1 and 2

stable vault
#

Like that?

#

(edited it)

warm gorge
#

yes

#

whats the params["_HQ","_mhq"] for btw?

stable vault
#

i dont know...a fella in the other channel helped me out a bit and gave me that advice?

warm gorge
#

Params are used when retrieving variables from an array of arguments such as those passed through to a function. But if you're declaring it within the script you dont need that

stable vault
#

Honestly im trying to learn...

warm gorge
#

Yeah no problem

stable vault
#

i dont know

#

πŸ˜›

warm gorge
#

Remove that line from your script, you dont need it in this specific case.

stable vault
#

im simply trying to get a teleport .sqf script to work in a Dedicated MP . But after the Chopper "Ghost_A" etc. respawns ...the code cant find "Ghost_A" anymore (i presume?) and the MHQ addaction no longer works

#

i was trying to Recode it myself

#

Am i missing something ???

warm gorge
#

Where are you calling this script? That you showed us

stable vault
#

Read the notes at bottom:

#

i put it all in there for ya

warm gorge
#

ah yep in init.sqf. The added action(s) wont persist through respawns unless you make it do so through for example a respawn event handler

stable vault
#

Thats EXACTLY what i thought?

#

(been researching like crazy-LOL)

warm gorge
#

How is this ghost hawk respawning. Through like a respawn module or somethign

stable vault
#

So how do i fix that problem then, if you dont mind?

#

yes

#

someone told me to do this:

#
 [_HQ,(_this select 0)] call compile preProcess "MHQrespawn.sqf";
#

is that correct?

#

the above CODE is all inside MHQrespawn.sqf

warm gorge
#

Id execute the MHQrespawn.sqf script through the vehicle's init field in the editor, rather than in the mission's init.sqf. That way the script will be executed everytime the vehicle is created, not just on mission start

stable vault
#

OK...so the MHQrespawn.sqf will fire every time it respawns right?....but what about the chopper retaining its variable name?

#

its like the script cant FIND "Ghost_A" anymore after it respawns?

#

its renamed or something?

warm gorge
#

Im not sure how the vehicle respawn module works, but I would assume it just re-creates the original vehicle so would most likely retain the variabl enamer

stable vault
#

Hmm?

warm gorge
#

Cant you try it?

stable vault
#

about to

#

BTW... what does the %1 mean in the code at the bottom?

#

_caller moveInCargo _teleporTo; player vehicleChat format ["You have been deployed at %1", _teleportTo]; } else { player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];

stable vault
#

thanks @little eagle

warm gorge
#

Its basically a placeholder

shell skiff
#

hey all i need some help, i set a trigger with this part hint "Fahrzeug wird Repariert";

sleep 5;

{_x Setdamage 0} Foreach thislist;

hint "Abgeschlossen";

sleep 10;

hint "Fahrzeug wird Aufmunitioniert";

sleep 5;

{_x SetVehicleAmmo 1} Foreach thislist;

hint "Abgeschlossen";

sleep 10;

hint "Fahrzeug wird Aufgetankt";

sleep 10;

{_x SetFuel 1} Foreach thislist;

hint "Abgeschlossen"

#

but i doesnt work

gilded rover
#

where is the error?

shell skiff
#

Error general error in expression

indigo snow
#

Cant sleep directly like that

shell skiff
#

and what can i do?

gilded rover
#

have you tried making an sqf file?

shell skiff
#

no i will try it right in this moemtn

indigo snow
#

Youll need to either use spawn or execVM to use sleep (simplified explanation)

stable vault
#

@warm gorge How would i go about doing what you said earlier? : ShadowRanger - Today at 8:08 AM
ah yep in init.sqf. The added action(s) wont persist through respawns unless you make it do so through for example a respawn event handler

stable vault
#

MHQ CODE IS:

_caller = _this select 1;
_id = _this select 2;
_teleporTo = _this select 3;
cutText["","BLACK OUT",2]; sleep 2;
if (alive _teleporTo) then
{
    _caller moveInCargo _teleporTo;
    player vehicleChat format ["You have been deployed at %1", _teleportTo];
} else {
    player groupChat format ["Unable to deploy to %1 at this time.", _teleporTo];
};
cutText["","BLACK IN",3];```
#

INFO: This is for a MP Dedicated environment:

Varible names of the 4 Ghost hawks acting as MHQ's : "Ghost_A","Ghost_B","Ghost_C","Ghost_D"
Variable name of the Addaction source (flagpole) is : "HQ"
The addAction is called via a .sqf called APXteleport.sqf < the .sqf contents are:
SQF CODE IS:_hq = HQ; _hq AddAction ["<t color=""#FFA600"">" +"Move to FIXED WING", "teleport.sqf", [FixedWing]]; _hq AddAction ["<t color=""#FFA600"">" +"Move to ROTARY WING", "teleport.sqf", [RotaryWing]]; _hq addAction ["<t color=""#FFA600"">" +"Move to TEST RANGE", "teleport.sqf", [TestRange]]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Alpha", "teleportMHQ.sqf", Ghost_A]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Bravo", "teleportMHQ.sqf", Ghost_B]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Charlie", "teleportMHQ.sqf", Ghost_C]; _hq addAction ["<t color=""#FF0000"">" +"Mobilize to NightStalker Delta", "teleportMHQ.sqf", Ghost_D];
Then i fire the sqf via init.sqf
How come the script stops working after it respawns?

The issue though...isn't the addactions being lost.
its the code i need to put into the On Respawn Field in the attributes of the Heli "Ghost_A" to give it back its original Variable name.Cause if you see the code above "Ghost_A" is the vehicle is searches for before putting you inside via moviInCargo...So i need to figure out how to code the chopper to retain its "NAME" (as in the Variable name?)
either via :

  • (code in the "OnRespawn" attribute in the vehicles Custom attributes field
    or
  • eventHandler
    so the teleport will WORK AGAIN
    [once the MHQ is destroyed the teleport script no longer works]
    because its somehow renaming the "Ghost_A" chopper to something different when it gets respawned?
stable vault
#

Wonderful info @tough abyss Thank you.

#

So...yes there is a "OnRespawn" attribute in the vehicle itself, and theres an "Expression" field to be filled out in the Respawn Module itlef which is synchronized to the chopper.

#

As well i could just make a new .sqf naming them directly or something?

#

@tough abyss What do you reccomend?

tough abyss
#
"B_UAV_05_F" createVehicle position player;
{
dd = player connectTerminalToUAV _x;
hint str dd;
} forEach allUnitsUAV;```
#

that seems to not work

#

returns false

still forum
#

Because you can't connect to a UAV that doesn't have a brain

#

createVehicle creates the empty vehicle without AI in it

vernal rune
#

I've been playing about with dialog objects and can't seem to get the working that well... but all the objects seem to come out with weird textures or not texture does anyone know why? - http://i.imgur.com/dW9jEmz.png

tough abyss
#

@still forum sorry if this is a dumb question but how would i spawn it in the editor and fly it around?

#

nvm

#
createVehicleCrew uav;
dd = player connectTerminalToUAV uav;
hint str dd;```
#

still seems to not allow connection (AAF terminal)

#

nvm i wasnt nato

warm gorge
#

@vernal rune You able to provide some code of your dialog? A picture wont help much

#

@stable vault You just need to call your script directly from one of these onrespawn attributes which are triggered when the vehicle respawns. What have you tried so far?

strong wyvern
#

running into a problem. I did some testing... it seems that the getArray function is returning a randomized array and not the complete array... it does however return the exact same randomization each time... it is also making items in the array appear more often than was in the original array

#

msg me if you know why this might be happening, been awake too long trying to solve this and need to sleep

fallow radish
#

gday all πŸ˜ƒ

#

any one here can suggest a good cleaning script that removes turrets and empty vehicles?

#

IFA3 Mod

tough abyss
#

Hello guys, i've got a question, i'm trying to devellop my onw altis life server (i had start 5 min ago)
so i start to create and configure my description.ext but thats not the only file i need (exept the mission file) so my question is wich other files need i??
And have you a topic to help me?

dusk sage
#

I'm going to say you'll have little to no help here. Certainly the wrong place though. But you should have a full mission (not just a description.ext), which consists of far more than one file

tough abyss
#

yes that is my question?? Wich others file need i?

#

init.sqf

#

desc.ext

#

mission.sqm

#

etc...

dusk sage
#

All of them 🀐 ?

tough abyss
#

yes ::)

#

xD

#

briefing.sqf

halcyon crypt
#

so it the stage you are at the moment you're better off discovering things yourself

#

you won't learn anything by asking here IMO

#

that's your best friend

#

all you need is a mission.sqm and init.sqf to get started

#

you'll learn the rest as you need them πŸ˜ƒ

#

actually, it sound more like you want to host a Altis Life server than create your own mod/mission/whatever πŸ€”

#

check their discord, no clue where it is though ^^

austere granite
#

What's the fastest way to check if there's someone in a specific cargo seat?

indigo snow
#

fullCrew with the includeEmpty flag?

austere granite
#

figured, just checking if i was msising some other obvoius way

tough abyss
#

May be a dumb question, but does this include ALL air vehicles? (helicopters, planes, jets, vtols)

vehicle player isKindOf "Air"
#

Thought so, wanted to double check. haha

#

Cheers

#

Ya, I think I was confusing all of that and couldn't remember.

icy mauve
#

Is there a way to set a script-spawned uav to BLUFOR so player's don't have to "hack" it anymore?

indigo snow
#

Give it a blufor UAV brain

worthy spade
#

How do I use a local variable outside the scope of a switch case?

switch (true) do {
   case true: { _myvar = "blah" };
};

systemChat _myvar; // fail
warm gorge
#

@worthy spade Declare the variable outside of the switch statement

#
private _myvar = "";

switch (true) do {
   case true: { _myvar = "blah" };
};

systemChat _myvar;
worthy spade
#

Copy, thanks.

dusk sage
#

You're welcome to initialise and define the variable with the switch return

#

If you're that way inclined

modern delta
#

Hello everybody. Got a huge problem with BE Filters πŸ˜‰ ... scripts.txt

BattlEye Server: Warning: Disabled kicking for scripts.txt scans. Please update your filters according to scripts.log and add "//new2" at the top.
#

But i got //new2 at top

#

And he is logging for matches

#

The filter worked till x64 update i guess

modern delta
#

Nobody here? 😦

tough abyss
#

Probably the best place to ask, not really scripting.

modern delta
#

sry but thx for intel

tough abyss
#

Having issues syncing things with an intro into a mission. A loading screen at the end before you can physically see is screwing it up. Anyone know the command for waiting until you can physically see and move after all loading screens are gone?

#

fucking genius. thank you

rotund cypress
#

Or private "_myVar"; @worthy spade

#

or as BoGuu said private _myVar = switch true do {case true: {"blah"}};

vapid frigate
tough abyss
#

That works too @vapid frigate Thanks!

knotty fractal
#

idk where to post so i will bost it here. I'm trying to edit the armor value of a custom mod skin. This mod is .@LeoMod. It comes wit h very basic shirts. I did this to the uniforms to try and change the armor value but ended up failing "https://gyazo.com/47cb03b07c0dc45e769c34ed4b78d9ea". I'm trying to make it so it takes 2-3 shots from a rook at close range in order to die. Thank you

quasi rover
#

Is there an aircraft carrier image file(*.paa) in Arma3 folder? Where can I find it?

still forum
#

There are no paa's in the Arma folder. Your second question now doesn't make any sense. Oh you are gone already... Okey..

quasi rover
#

no carrier image file even in *.pbo files?

still forum
#

I don't know what you mean by carrier image.. There is probably some icon somewhere.. Maybe..

split coral
#

The carrier's texture?

quasi rover
#

yes. carrier's texture

little eagle
#

I'm almost 100% sure that an object that big is made of many textures, some may even be generic ones reused in other places.

icy mauve
#

In the Wiki I found this line:
icon = "\A3\Ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa";
but I can't find those files on my PC. Neither in Documents or the Arma 3-Directory and I even checked some pbo's

little eagle
#

"C:\Arma 3\Addons\ui_f_data\a3\ui_f\data\GUI\Cfg\Ranks\sergeant_gs.paa"

#

"C:\Arma 3" is my main game folder.

icy mauve
#

I noticed that yes, thanks a lot!

little eagle
#

Yay for Win10 search function.

icy mauve
#

There is no tool for .paa to image right?

little eagle
#

I use TexView for that.

#

TexView 2 it's called I think. From the BI tools

icy mauve
#

found it

little eagle
#

Just save as and choose the file extension.

#

.png should be "lossless" for these

icy mauve
#

One more question: As the respawn Loadouts I want to load some default arma-pre-made ones like the NATO-Engineer/Medic/Sharpshooter etc. how can I add those to the Respawn Screen in CfgRespawnInventory.

#

or can I use the BIS_fnc_addRespawnInventory to use that?

#

Best stuff is always hidden... Ctrl + Shift + C in Arsenal

#

How do you escape special characters in Description.ext?

queen cargo
#

escape special characters?

#

ehhh what?

#

give example

delicate lotus
#

like À ü â ß

#

?

icy mauve
#

yes, exactly those characters in particular

queen cargo
#

there is no need to escape them?

icy mauve
#

Γ€, ΓΆ and ΓΌ displayed as spaces...

queen cargo
#

your document codec is wrong then

icy mauve
#

I'll change the encoding of the Filde

still forum
#

save your document as UTF-8

icy mauve
#

yes

#

I'll do

#

nvm, sorry

#

works now

#

I don't get why Notepad++ keeps reverting the default COdec to ANSI

little eagle
#

BECAUSE IT'S NOT SUBLIME TEXT 3

tough abyss
#

nope, get out. NP++ is life

little eagle
#

Yeah?!
blue name > black name

#

ergo

#

ST3 > NP++

delicate lotus
#

Is there a way to check if a player has an open briefing screen?

#

cuz if you use sleep while having a briefing screen you sleep forever.

#

and I want to avoid that

little eagle
#

Use uiSleep

delicate lotus
#

yeah I just rewrite all my intro scripts to use uiSleep...

#

and then people can enjoy the intro which started in the briefing screen...

bleak schooner
#

I'm trying to make player nametags using DrawIcon3D. Is there any way that these nametags are not shown through walls?

little eagle
#

Don't draw them if there is a wall in between the camera and the targets head.

bleak schooner
#

but how can I tell?

little eagle
#

Or any other suitable intersect command. This one is the most powerful imo.

delicate lotus
#

what display is the briefing screen?

little eagle
#

RscDisplayClientGetReady

#

RscDisplayServerGetReady (for the host)

#

RscDisplayGetReady (in SP)

delicate lotus
#

no I mean the id...

little eagle
#

host being the logged in admin on dedicated or server in local hosted MP

#

You can check the config viewer for the IDDs

delicate lotus
#

I think I need a tutorial on how to use the config viewer...

#

it looks pretty complicated

#

ah found it

little eagle
#

IDD_CLIENT_GET_READY
IDD_SERVER_GET_READY
IDD_INTEL_GETREADY

delicate lotus
#

well I didnt mean those IDs but numbers like 53, 52

little eagle
#

those are the same

#

Just need to include:

#

#include "\a3\ui_f\hpp\defineResincl.inc"

delicate lotus
#

okay ^^

modern snow
#

I need help. I want a script, so I can scroll on buildings and repair buildings.

delicate lotus
#

okay...

#

and you want to script that? right?

tough abyss
#

@modern snow in unit init: ```SQF
this addAction ["Repair Building" , "nearestBuilding player setDamage 0"];

still forum
#

Uhm

#

setDamage 1 is not repair

little eagle
#

But it's more exciting.

modern snow
#

how can I add to my life server?

warm gorge
#

What do you mean add to it

modern snow
#

Which file

warm gorge
#

You're going to have to explain yourself better than that. I dont understand

modern snow
#

I don't know which file I should add this : "this addAction ["Repair Building" , "nearestBuilding player setDamage 1"];"

#

sorry I can't speak english πŸ˜ƒ

warm gorge
#

Theres probably a setupActions file or something in the mission where you can add your own actions

modern snow
#

case east: {
// Repair building
this addAction ["Repair Building" , "nearestBuilding player setDamage 1"];
};

#

?

#

right?

tough abyss
#

vehicle _player isEqualTo _player

#

should return if the player is not in a vehicle right?

halcyon crypt
#

possibly

#

vehicle player != player typically

delicate lotus
#

@modern snow sight You want that one of your altis life factions can repair buildings right?

tough abyss
#

@modern snow

private _buildingarray = nearestObjects [(position player), ["Static"], 2000];
{
    _x setDamage 0;
} forEach _buildingarray;
#

@halcyon crypt thats if the player IS in a vehicle

modern snow
#

@delicate lotus Yeah

delicate lotus
#

well do you know anything about scripting?

modern snow
#

something. But just started.

delicate lotus
#

well to repair buildings you just need to add a action to every player which should be able to repair buildings which executes the code @tough abyss wrote.

modern snow
#

In fn_setupActions.sqf: "life_actions pushBack (player addAction ["Repair Building", "core\actions\repairbuildings.sqf"]);" and add your script to repairbuildings.sqf

tough abyss
#

That repairs all buildings within 2km which is more so for admin stuff.

delicate lotus
#

I dont know how altis life works so...

tough abyss
#

You're in the wrong discord bud

modern snow
#

Ok, but thanks for your help πŸ˜ƒ

halcyon crypt
#

@tough abyss oops.. well just replace != with == πŸ˜„

brazen sparrow
#

anyone worked a way to move a turrets rotation/elavation via sqf, with no AI/player intervention?

bleak schooner
#

How can I check if enemy units are in a radius of for example 10m around given coordinates?

pliant stream
#

?

cedar kindle
#

10x10 trigger?

dim notch
#
if ( ({side _x == wantedSide} count _list) > 0) then {
    hint "there are wantedSide units present";
};```maybe? Though I'd just move a trigger there
pliant stream
#
(_unit countEnemy (_pos nearEntities _radius) > 0)```
bleak schooner
#

any idea on how to do this with friendly units?

pliant stream
#
(_unit countFriendly (_pos nearEntities _radius) > 0)```
bleak schooner
#

what does the > 0 do?

cedar kindle
#

return a boolean

pliant stream
#

check if the returned value is greater than 0

bleak schooner
#

how do I use this eg set a variable to true if the value is greater then 0?

pliant stream
#

how do you set a variable?

#

var = <expression>

bleak schooner
#

i know but how do i use it in this context

cedar kindle
#

you literally just assign it to the code posted above

bleak schooner
#
; ``` ?
pliant stream
#

the code i posted above is an expression, the value of which is a boolean representing whether there are enemies to _unit within _radius of _pos

#

you cannot compare an object (which i assume _unit is) and a scalar (which 0 is)

cedar kindle
#

i think you should really read up on the basics of sqf before you try to tackle this puffin

pliant stream
#

bah... read the basics of imperative programming

bleak schooner
#

Learning by doing works best for me ^^

pliant stream
#
0
""
_var
_var + 0
comment "blah blah"
missionNamespace setVariable ["somevar", _x]
(_unit countFriendly (_pos nearEntities _radius) > 0)``` these are all **expressions**. they all have a **value**. for example the **value** of the **expression** `1+2` is `3`, and the **type** of the **expression** is **scalar**

```SQF
_var = 1 + 2``` is a local variable **assignment** where the **value** of the **expression** `1 + 2` is assigned to the local variable `_var`

```SQF
_var = _x``` **is not an expression. it has no value.** because, i assume, SQF was designed by retarded monkeys. what this means in practice, is that counterintuitively this is illegal: ```SQF
_a = (_b = _c)```
tough abyss
#

@still forum I meant 0, my bad πŸ˜…

bleak schooner
#

So I now got ```_myspawnpoint = getPos player;
_num = 9;

while {_num > 1} do {
_list = _myspawnpoint nearEntities ["Man", 10];
_num = count _list;
sleep 1;
};
waituntil {_num <= 1};
hint "hello";``` but this won't work. Any idea why?

cerulean whale
#

I can't read it on my phone but I'll jump on my pc and take a look for you if no one else has in a couple of minutes

bleak schooner
#

@cerulean whale thx

cerulean whale
#

Just curious, what is the point of this?

bleak schooner
#

it's for a pvp gamemode and this script checks if there any players nearby so you don't spawn in front of an enemy

indigo snow
#

are you allowed to suspend in the scope you're executing that code?

#

what error are you getting?

bleak schooner
#

Generic Error in expression

indigo snow
#

also that second waitUntil is completely useless

cerulean whale
#

I can only see the first few lines but why not do. waitUntil {count (_mySpawnpoint nearEntities ["Man", 10]) <= 1}

indigo snow
#

Generic Error in expression Usually means you're not allowed to suspend the running script at that point

#

read up on the differences between spawn and call

cerulean whale
#

Was bout to say that as well ""

bleak schooner
#

@cerulean whale wont work

pliant stream
#
// [unit, vector pos, float radius] : bool
my_fn_spawnIsClear =
{
    _this select 0 countEnemy (_this select 1 nearEntities (_this select 2)) == 0
};```
cerulean whale
#

Are you using it in debug console?

#

If so

#

Put it in [] spawn { here }

pliant stream
#

this is why so much of sqf is worthless... people have no clue what they're doing so they just spawn everything

cerulean whale
#

I would just write you a working one but I'm sick af and its 5am so I cba getting out of bed

#

I wouldn't do it like that but w/e lol
@pliant stream

bleak schooner
#

@cerulean whale it works with []spawn and no thanks I'll figure it out myself πŸ˜‰

cerulean whale
#

I would just make it spawn you in a different location if someone was thee

#

There*

#

Cool. When I get up ill chuck you what is probably a better alternative to that.

#

Would be better just to cycle spawn location but that's too much effort to write on a phone

pliant stream
#

yeah just have a bunch of spawns, shuffle them, and find the first one that has no enemies nearby

cerulean whale
#

Exactly

bleak schooner
#

thats what I'm doing

pliant stream
#

doesn't really look like it

#

there shouldn't be any need for suspending

bleak schooner
#

I changed it in my final script

cerulean whale
#

That kind of defeats the entire purpose of what you were asking then πŸ˜‚

#

W/e anyway. As long as it works I guess

#

πŸ˜‚

barren magnet
#

Does anyone has the display number and or the idc of the arma 3 gear dialog?

#

Found it, for anyone: Its Display 602

thick sage
#

@pliant stream com'on, just because the assigment is not an expression you are calling SQF designers retarded monkeys?! Isn't that excalating a bit quickly?

pliant stream
#

it's not just because of that, but let's face it SQF is a pretty god damn shitty language

thick sage
#

why so? (not that I disagree, just trying to understand why it is the case for you).

My point above is that SQF is a programming language of a game. Dev time was spent in developing it in deteriment of other features. So, maybe not necessarily retarded mokeys, just with a limited time to design it.

pliant stream
#

maybe if they had a braincell between them they might have realized that creating their own language was a waste of effort when a multitude of open source scripting languages already exist.

thick sage
#

do not know the history of it; maybe at the time this was not the case?

thick sage
#

picking Python, which I am more familiar with.
Python 2 was released in 2000. It was unclear that it would become as popular and well maintained and reliable as today. Only in 2001 the Python Software foundation was formed. So, making a commitment to Python in 2000 was a gamble.

tough abyss
#

SQF is getting replaced in the next Arma title... πŸ€”

pliant stream
#

that may be, but by no means does it vindicate SQF

thick sage
#

sure, @pliant stream, I am not disagreeing with you that there was probably a better choice. Just poiting out that the circunstances were widely different back then, both licences, maintenance, culture in gaming industry, etc.

#

well, the parser I developed should be able to convert SQF to any language, so don't despair!

pliant stream
#

sounds horrifying

tough abyss
#

I'm sure BI would've done a lot of things differently if they knew then what they know now, as would so many other businesses.

#

Mine included...

thick sage
#

lol horryfing is having to manually convert Arma 3 great mods to Arma 4...

tough abyss
#

^^

pliant stream
#

most sqf i've seen isn't worth the storage space it takes up though, i don't see why you would want to transpile it into another language, even if you could

thick sage
#

and throw years of mod development under the bus. Sounds reasonable /s

pliant stream
#

ok then show me this magic transpiler that can turn SQF into java or something and i will be impressed

rotund cypress
#

Is it possible to get the object executing a remoteexec with remoteExecutedOwner command?

rotund cypress
#

Oh nice, thanks mate

#

Select is faster than foreach, yes?

#

true

quasi rover
rancid ruin
#

did someone really suggest javascript as a viable alternative to SQF

#

πŸ˜„

subtle ore
#

Wait. What? @rancid ruin Seriously?

jade abyss
#

@brittle locust Don't post it in several Channels. This will end up in multiple Convos, with the same Topic in X Channels (Short: Chaos)

brittle locust
#

noted, will move

subtle ore
#

Your linebreaks gave me a bit of a headache too πŸ˜›

rancid ruin
#

yeah @subtle ore scroll up, untelo suggested JS cos it was around in 1995, prior to op flash

subtle ore
#

🀦

gilded rover
#
{_x addMPEventHandler["MPHit",{enablesimulation false}]} forEach arrBonus;``` can anyone tell me how i would get to disable the simulation of a target as soon as it is shot (to avoid being able to run bonus.sqf 2 times)
#

doesnt want to work , i am able to shoot the same target over and over again

#

πŸ˜›

subtle ore
#

Well. Let's see here. Are you playing this in a listen server or dedicated?

#

and what is arrBonus defined as?

gilded rover
#

arrBonus =[D,D_1,D_2,D_3,D_4,D_5,D_6,D_7];

#

well atm i am making it SP until i am done , then i will be making it probably for a listen server (one of my friends host the mission and off we go)

rancid ruin
#

next question will be what are D,D_1,D_2,D_3,D_4,D_5,D_6,D_7 defined as

gilded rover
#

small oval targets , if i find that the simulation becomes disabled then i will apply same technique to Pop-up targets

subtle ore
#

god damn it, isn't there some function for all of this?

#

specifically a bis fnc

gilded rover
#

idk thats why i came here πŸ™ˆ

subtle ore
#

function viewer is your friend πŸ˜„

vapid frigate
#

anyone know of any object based init event handlers that run after 3den attributes are set on the object?

#

(after the 3den attribute 'expressions' have run)

thick sage
#

@pliant stream that the parser can or cannot transform SQF to language Y is not an argument in favour or against whether we should neglect or not years of mod development. They are unrelated (interesting) questions.

#

Regarding the conversion question, what I am saying is that because the SQF parser is able to construct the lexical tree of SQF, it is a great leap in the direction of migrating SQF to another programming language. A large challenge of converting X into Y is to transform written X into a sequence of statements. The second challenge is to convert those statements back into written Y. To a large extent the parser solves the first problem.

#

Java is probably a bad example because there is no way to convert an imperative programming language into a pure object-oriented one.

#

In summary, it strongly depends on what language Arma 4 will adopt. In this regard the studio could be more communicative and tell us what they plan (if they plan to change)

halcyon crypt
#

Enfusion Script is a pretty good bet

cedar kindle
#

@vapid frigate Use CBA nextFrame?

vapid frigate
#

will give it a go, thanks

pliant stream
#

@thick sage i got the impression they used Java at least in some capacity for dayz, though maybe i'm wrong... and also the enfusion/enforce (?) language is statically (and possibly even weakly) typed so you'll have one tough time trying to automatically convert sqf into that

thick sage
#

I searching for 10m for enfusion/enfused/endoforce and can't find any damm thing on it... Wtf is that?

thick sage
#

It is deeply troubling that the top hit of a programming language is on reddit.

vapid frigate
#

it's not an external tool (yet at least)

thick sage
#

but then how would it solve the problem? Everyone would need to learn a brand new language!

pliant stream
#

how so? seems really similar to c++

vapid frigate
#

yeah seems like it'd be an easier language for programmers to learn (and more useful for anyone to learn)

#

dayz seems to support enfusion or sqf

#

so that's probly how they'd work around backwards compatibility

thick sage
#

@pliant stream yesterday we were discussing that there were different open source languages on the market, why would they create their own. The same problem applies here: why would they use their own language when there are so many available?

@vapid frigate yes, backwards compatibility is a good argument. Regarding easy to learn, I don't think any of us at this moment can say that: there is no document describing it.

vapid frigate
#

yeh just looking at the screenshot, it's obviously at least OO and likely very close to c++ cli

pliant stream
#

oh sure i agree that it's silly to create their own language yet again... i was just pointing out that since it's so close to c++ there's not really a need to learn a brand new language

vapid frigate
#

C++ seems like an odd choice to emulate though unless it's being compiled properly

pliant stream
#

i'm pretty sure it is compiled though

#

i'm sure they even have an optimizer to rival icc ... /s

vapid frigate
#

yeh makes sense if it is.. should be a lot faster than sqf

thick sage
#

@vapid frigate well, c++ is pretty difficult to learn. But I agree, it is simpler if you know any other language. Emulate in C++ made Apple build a compiler, so, the challenge seems difficult.

In any way, was Enforce officially recognized as the modding language of Arma 4?