#arma3_scripting

1 messages · Page 440 of 1

errant jasper
#

Problem is Alt-Codes is typically dependent on other things. Despite, running an English Win some ALT-Codes differ on my system.

little eagle
#

This chat is not a wiki. Just look up things on the wiki...

exotic tinsel
#

yes @little eagle i know, there is not mention of if it works in multiplayer, and this is a place for asking about scripting questions.

strange urchin
#

How does adding items to containers locally even work?

little eagle
#

It says Arguments Global, Effects Global top left on the page!

still forum
#

@strange urchin How would it not work?

#

Global works by adding it. And telling everyone that you added it.

#

If you just don't tell anyone it will be local only

strange urchin
#

Does it stay local if someone takes it or places it?

still forum
#

How would someone take something they can't see

#

If you take it out and put it back. putting it back would use the in-engine "player added item to box" which is global

errant jasper
#

@strange urchin Did you ever play Arma II ?

strange urchin
#

I did some

errant jasper
#

Maybe you got lucky, but a lot of the less "polished" mission and scripts from the community back then had severe MP issues with crates and weapons/magazines.

strange urchin
#

So I guess it’s only good for ensuring only a particular player can take something

errant jasper
#

I can't remember the details exactly. But was not uncommon say for people to have a "resupply" script refilling equipment in crates regularly. Problem was they were run at the same interval, but when people JIP'ed their refresh time was different than the servers. So sometimes a crate would look full, except you couldn't grab anything, and when the server had been running a while, they had widely different content from player's perspective.

#

I don't know how it works nowadays, but if it is still like this, then you the server to also has the item you only want a particular player be able to take.

#

It is different, from items that are local on the player. When dropping those items they become global (at least they did).

#

But since BIS made a lot more *Global commands, these problems are mostly gone. Now the problem is duplication instead.

strange urchin
#

Yeah, I’ve seen that happen when assembling things from vehicles

little eagle
#

Just never use those addXCargo commands, instead of the Global variants.

still forum
#

addWeaponWithAttachmentsCargoGlobal 😁

little eagle
#

Then there is no problem. The not global variants should be disabled tbh.

peak plover
#

aWWACG

#

addWpnWAttCrgGlbl

#

Still 2 long

#

How to fix that?

strange urchin
#

Eh, it follows the conventions

errant jasper
#

I also recall being somewhat similar issue with BIS arsenal export script. It exports a list of commands right? And then you were supposed to dump it into init.sqf or the initiation line of the unit. And then it worked properly in the magical BIS world who knows only SP?

still forum
#

@lone glade found the bug with my profiler

#
case 0x0: {
    returnCode = coreSigned ? security_class::core : security_class::self_signed;
};
case CRYPT_E_NO_REVOCATION_CHECK:  ...

->

case 0x0: {
    returnCode = coreSigned ? security_class::core : security_class::self_signed;
}break;
case CRYPT_E_NO_REVOCATION_CHECK:  ...

Can you see it?

lone glade
#

wild guess...

#

break

still forum
#

That's how you turn a "all working beautifully" into a "revocation check failed"

#

well atleast that was one bug. I'll just hope it fixes the profiler.

#

I could go home in 2 minutes.. Or I'll look into why the profiler doesn't work.. 🤔

meager heart
#

take a look at it in 2 mikes, after you will be at home 👌

still forum
#

too late

#

also I can't properly dev at home

#

since yesterday only with half broken visual studio and trackpad as mouse

sand pivot
#

I'm casting a wide net here. i'm trying to develop a script that allows multiple players to control the various positions of a UAV/UGV, namely (driver/gunner). Anyone tacked anything like this? More context about what i've done thus far can be found in the this ticket... https://feedback.bistudio.com/T128006

strange urchin
#

Perhaps you can remoteControl one of the UAV AI or something

meager heart
#

Request: Add a new command that returns if a unit is being remote controlled or better yet, states who is remote controlling said unit. (Preferred)
for the first part isUAVConnected also maybe some workaround for the second with getConnectedUAV

#

@sand pivot

sand pivot
#

those return false and null respectively when using remoteControl by itself. My assumption here is they query a variable set by default UAV actions such as UAVTerminalMakeConnection

strange urchin
#

Yes. Probably the best solution is to use addVariable to keep track of who is controlling the gunner

#

Store a reference to the player’s object

#

And in case they disconnect, use isPlayer

sand pivot
#

right, i thought of that, hard part is if they switch between controlling the gunner/driver, i can't update it without some clever scripting utilizing an event hander. Only EH i've found that event tracks this seat switch action is the mission EH "PlayerViewChanged"

strange urchin
#

You can intercept when they try to switch from the action menu

#

Though, I’m not sure about the UAV menu

sand pivot
#

how can i intercept the base action?

strange urchin
#

Just make it return true if the action is switch to UAV gunner or something.

sand pivot
#

i'll run with that a little thanks. that might allow me to update the variable i set

strange urchin
#

Be careful about using the display text of the action

#

If you try to check that, players playing in another language might be able to bypass

#

You can look at the stringtable arma used and just compare the action’s text to the localized text of whatever switch to gunner is

sand pivot
strange urchin
#

Oh, there’s a classname-like thing? That makes it simpler

#

Just make sure you don’t try to set uieventhandler multiple times

#

Because they overwrite eachother

sand pivot
#

roger. this is extremely helpful. thank you!

still forum
#

@lone glade can you test the profiler when you have time? Turns out it was a revocation failure. The revocation list expired on 3rd December and I didn't have auto renew. Shouldn't actually prevent it from working. But maybe it did

#

Was fixed on Intercept master branch but I guess that didn't make it into release
My standalone cert tester accepts the cert ¯_(ツ)_/¯

lone glade
#

i'll test it later today, I need to get around fixing that case sensitive check, i'll compare findif vs count for that

edgy dune
#

is there away to make an addaction run another action? For example what I mean is take for example the advanced rappelling mod. Now Im pretty sure that theres no keybinding for it but the way u activate the rappelling is by gonig to a edge and using the action menu. So my idea was to make an addAction that would have a keybinding using the shortvut parameter(i think its #7) which would then in turn run the rappel action

#

that should help u

west vale
#

`While {

{_x in JNF_GovHeli2} count units group JNF_GovGrp0 > 0;
{_x in JNF_GovHeli2} count units group JNF_GovGrp3 > 0;
{_x in JNF_GovHeli1} count units group JNF_GovGrp1 > 0;
{_x in JNF_GovHeli1} count units group JNF_GovGrp2 > 0;
};

do {

JNF_GovHeli1 setposATL [(getPosATL LandingZone select 0), (getPosATL LandingZone select 1), getPosATL LandingZone select 2];
JNF_GovHeli2 setposATL [(getPosATL LandingZone select 0) + (30), (getPosATL LandingZone select 1) + (30), getPosATL LandingZone select 2];
JNF_GovHeli1 flyinheight 0;
JNF_GovHeli2 flyinheight 0;
};`

still forum
#

Ah. Nice

west vale
#

Can someone please help me with my terrible syntax?

still forum
#

semicolon

#

look at the wiki page for while

west vale
#

so I need to make it 1 condition?

edgy dune
#

u dont need a semi colon for the while I believe

#
While {

{_x in JNF_GovHeli2} count units group JNF_GovGrp0 > 0;
{_x in JNF_GovHeli2} count units group JNF_GovGrp3 > 0;
{_x in JNF_GovHeli1} count units group JNF_GovGrp1 > 0;
{_x in JNF_GovHeli1} count units group JNF_GovGrp2 > 0;
}
``` I believe this is wat dedmen ment
#

and then u have the rest of ur code

verbal knoll
#

@wary vine it happned to me as well XD

west vale
#

Ahhh I see now, thanks!

#

been trying to use in the in built debug console in the editor

west vale
#
While
{
{_x in JNF_GovHeli2} count units JNF_GovGrp0 == 0;
//{_x in JNF_GovHeli2} count units JNF_GovGrp3 > 0;
//{_x in JNF_GovHeli1} count units JNF_GovGrp1 > 0;
//{_x in JNF_GovHeli1} count units JNF_GovGrp2 > 0;
sleep 1;
}

do        
{
JNF_GovHeli1 flyinheight 0;
JNF_GovHeli2 flyinheight 0;
};


Group JNF_GovHeli1 addWaypoint [[0,150,0],0];
sleep (random 2);
Group JNF_GovHeli2 addWaypoint [[0,150,0],0];
JNF_GovHeli1 flyinheight 150;
sleep (random 4);
JNF_GovHeli2 flyinheight 135;```
#

So, my intention -

helicopter is on the ground with rotors spinning stationary.
they are full of 4 groups
When everyone is out of both helicopters - i want them to leave, but until then stay on the ground

#

so it is immediately moving onto the next bit of code

little eagle
#

Also ,```sqf for SQF syntax highlighting.

west vale
#

thanks, learning all the time

drowsy skiff
#

huh? did I get mentioned in here?

still forum
#

yeah. Spammer. repeated offender. FM removed him

lusty canyon
#

i have a holdaddaction with a long duration, how do you stop the action menu from fading out?

meager heart
#

when you will use hold action, do not open scroll menu 😀

edgy dune
#

do the use actions 1-20 under custom controls have DIK keycodes?

meager heart
#

🤔

wary vine
#
_cfunctions = ["Lega_Market","Lega_core"];
{
 _functionConfig = "true" configClasses(configFile >> "CfgFunctions" >> "Lega_Market_Functions" >> _x);
 {

   private _function = format ["lega_fnc_%1",configName _x];
   publicVariable _function;

 }forEach _functionConfig;
} forEach _cfunctions;
``` this is the contents of my serverside pbo, its working to an extent, I am however having issues where I have to log in / out / then in again for some functions to load
worldly locust
#

Best way of deleting from an array during iteration?

still forum
#

_array set [_forEachIndex, nil];

worldly locust
#

I mean a specific element.

still forum
#

Well. Why don't you say what you mean?

#

What element?

worldly locust
#

Odd. Lag.

#

Msgs not together. Must have crappy phone signal

#

So I do a forEach on an array. Do some stuff based on that element. Then if condition is correct I want to remove it.

still forum
#

which is what I just sent you

#

Why is that wrong?

worldly locust
#

I didn't say it was

#

Why are you always so...you? 🤔

#

You're always so aggressive.

still forum
#

Would ask same question.

#

I'm not.

worldly locust
#

Thank you for the help tho.

still forum
#

I'm not very patient at 9PM when I should be sleeping for over an hour

drowsy axle
#

Someone able to help me with some dialog GUI?

queen cargo
#

your problem is already visible in the highlighted syntax @drowsy axle

drowsy axle
#

Would you be able to point it out to me? @queen cargo

queen cargo
#
action = "
            closeDialog 0;
            [
                player,
                "<t color='#636e72'>-- <t color='#6c5ce7'>Commander Menu: <t color='#e17055'>Choose<t color='#636e72'> --",
                player createDialog "CAPCommMenu_dialog";
            ] call C_fnc_giveAction;";```
#

guess why you got that weird non-string coloring

#

unescaped "

#

lemme repeat: unescaped

drowsy axle
#

There's no ""'s missing

queen cargo
#

to escape, you have to use double quotas

drowsy axle
#

Right is that on both sides?

queen cargo
#

and a " in a string HAS TO BE escaped

drowsy axle
#

"" ""

queen cargo
#

no ...

#
"i contain a quota " and this is broken" ```
#
"i am correctly escaped "" and contain a single quota"```
drowsy axle
#

Wouldn't that have two strings and not one whole string?

queen cargo
#

" is the start of a string

#

and the end

#

everything inbetween " and " thus is contained in the string

#

naturally, a " in the string thus will break the string

#

to solve this, you escape thje quota

#

to escape quotas, you use them twice in arma

#

thus an escaped, single quota is ""

#

"foo "" bar" --> foo " bar

drowsy axle
#

Ya know what. I'm just going to use addAction instead of my shitty attempt at GUI's

queen cargo
#
action = "closeDialog 0; [player, ""<t color='#636e72'>-- <t color='#6c5ce7'>Commander Menu: <t color='#e17055'>Choose<t color='#636e72'> --"", player createDialog 'CAPCommMenu_dialog';] call C_fnc_giveAction;";```
#

as long as your actions code is correct, this wil work

meager heart
#
"'you', 'can', 'use', 'single', 'quotes', 'inside', 'double', 'quotes','tho'"
drowsy axle
#

Do single quotes = a string?

queen cargo
#

yes, but in your case you cannot

#

because you want to use a string in a string

#

which means you will have to escape anyways

#

regardless of which quotas you use

meager heart
#

afaik even notepad++ have syntax highlight 🤷

winter rose
#

else, it's only notepad 😄

meager heart
#

😀

drowsy axle
#

Can I do the following?
fn_addAction:sqf param [_obj,_text,_script]; _obj addAction [_text, {_script}];fn_AddItem:```sqf
param [_classname,_item,_by];
player addItemToBackpack _classname;
hint format ["You have been given: '%1' by: '%2'.",_item,_by];``````sqf
_addAction_giveItem_1 =
[
player,
"<t color='#55efc4'>GRANT: <t color='#2d3436'>Command Access",
["alive_tablet","ALiVE Tablet","AI Commander"] call C_fnc_addItem;

] call C_fnc_addAction;

_removeAction_addAction =
[
player,
"<t color='#d63031'>DENY: <t color='#2d3436'>Command Access",
player removeAction 0;player removeAction 1;

] call C_fnc_addAction;```
meager heart
#

you need check wiki for param and params

drowsy axle
#

Have I done something wrong?>

meager heart
#

yes

drowsy axle
#

They should be right

meager heart
#

check wiki

drowsy axle
#

it should be params, correct?

meager heart
#

yep

drowsy axle
#

Sweet. Someone else told me that params are [[, , ,],[, , ,],[, , ,]]. Hence why I used param

#

I cannot do two calls inside each other 😦

meager heart
#

yes someone lol

drowsy axle
#
[
        player,
        "<t color='#55efc4'>GRANT: <t color='#2d3436'>Command Access",
        ["alive_tablet","ALiVE Tablet","AI Commander"]|#| call C_fnc_addItem;

    ] call C_fnc_addAction;```Error at |#| for missiing ]
#

😢

#

ArmA makes me sad sometimes

#

Anyway. I can pass ["alive_tablet","ALiVE Tablet","AI Commander"] call C_fnc_addItem; as a string, and more importantly, out again?

winter rose
#

@drowsy axle at least remove ;

meager heart
#

well you can _unit call tag_fnc_top call tag_fnc_kek; 🤷

winter rose
#

top kek @meager heart

meager heart
#

fixed*

drowsy axle
#

@winter rose I need the ; as it's a script.

#

_obj

#

_text

#

_script

frank vector
#

New to the group boys. ...and girls. Any of you use GIT for workflow?

drowsy axle
#

I did, when I was working with a few other people.

#

NOTE: I used GitHub 😉

winter rose
#

@frank vector I do

frank vector
#

Okay, that's what i use too. New to Arma3 scripting. It's been a promise

winter rose
#

@drowsy axle

[
        player,
        "<t color='#55efc4'>GRANT: <t color='#2d3436'>Command Access",
        ["alive_tablet","ALiVE Tablet","AI Commander"] call C_fnc_addItem     /*  ; */
    ] call C_fnc_addAction;
subtle ore
#

lol fail lou

drowsy axle
#

I don't understand @winter rose However, I knew WHICH ; you was talking about.

tough abyss
#

Performance wise, would it be better to addAction and removeAction when not in use (1second delay between checks) or should i use the condition flag in the addAction

winter rose
#

@drowsy axle
remove it, since you want to use the result with C_fnc_addAction
a ; stops the statement and creates another

drowsy axle
#

Ah true. But that doesn't stop the missing ] before call

#

I could just execVM "fn_addItem.sqf";

#

oh wait it still needs [] before it shit god damn arma

#

I could move the function inside the addaction

#
[
    player,
    "<t color='#55efc4'>GRANT: <t color='#2d3436'>Command Access",
    player addItemToBackpack "alive_tablet";hint "You have been given: 'ALiVE Tablet' by: 'AI Commander'.";
] call C_fnc_addAction;```
#

sjhitttttttt

#

still a fucking []

#

😢

#

I could just hint the damn things fuuuuuuu arma

#

finally..

winter rose
#

ooor go with intermediate variables if it is too imbricated

#

a readable code is coder's friend

#

or sanity's

drowsy axle
#

which ever

#

Do you mean?```sqf
_script = blah;

[
player,
"<t color='#55efc4'>GRANT: <t color='#2d3436'>Command Access",
_script;
] call C_fnc_addAction;

#

making a function of a function... lol

#

C_fnc_callAction

#

actually THAT wouldn't work... 😦

#

I give up

meager heart
#

did you tried to check wiki, for anything from what you was using in that ^... thingy, Capwell ?

winter rose
#

you keep putting this semicolon… your syntax is the first thing that -must- be right, you will hopefully) see the other errors easier

#

@drowsy axle , would C_fnc_addAction happen to take code as a third parameter?

#

if so, code is represented between { these thingies }, hence the correction:

[
    player,
    "<t color='#55efc4'>GRANT:</t> <t color='#2d3436'>Command Access</t>",
    { player addItemToBackpack "alive_tablet" ; hint "You have been given: 'ALiVE Tablet' by: 'AI Commander'."; }
] call C_fnc_addAction;
meager heart
#

probably need write that function too 😄

drowsy axle
#

fnc_addAction:```sqf
params [_obj,_text,_script];
_obj addAction [_text, {_script}];

meager heart
#
C_fnc_addAction = {
    params [
        ["_unit", objNull, [objNull]],
        ["_string", "", [""]], //--- what for _string ¯\_(ツ)_/¯
        ["_code", {}, [{}]]
    ];
    _unit call _code;
};
winter rose
#

so code

drowsy axle
#

ahhhhh mind blown

#

What are the extra [{}] / []'s for? @meager heart

meager heart
#

did you checked wiki for params ?

#

if yes you know that this is [variableName, defaultValue, expectedDataTypes]...

drowsy axle
#

that's what that means.... oh

#

lol

#

So How would I call the above fnc?

meager heart
#

🙄

drowsy axle
#

:/

unborn ether
#

@drowsy axle Well thats a strange question, you should read call|spawn|execVM

drowsy axle
#

.......

winter rose
drowsy axle
#

people need to understand that read the wiki is one thing. Understanding what the wiki means in a certain context isn't always clear.

wary vine
#

i have been looking through the gui scripts , but cant find anything

meager heart
#

Bahadur is handled by himself

wary vine
#

.<

#

I mean the gui

#

I tried just duplicating the dialog.

little eagle
#

What are you trying to do?

wary vine
#

I was going to make an id system, using the players face

drowsy axle
#

Is: ```sqf
C_fnc_addAction = {
params [
["_unit", objNull, [objNull]],
["_string", "", [""]], //--- what for string ¯_(ツ)
["_code", {}, [{}]]
];
_unit call _code;
};


-- fn_addAction.sqf:

this:```sqf
params [
        ["_unit", objNull, [objNull]],
        ["_string", "", [""]], //--- what for _string ¯\_(ツ)_/¯
        ["_code", {}, [{}]]
    ];
    _unit call _code;```

or:```sqf
params [
        ["_unit", objNull, [objNull]],
        ["_string", "", [""]], //--- what for _string ¯\_(ツ)_/¯
        ["_code", {}, [{}]]
    ];```

or this:```sqf
C_fnc_addAction = {
    params [
        ["_unit", objNull, [objNull]],
        ["_string", "", [""]], //--- what for _string ¯\_(ツ)_/¯
        ["_code", {}, [{}]]
    ];
    _unit call _code;
};
little eagle
#

No idea what that has to do with the identity menu.

wary vine
#

I want the face part xD

little eagle
#

Oh, the rotating face?

wary vine
#

yus

#

it uses RscObject , but I tried duplicating the face into a dialog, nothing happens, and there is nothing within the script that goes with the display that I can see

little eagle
#

Most menues are hard coded. Outside 3den.

wary vine
#

@drowsy axle what are you trying to do ?

#

outside 3den ?

little eagle
#

3den has some scripted menues, but the main menu, settings, etc. is all hard coded.

drowsy axle
#

@wary vine d read up for about 600+ hours...

wary vine
#

😦

#

I was hoping to duplicate it, im guess it still can be done.

little eagle
#

Idk if, and if idk how.

meager heart
#

maybe something in ui_f about that head 🤔

little eagle
#

No.

wary vine
#

i have looked xD

#
    class objects
    {
        class Head: RscObject
        {
            model = "\A3\ui_f\objects\face_preview";
            modelWoman = "\A3\ui_f\objects\face_preview";
            idc = 109;
            type = 80;
            x = "35.8 *                     (            ((safezoneW / safezoneH) min 1.2) / 40) +         (safezoneX + (safezoneW -                     ((safezoneW / safezoneH) min 1.2))/2)";
            y = "6.6 *                     (            (            ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) +         (safezoneY + (safezoneH -                     (            ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
            z = 0.38;
            xBack = 0.75;
            yBack = 0.9;
            zBack = 0.25;
            scale = 0.21;
            direction[] = {0,0,1};
            up[] = {0,1,0};
            faceType = "Man_A3";
            selectionLBrow = "lBrow";
            selectionMBrow = "mBrow";
            selectionRBrow = "rBrow";
            selectionLMouth = "lMouth";
            selectionMMouth = "mMouth";
            selectionRMouth = "rMouth";
            selectionEyelid = "eyelids";
            selectionLip = "LLip";
            boneHead = "head";
            boneLEye = "l_eye";
            boneREye = "r_eye";
            boneLEyelidUp = "eye_upl";
            boneREyelidUp = "eye_upr";
            boneLEyelidDown = "eye_lwl";
            boneREyelidDown = "eye_lwr";
            boneLPupil = "l_pupila";
            boneRPupil = "r_pupila";
            selectionPersonality = "personality";
            selectionGlasses = "eyelids";
        };
    };
#

only thing I can find.

winter rose
#

\A3\ui_f\objects\face_preview seems to be the p3d yes

wary vine
#

tried it xD

winter rose
#

you could try createSimpleObject to check (I think it werkz)

wary vine
#

just a plain object

#

but then you cant setFace on it ?

winter rose
#

maybe a createVehicle "Head", I really don't know

wary vine
#

ikr xD

#

Ill work something out

meager heart
#

you can get player face with

wary vine
#

yeah

#

its the preview im trying to get working rn

meager heart
#

glhf

wary vine
#

Gunna do a work around.

unborn ether
#

@wary vine Play with setMimic to get more freaks for yourself.

#

Well anyways, that's still better than any Mass Effect Andromeda facial expressions.

plush cargo
#

@wary vine not sure about the model for head but im doing a rotating obj rn. Here's the rotated code if interested

while {ctrlShown _modelCtrl} do
{
    _vectorDirAndUp = ctrlModelDirAndUp _modelCtrl;
    _vectorDir = _vectorDirAndUp select 0;
    _newVector = [_vectorDir,0.5] call BIS_fnc_rotateVector2D;
    _modelCtrl ctrlSetModelDirAndUp [_newVector,(_vectorDirAndUp select 1)];
    sleep 0.02;
};

https://youtu.be/RYW-2EBCq_k

unborn ether
#

A little advice to use sleep (1/(diag_fps min 60)) as a basis of rotation delay (change values for smoothness) instead of sleep 0.02as its twitching a bit.

plush cargo
#

the twitching only happens when recording (my processor is shit) but im sure that way is better so ill use it, ty

still forum
#

I'm glad I wasn't here last night. Some people just never learn and refuse to read wiki.

little eagle
#

It will always twitch because sleep 1 means sleep 1+ seconds, not sleep 1 second and diag_fps or any other command will not fix it.

half inlet
#

what would be the best way to determine whether a given object (can be a building or a vehicle) has physics? I feel like this should be a simple solution, but I can't come up with anything short of detecting whether the position/velocity changed at all, which would be unreliable

#

actually I could probably use isKindOf, but I'm a little concerned if I use a certain parent class that not all static objects inherit from it

austere granite
#

getText (configFile >> "cfgVehicles" >> typeOf _vehicle >> "simulation")

#

probably?

still forum
#

isKindOf ThingX or CarX or HelicopterX

#

or if the simulation string ends with an x

austere granite
#
private _sim = getText (configFile >> "cfgVehicles" >> typeOf _vehicle >> "simulation");
private _hasPhysics = (_sim select [count _sim - 1, 1]) == "x";
#

that would be that then

half inlet
#

perfect, that'll do the trick - thanks!

#

in other news, for those aware that _obj setPosASL (getPosASL _obj) will move objects around when they are in a slope (which, imo isn't exactly intuitive), I just came up with a workaround

#

apparently you have to reset the orientation of the object (direction and vectorUp) before moving it around, meaning you can do this:

_obj = cursorTarget;
_vecF = vectorDir _obj;
_vecU = vectorUp _obj;

_obj setVectorUp [0,0,1];
_obj setDir 0;

_pos = getPosASL _obj;
_obj setPosASL _pos;

_obj setVectorDirAndUp [_vecF, _vecU];

which will not move the object

#

this is useful for mission persistence where you want to save objects that players placed or used (whether it's structures or vehicles) and you need them to spawn in precisely at their previous position

lone glade
#

^ oor, or you use posATL instead of ASL

half inlet
#

tried that, even _obj setPosATL (getPosATL _obj) moves stuff

#

anyhow I'll try and implement it into kp_liberation to see if it helps with player built FOBs getting scrambled upon mission restart

still forum
#

does setPosWorld also move stuff?

austere granite
#

no

#

posATL and ASL also move

#

getPosWorld / setPosWorld is reliable

half inlet
#

well, TIL getPosWorld is a thing

lone glade
#

what do you mean move, you mean the object get rotated?

half inlet
#

I'll give that a shot see if it also affects orientation

#

no, with getPosATL and getPosASL the object moves in space, usually down the slope that it is placed on

#

orientation seems to remain unchanged

lone glade
#

eeerm... that's normal tho

half inlet
#

in hindsight it makes sense, since the position that is fetched with getPosATL/getPosASL moves with the orientation of the object

#

it didn't make sense until you pointed out that getPosWorld exists

lone glade
#

worldPos format was made long after ATL / ASL / AGLS

half inlet
#

so yeah, I guess that's another trivial issue sorted out 😛

little eagle
#

getPosX just reports a three dimensional array. setPosX is what adjusts the object to the terrain.

austere granite
#

it doesnt make sense

#

_obj setPosASL (getPosASL _obj) shouldnt move it

#

but when it's pitched/banked it will

lone glade
#

^ because the bounding box is also rotated

#

world pos uses the model center

austere granite
#

sure but the getter and setter should use the same coordinate system

little eagle
#

They do.

lone glade
#

they do ^

little eagle
#

getPos / setPos don't though.

austere granite
#

getPos is such a shit command

half inlet
#

yeah, that's what I meant - getPosATL/getPosASL seems to fetch a point that is not at 0 height above ground, but rather somewhere in the middle of the bounding box (?), which means when the orientation of the object changes (relative to the ground contact point), there is a lever arm between the two points, meaning the object moves

#

I could totally draw this on a whiteboard but I can't put it into words

lone glade
#

you don't like the AGLS format? huehuehue

austere granite
#

i like it less than you like atom

lone glade
#

AGLS is worse than ASLW because people use it at least 😄

little eagle
#

Cre8or, it's a point of the LandContact LOD. Middle of the object is World.

half inlet
#

myeah, I knew I had that wrong, I was just hoping to get the point across

little eagle
#

World should've been named ModelCenter.

lone glade
#

modelToModelCenterVisualModelCenter

#

huehuehuehuehue

austere granite
#

👌🏻

#

getPosThatDoesntSuck

winter rose
#

Real_*_Final2

little eagle
#

modelToWorldModelCenter would've made more sense than modelToWorldWorld.

lone glade
austere granite
#

@still forum can you add that command in intercept

#

thanks

lone glade
#

best command ever 😄

little eagle
half inlet
#

hahaha what, that's a thing?

lone glade
half inlet
#

okay, that one I knew about because of typos

#

but ASL2 couldn't've been an accident

little eagle
#

It was supposed to work like setPosWorld does now.

still forum
#

@austere granite Which? That doesn't suck? sure. But I think that returns same as getPosWorld or modelToWorldWorld

meager heart
#

modelToWorldWorldVisialWorldWorld 😔

little eagle
#

good post

meager heart
#

thank you

meager heart
#

😢

peak plover
#

What gives?

#

This is the object

#

For some reason

#

I can't get the type of this object

#

I want to re-create this object via script

#

How do I do it?

strange urchin
#

Some terrain objects simply don’t have classnames, if that makes sense

peak plover
#

How do I re-create it? via createVehicle

strange urchin
#

That’s why we have things like “ROCK”,”ROAD” when finding terrain objects

peak plover
#

I am doing a script

#

That will save and re-load the AO

#

I want this fence to be reloaded as well

#

How do I createVehicle this fence without knowing it's callsname?

unborn ether
#

So no typeOf cursorObject?

peak plover
#

Nope

#

No typeOf works

#

I can get p3d path

unborn ether
#

Use p3d data to create it

peak plover
#

But simple objects don't have damage

#

How do I create it and maintaing ability to handle damage?

unborn ether
#

Well if it has no classname - you can't, I don't remember something else that creates it by a modelpath.

peak plover
#

damn

unborn ether
#

Anyways that's strange, since missing classname is kinda a property on terrain-like only objects..

strange urchin
#

Well, that’s what makes them terrain-only, right?

unborn ether
#

Still the same vehicles.

peak plover
#

Yeah

#

Well

#

By default the fence takes damage

#

And I can't recreate it with damage

unborn ether
peak plover
#

Wud be annoying if it's reloaded and can't be destroyed (simple object)
Wud be slightly less annoying if it's broken the 2nd time I play it

unborn ether
#

Maybe you'll find something similar

#

If its vanilla

peak plover
#

It's an automatic script

#

I'm not gonna look for a replacement for every single object LMAO 😄

#

Or even every type

unborn ether
#

I don't even get what's the cruel plan you are building there 😄

peak plover
#

Basically

#

It's a round based mission

#

Every round the map resets

#

So you don't have to reload the mission

unborn ether
#

So you process and replace the basic map objects?

peak plover
#

Start with only mission objects, but I soon realized I need to do map objects as well

#

I don't do roads or bushes, but mostly everything

unborn ether
#

Well thats huge work there

peak plover
#

not really

unborn ether
#

I'd be better creating a map with terrain stuff and then make SQM based on your assets chains.

meager heart
#

maybe you can try something with objectID 🤔

peak plover
#

?

#

I don't even know how to grab objectID

#

I'll just save the ones that are not typeOf '' and that'lld have to do... until something better appears like simple objects with damage 😮

meager heart
#

you can check it from the editor

unborn ether
#

simple objects will never be so

peak plover
#

No, it's automatic

unborn ether
#

thats why they are simple

peak plover
#

Less-simpler objects pls

#

@still forum make it happen

still forum
#

no

unborn ether
#

😦

peak plover
#

😭

unborn ether
#

😄

strange urchin
#

nerd

still forum
#

I'm making other cool stuff happen :3

peak plover
#

intercept less-simple objects wen

unborn ether
#

createLessSimpleObjectABitPlease

peak plover
#

Man I was hoping there was another command to create shit with p3d, but nah. I guess simple objects are also the only way to use mission specific models

meager heart
#

createLessSimpleObjectABitPleaseWorldVisualWorld 😭

unborn ether
#

Intension of simple objects was to create some background environment, so no one ever touches that, like for cutscenes. This lessens the load on actual mission.

peak plover
#

Yeah

#

Well

#

They are fine for stuff that are not fences that you can run over

#

Like rocks

#

That will never simulate

unborn ether
#

As been told its just easier to ignore that, either to create own map.

peak plover
#

Or in certain gamemodes like dayz-alike-copies that don't neccesarly require you do destroy buildings. So you can have bigger towns etc.

meager heart
#

btw is that sahrani map, nigel ?

#

yes...

#

or there are the same...

#

gate Land_plot_zed_drevo1_branka and walls have no classnames 😀

still forum
#

And I need to find a way to get shorter names. Instead of always displaying the full file path

austere granite
#

split \ arraypeek

#

EZZZZZZZZZ

#

although that's super confusing, because 500 same function names

still forum
#

I only have the post-preprocess code and filepath of the script function. And I somehow need to get a readable name out of that

#

If your script has scriptName in it then it'll work. But CBA only does that in debug mode. So I have nothing to hold onto if you run CBA in release mode

#

Can also immediately see how much of a certain frame is spent running unscheduled scripts

#

the big green areas in the framelist on top is CBA_fnc_cachedCall. Quite heavy when it actually has to reload the data.

halcyon crypt
#

that looks sexy! 😃

austere granite
#

You look sexy

halcyon crypt
#

thanks man, so do you ofc 😁

winter rose
#

noice!

meager heart
#

looks 👌

lusty canyon
#

how can you get the magazine objects from reloaded EH? or how can i get the new/old magazines based on mag ID?

austere granite
#

there is no magazine object

little eagle
#

Dedmen, you mean ACE_common_fnc_cachedCall?

still forum
#

uh jup

#

I already know how I'll get better names out of that. So that I don't make such mistakes again

wary vine
#

amarite in saying you need true; at the end of a keyhandler ?

little eagle
#

No.

wary vine
#

o.O

#

its not working for me.

#
  _display displaySetEventHandler ["KeyDown", format ["_this call %1",_keyPressed]];
  _display displaySetEventHandler ["KeyUp", format ["_this call %1",_keyReleased]];
  _keyPressed = {
    params ["","_dik","_shift","_ctrl"];
    if (_dik isEqualTo 42) then {Lega_Plantables_Setup_Shift = true};
    if (_dik isEqualTo 29) then {Lega_Plantables_Setup_Ctrl = true};
  };

  _keyReleased = {
    params ["","_shift","_ctrl"];
    if (_dik isEqualTo 42) then {Lega_Plantables_Setup_Shift = false};
    if (_dik isEqualTo 29) then {Lega_Plantables_Setup_Ctrl = false};
  };
little eagle
#

Where is this executed from?

wary vine
#

cant even press escape when i have pressed a key

little eagle
#

You sure _display isn't just null?

wary vine
#

the display is open

#

if (isNull _display) exitWith {};

little eagle
#

I said, are you sure _display isn't null. Not if the display is shown. Use systemChat str to confirm / debug.

#

Btw., you should just use:

_display displayAddEventHandler ["KeyDown", _keyPressed];
_display displayAddEventHandler ["KeyUp", _keyReleased];

because what you're doing now hurts physically.

wary vine
#

that doesnt work for me ?

#
  _display displaySetEventHandler ["KeyDown", _keyP>
18:17:40   Error position: <displaySetEventHandler ["KeyDown", _keyP>
18:17:40   Error Type code, expected String
little eagle
#

Read again what I wrote.

#

Set != Add

wary vine
#

oh

#

add, not set.

little eagle
#

Also, do the systemChat str thingy, not just try things blindly.

wary vine
#

yup

#

sorted

peak plover
#

@still forum whoa that's very cool

little oxide
#

setObjectTextureGlobal work with r2t ?

still forum
#

yes

little oxide
#

so JIP client will see r2t

#

?

still forum
#

yes

meager heart
#

effects for all cameras commands are local, why setObjectTextureGlobal for r2t... 🤷

still forum
#

yeah you need the camera on every machine

#

but as long as you have that. You only need a single setObjectTextureGlobal

open tendon
#

what if i use attachto on a local object?

#

will it still be a local obj?

#

attachto is global

still forum
#

yes

open tendon
#

ok ty👌

open tendon
#

im using cfgsounds but changing volume doesnt seemt o do anytihng....

#

class v2r1
{
name = "v2r1";
sound[] = {music\1.ogg, db - 20, 1.0};
titles[]={};
};

#

-20, 0, 20, 100 tried it all the same

#

using a mono 11025 hz 16bit file

little eagle
#

Try absolute numbers for the volume, not a string.

meager heart
#

sampling rate maybe

open tendon
#

Thanks il try tomorrow

wary vine
#

minimalistic, but has what it needed

small iron
#

Is there a way to run a line of code when a condition has changed (ex. player has changed positions)

wary vine
#

?

#

example ?

small iron
#

A player changes position in the map, runs a hint that says "player has moved"

wary vine
#

o.O

small iron
#

okay maybe I explained it wrong

#

mb

wary vine
#

im confused , like anim Position .. or if a player is x distance away from last position

small iron
#

The latter

wary vine
#

for loop,

#

storing last pos as var

#

gmmie 5 ill finish game then write example

small iron
#

Ok quick ques

#

Is there a different way other than using loops?

subtle ore
#
while{alive player} do
{
    private _pos = getPos player;
    if !((getPos player) isEqualTo _pos) then
     {
          //code
     };
};
#

No

small iron
#

Damn.

#

That really sucks.

#

Okay, thank you.

wary vine
#
private _pos = getpos player;
for "_i" from 0 to 1 step 0 do {
  sleep HOWOFTENYOUWANTTOCHECK;
  if ((player distance _pos) >= YOURDISTANCE) then {
    _pos = getpos player; // reset _pos
    //Run Code.
  };
};

#

something like that maybe.

#

@subtle ore whats _x in yours mean ?

subtle ore
#

typo

wary vine
#

xD

#

thought so, think mine would be a little more efficient right ?

subtle ore
#

corrected

#

not sure

wary vine
#

yours loops with no sleep whilst the player is alive, mine sleeps for x seconds infinitly .

#

50/50 xD

little eagle
#

Bugged, the second private should not be there.

wary vine
#

my bad

#

was playing overwatch at the same time xD

vapid drift
#

I'm having trouble with a GUI... just starting down this path. When called, it displays the way I would expect but the data doesn't update. Is there something glaringly obvious I'm missing?
RscTitles.hpp

class RscTitles {
    class TFR_IP68 {
        idd = 230401;
        duration = 1e+1000;
        fadein = 0;
        fadeout = 0;
        name = "TFR_IP68";
        onLoad = "uiNamespace setVariable ['TFR_IP68_idd', _this select 0]";
        controls[] = {
            "TFR_IP68_background",
            "TFR_IP68_windCur"
        };

        class TFR_IP68_background: RscPicture
        {
            idc = 2304011200;
            text = "ui\IP68_d.paa";
            x = 0.0075786 * safezoneW + safezoneX;
            y = 0.534375 * safezoneH + safezoneY;
            w = 0.255234 * safezoneW;
            h = 0.45375 * safezoneH;
            colorText[] = {1,1,1,1};
        };
        class TFR_IP68_windCur: RscStructuredText
        {
            idc = 2304011100;
            text = ""; //--- ToDo: Localize;
            x = 0.0875 * safezoneW + safezoneX;
            y = 0.64245 * safezoneH + safezoneY;
            w = 0.0464063 * safezoneW;
            h = 0.020625 * safezoneH;
            colorBackground[] = {0,0,0,0};
        };
    };
};

And the function that opens it:

disableSerialization;
cutRsc ["TFR_IP68", "PLAIN"];

while { true } do {
    _display = uiNamespace getVariable "TFR_IP68_idd";
    _windCur = parseNumber ([eyePos ACE_player, true, true, true] call ace_weather_fnc_calculateWindSpeed toFixed 1);
    _display displayCtrl 2304011100 ctrlSetStructuredText parseText format ["<t align='center' color='#e0e0e0'>%1</t>", _windCur];
    sleep 0.5;
};
#

The RscTitle shows but the structured text remains empty

little eagle
#

1e+1000
This number is way too big.

vapid drift
#

Snagged it off a forum somewhere... better number in mind for indefinite?

little eagle
#

1e9 is like 11 days, so that should be enough.

vapid drift
#

lol

#

I don't know man... what about the 12th day though?

little eagle
#

Likewise with 2304011200. Those are bigger than 1E7 and therefore will probably not be referenced correctly due to rounding errors.

vapid drift
#

Ah, ok, wasn't aware that would be a problem

#

it was just a unique number scheme

little eagle
#

You could just use 10+ for idc. The only reserved numbers are 1 and 2 for OK and Cancel buttons.

vapid drift
#

I don't really understand the system completely, is there no issue with multiple controls from other mods sharing an IDC?

#

or is the idd the key here

little eagle
#

The idc only have to be unique for the same display. Your display only has two controls.

vapid drift
#

Ok, I'm with ya now. I thought the IDCs had to be globally unique

little eagle
#

The display itself doesn't even need an idd, since you refer to it by variable you set in ui namespace / onLoad.

vapid drift
#

yeah, that was left over, it should actually be -1

#

but that makes a lot of sense, I wasn't aware if functioned that way

little eagle
#

That's the default, may as well just delete the entry.

vapid drift
#

ok, yeah, good point

#

thanks man, that was helpful

little eagle
#

Otherwise lgtm.

vapid drift
#

Yeah, that did it

#

although, when I removed the line for the idd, it generated an error

#

Putting it back in at -1 eliminated it

little eagle
#

Right. Maybe that's a thing for RscTitles. I never use that.

vapid drift
#

either way, thank you. I was beating my head against a wall on that one

little eagle
#

All numbers are floats in Arma. Anything above ~10 million will break sadly.

vapid drift
#

good to know

stone yarrow
#

hey what do u guys use to script (other than notepad)

subtle ore
#

Atom + language-sqf package

stone yarrow
#

thx

subtle ore
#

Atom breaks under large files though, so don't use it for anything like dumps or rpts lol

wary vine
#

Atom for scripting posiden tools for rpt

#

@vapid drift pretty sure the IDC's are unique to the display so as commy said 10+

vapid drift
#

Yeah, it's working as intended now

#

Thanks

stone yarrow
#

what exactly is and rpt

wary vine
#

The format of arms logs

#

Arma*

stone yarrow
#

yeah I just got arma and did a bit of the tutorials I mainly got it to learn to script

hearty plover
#

I need a trigger, the executes once, for each player, that triggers it. Can I not add a evenHandler to do this instead?

#

The trigger needs to fire when any player leaves it's area, needs to be repeatable.

#
  • PLayer spawns.
  • Player leaves trigger area
  • PLayers loadout is saved
stone yarrow
#

can anyoen hop in a voice chat real quick wit me to give me an intro to scripting

hearty plover
#

I would, but I am about to play with my group.

stone yarrow
#

k

vapid drift
#

Is it possible to reference a model in a config file from another mod? Meaning is it possible to use one of the models from ACE for a custom item without having to inherit the class?

vapid drift
#

Well I know it's possible but for whatever reason I can't figure it out. Seems like it should be much easier than I'm making it

modern sand
#

just set the model directory to the p3d from ACE???

still forum
#

@vapid drift yes.

vapid drift
#

@modern sand I tried but I don't think I had the path right. Tried several things and always got an error that the p3d wasn't found

still forum
#

what path did you use

modern sand
#

Yer

vapid drift
#

I tried a few:
\ace\ace_atragmx\...
ace\ace_atragmx\...
ace\addons\ace_atragmx\...

#

several others

#

those first two should have had an underscore also

modern sand
#

You just use the pbo name

vapid drift
#

tried that as well

#

\ace_atragmx\data<name>.p3d

#

can't remember off hand but I tried it

modern sand
#

\pboname\modelname.p3d

#

Depending on where the model is inside of the pbo

still forum
#

yeah. all wrong

#

no pboname won't work at all

modern sand
#

Yer

still forum
#

z\ace\addons\atragmx\...

vapid drift
#

z?

still forum
#

yes.

vapid drift
#

I meant I don't doubt you lol of all people, but what's reasoning for that?

still forum
#

Standards back from Arma2. Lots of reasons to do it

#

easy patchability was the original thing I think

vapid drift
#

alright well, good deal

#

thanks man, I appreciate it

still forum
vapid drift
#

son of a...

still forum
#

If there is a $PBOPREFIX$ then that's the prefix aka file path of everything in that pbo

#

you can also open the PBO in notepad++ and you'll see the prefix right at the top

vapid drift
#

well that will simplify some things in the future

peak plover
#

Are there any other ways to hide a unit than hideObject? setObjectTextureGlobal doesn't hide all of it (offroad)

still forum
#

If every texture has a hiddenSelection then setObjectTexture can do it

#

usually that's not the case though

little eagle
#

setPos it under ground.

winter rose
#

or setPos [0, 0, 10e10] hehe

still forum
#

ono

vapid drift
#

Is there something specific to do with dialogs and RscTitles to include all of the base classes? The tutorials I was following said that if they were setup in config files they would pull from the game directly?

#

I'm getting this error now :
No entry 'bin\config.bin/RscTitles/TFR_IP68/TFR_IP68_windCur.type'.

The section it refers to:

        class TFR_IP68_windCur: RscStructuredText
        {
            idc = 1100;
            text = ""; //--- ToDo: Localize;
            x = 0.0875 * safezoneW + safezoneX;
            y = 0.64245 * safezoneH + safezoneY;
            w = 0.0464063 * safezoneW;
            h = 0.020625 * safezoneH;
            colorBackground[] = {0,0,0,0};
            shadow = 0;
        };
little eagle
#

Is this for a mission or addon?

vapid drift
#

addon

#

earlier I was making everything in the mission for simple testing, now I'm trying to convert it over

peak plover
#

If I setpos underground it's losess it usefulnes

little eagle
#

You need to add A3_Ui_F to requiredAddons if you inherit from a base class of A3_Ui_F e.g. RscStructuredText.

vapid drift
#

damn, alright. I need to just call it a night. I'm skipping simple things

little eagle
#

Can you post your config? I have a suspicion of what's wrong.

vapid drift
#

It's split into multiple pieces... what specifically did you want to see?

little eagle
#

RscStructuredText

vapid drift
#

then maybe that's something else I'm doing wrong? I just reference it the one time class RscStructuredText;

little eagle
#

Post it.

vapid drift
#

I told you man, it's not that simple

#
#define TEast                0
#define TWest                1
#define TGuerrila            2
#define TCivilian            3
#define TSideUnknown        4
#define TEnemy                5
#define TFriendly            6
#define TLogic                7

#define private                0
#define protected            1
#define public                2

#define ReadAndWrite        0
#define ReadAndCreate        1
#define ReadOnly            2
#define ReadOnlyVerified    3

#define true                1
#define false                0

enum {
    DESTRUCTENGINE = 2,
    DESTRUCTDEFAULT = 6,
    DESTRUCTWRECK = 7,
    DESTRUCTTREE = 3,
    DESTRUCTTENT = 4,
    STABILIZEDINAXISX = 1,
    STABILIZEDINAXESXYZ = 4,
    STABILIZEDINAXISY = 2,
    STABILIZEDINAXESBOTH = 3,
    DESTRUCTNO = 0,
    STABILIZEDINAXESNONE = 0,
    DESTRUCTMAN = 5,
    DESTRUCTBUILDING = 1,
};

class CfgPatches {
    class TFR_Equipment {
        units[] = {
            "TFR_Bag_CarryallBlack",
            "TFR_HALO_Jumper",
            "TFR_HALO_Jumper_Black",
            "TFR_HALO_Pilot",
            "TFR_IP68",
            "TFR_BL500"
        };
        weapons[] = {
            "TFR_Uniform_HAPS",
            "TFR_Uniform_HAPS_Black",
            "TFR_Vest_HABA",
            "TFR_Helmet_HAPH",
            "TFR_Item_IP68",
            "TFR_Item_BL500"
        };
        requiredVersion = 0.1;
        requiredAddons[] = {
            "Extended_EventHandlers",
            "A3_Ui_F"
        };
    };
};

class CfgFunctions {
    #include "\tfr_equipment\functions.hpp"
};

class CfgWeapons {
    #include "\tfr_equipment\weapons\cfg_includes.hpp"
};

class CfgVehicles {
    #include "\tfr_equipment\vehicles\cfg_includes.hpp"
};

class CfgGlasses {
    #include "\tfr_equipment\glasses\cfg_includes.hpp"
};

class RscTitles {
    #include "\tfr_equipment\RscTitles.hpp"
};
little eagle
#

Help me, I don't see RscStructuredText anywhere.

vapid drift
#

The first part of RscTitles.hpp:

class RscPicture;
class RscStructuredText;

class TFR_IP68 {
    idd = 230401;
    duration = 1e9;
    fadein = 0;
    fadeout = 0;
    name = "TFR_IP68";
    onLoad = "uiNamespace setVariable ['TFR_IP68_idd', _this select 0]";
    controls[] = {
        "TFR_IP68_background",
        "TFR_IP68_windCur",
        "TFR_IP68_windMax",
        "TFR_IP68_windAvg",
        "TFR_IP68_tempCur",
        "TFR_IP68_tempMax",
        "TFR_IP68_tempAvg",
        "TFR_IP68_humCur",
        "TFR_IP68_humMax",
        "TFR_IP68_humAvg",
        "TFR_IP68_barCur",
        "TFR_IP68_barMax",
        "TFR_IP68_barAvg",
        "TFR_IP68_time"
    };

    class TFR_IP68_background: RscPicture
    {
        idc = 1200;
        text = "";
        x = 0.0075786 * safezoneW + safezoneX;
        y = 0.534375 * safezoneH + safezoneY;
        w = 0.255234 * safezoneW;
        h = 0.45375 * safezoneH;
        colorText[] = {1,1,1,1};

        // ["0.0075786 * safezoneW + safezoneX","0.534375 * safezoneH + safezoneY","0.255234 * safezoneW","0.45375 * safezoneH"]
    };
    class TFR_IP68_windCur: RscStructuredText
    {
        idc = 1100;
        text = ""; //--- ToDo: Localize;
        x = 0.0875 * safezoneW + safezoneX;
        y = 0.64245 * safezoneH + safezoneY;
        w = 0.0464063 * safezoneW;
        h = 0.020625 * safezoneH;
        colorBackground[] = {0,0,0,0};
        shadow = 0;
    };
little eagle
#

Ah.

#

wait...

still forum
#

RscStructured text is not a subclass of RscTitles is it?

little eagle
#

RscStructuredText is a root level class. You created a new class RscTitles\RscStructuredText which is different and empty and inherited from that instead and of course it's empty.

// requiredAddons A3_UI_F
class RscStructuredText;

class RscTitles {
    class MyDisplay {

        class MyControl: RscStructuredText {

        };
    };
};

Same for RscPictures.

vapid drift
#

Ah ok, so it needs to be outside

still forum
#

I told you man, it's not that simple ¯_(ツ)_/¯

vapid drift
#

ok, that makes sense

#

lol

#

my apologies sir

little eagle
#

Well, not really. It's not something that I'd design that way.

#

But that's how it works.

vapid drift
#

more errors but that's good enough for tonight. Thanks to both of you guys. Really do appreciate it

next lily
#

Question- on the topic of weapon pylons, is there a way to get what weapon is on what pylon?
And/or the pylon of the missile you'd fire if you left clicked right then and there?

little eagle
#

Don't see why not.

winter rose
obsidian chasm
#

Anybody ever had issue with [player, [missionNamespace, "inventory_var"]] call BIS_fnc_saveInventory; it's seems like it doesn't always work for me, i can die 15 times and then randomly I'll spawn as a different soldier.

strange urchin
#

Does it spawn you with the rifleman loadout of your faction?

obsidian chasm
#

Ye it works perfectly fine on launch, it just suddenly after x amount of respawns, spawns as the object it is in eden

#

I have no idea how to fix this other than making the exact unit myself as an addon or something but I have zero idea how to even do that

#

it's killed my mission completely lol

little eagle
obsidian chasm
#

How does that work commy

little eagle
#

Are the examples not enough?

obsidian chasm
#

sadly no

#

I'm clearly not as versed as you

little eagle
#

Dunno how to help. I could just repost what's on the wiki, but what's the point?

obsidian chasm
#

lol forget it man

#

sorry for not understanding it... i wish i wasn't so new

#

but what can you do you know?

strange urchin
#

What’s probably happening is the loadout is getting saved while you respawn. During respawn, your character probably has the default loadout of their class

exotic tinsel
#

is it possible to change the call signs in the lobby for a multiplayer server?

queen cargo
#

there is the scripted lobby of @little eagle

vapid drift
#

So I've got this to probably about 80% right now. When I use the action to open it, it opens and toggles the ACE action appropriately but it has a horrible lag spike of about 3-5 seconds before displaying the RscTitle. Then, it doesn't update the data.
When I had this as just a script out of a mission it all functioned fine.
https://pastebin.com/VU5UDGYt

still forum
#

And CBA can also do that. yes

vapid drift
#

So apparently I'm missing something in this area:

    _display displayCtrl 1112 ctrlSetStructuredText parseText format ["<t size='.75' align='center' color='#%1'>%2:%3</t>", _fontColor, _hour, _minute];
    
    sleep 0.1;

I get a Error Generic error in expression but I literally haven't changed anything in this except the item that it checks for

little eagle
#

Post the full error from RPT.

lone glade
#

maybe, just maybe use parenthesis

little eagle
#

Eh, overrated.

vapid drift
#

lol

little eagle
#

The RPT says more than that line. And it is needed to see what to fix.

vapid drift
#

ok honestly I didn't even know that

#

and since I'm pretty sure you have pointed out this specific error I've made before... I'm gonna go ahead and not post what it says

#

lol

#

if I could buy you a beer for your patience I would though

little eagle
#

I wanted to say something snarky about patience and virtue bla bla, but I lost my train of thought somewhere and now idk where I was going with it.

vapid drift
#

lol

little eagle
#

Multiple setVariable public in a sleep 0.1 loop is a bad idea btw.

vapid drift
#

I'll own the issue, I was calling the function instead of spawning

#

How would I optimize that then?

little eagle
#

Not doing it, or at least increasing the delay.

vapid drift
#

would it be better to store all of that data in an array so that it's only "set" and "get" once each loop?

little eagle
#

You'd still send up to 10 arrays per second per connected player.

vapid drift
#

hmm, yeah. Well, now that I think about it, every time it exits the loop it erases the data so I really don't even need to store it on the player do I? I mean it's not accessed from anywhere but inside the loop

little eagle
#

Well currently you send it to every other connected machine for no apparent reason.

vapid drift
#

yeah, ok

queen cargo
#

@lone glade there is no need for paranthesis
tree is perfectly fine:

SQF;0;148;_display displayCtrl 1112 ctrlSetStructuredText parseText format ["<t size='.75' align='center' color='#%1'>%2:%3</t>", _fontColor, _hour, _minute];
        NA;0;0;
                BINARYEXPRESSION;0;0;
                        BINARYEXPRESSION;0;0;
                                VARIABLE;0;8;_display
                                BINARYOP;9;11;displayCtrl
                                NUMBER;21;4;1112
                        BINARYOP;26;21;ctrlSetStructuredText
                        UNARYEXPRESSION;48;99;
                                UNARYOP;48;9;parseText
                                UNARYEXPRESSION;58;89;
                                        UNARYOP;58;6;format
                                        ARRAY;65;82;["<t size='.75' align='center' color='#%1'>%2:%3</t>", _fontColor, _hour, _minute]
                                                STRING;66;52;"<t size='.75' align='center' color='#%1'>%2:%3</t>"
                                                VARIABLE;120;10;_fontColor
                                                VARIABLE;132;5;_hour
                                                VARIABLE;139;7;_minute```
little eagle
#

there is no need for paranthesis
woke

queen cargo
#

in this particular case

lone glade
#

in a week:
"wait a second...."

meager heart
#

is that even work format ["<t size='.75' align='center' color='#%1' ?

#

color ^

lone glade
#

ofc

little eagle
#

Don't see why not.

winter rose
#

don't forget to close the brackets and quotes ^^

vapid drift
#

Was AFK

#

@meager heart yeah, it works fine

#

Is there a part in particular you're wondering about?

meager heart
#
_display displayCtrl 1112 ctrlSetStructuredText parseText format ["<t size='.75' align='center' color='#ff0000' >%1: %2:%3</t>", _fontColor, _hour, _minute];
vs
_display displayCtrl 1112 ctrlSetStructuredText parseText format ["<t size='.75' align='center' color='#%1'>%2:%3</t>", _fontColor, _hour, _minute];
vapid drift
#

well, in the first one, it would show _fontColor as part of the text

little eagle
#

_fontColor could be "ff0000" though.

vapid drift
#

in the second one, it sets the color to the value of _fontColor

meager heart
#

yeah... that is interesting way for me 😀

vapid drift
#

I modify the color of the text and the background image based on SunOrMoon and currentVisionMode so it looks right

#
    switch (currentVisionMode ACE_player) do {
            case 0: {
                if (SunOrMoon < 0.2) then {        // Night
                    _fontColor = "6e6e6e";
                    _bgImage = "IP68_n";
                } else {                        // Day
                    _fontColor = "e0e0e0";
                    _bgImage = "IP68_d";
                };
            };

            case 1: {
                if (SunOrMoon < 0.2) then {        // Night
                    _fontColor = "1fbd63";
                    _bgImage = "IP68_nvg";
                } else {                        // Day
                    _fontColor = "bcbcbc";
                    _bgImage = "IP68_thrm";
                };
            };

            case 2: {
                _fontColor = "bcbcbc";
                _bgImage = "IP68_thrm";
            };
    };
meager heart
#

i mean the syntax for the format

little eagle
#

You never used format before?

meager heart
#

i did, not like that ^

ember oak
little eagle
#

It's not format that handles the color. format just creates the string with html syntax for parseText.

#

parseText is what makes STRUCTURED TEXT out of the html syntax STRING.

#

Ermen07, you can't.

meager heart
#

rgr

ember oak
#

or the shape

#

isn't possible?

meager heart
#

i mean, passing variable in to color, never saw that way...

little eagle
#

No, buttons are always rectangles and can't be tilted.

#

It's just normal string manipulation. Nothing unusual about that.

wide kayak
#

Ermen07 you can't

vapid drift
#

@little eagle Can't you just use overlapping images with alpha values and check the mouse position?

little eagle
#

Yea, that's probably how the thing in the screenshot is done.

#

If that even is something functional and not just art.

vapid drift
#

yeah, good point

#

it would be a pain mapping out the proper mouse positions for each "button"

little eagle
#

Eh, just some math.

vapid drift
#

I don't speak that language

little eagle
#

The shapes are simple enough for it to be relatively quick.

#

Very basic 2d vector math.

vapid drift
#

I'm a prison guard

little eagle
#

Math is indiscriminate. It's the same regardless of your wealth or status.

vapid drift
#

agreed, but the frequency that it pops up in my daily life is limited to when I'm butchering scripts in Arma

lone glade
#

which is plenty enough^

vapid drift
#

lol ouch

lone glade
#

vector math can be done by everyone

little eagle
#

The prison can guard itself. That's what the steel bars are for.

lone glade
#

math doesn't resolve itself.... wait... wait a second

austere granite
#
params [["_pos", [0, 0], [[]]], ["_posSecond", [0, 0], [[]]]];

if (count _posSecond < 3) exitWith { false };

if ((_pos select 0) < (_posSecond select 0)) exitWith { false }; // Left of pos
if ((_pos select 1) < (_posSecond select 1)) exitWith { false }; // Above pos

if ((_pos select 0) > ((_posSecond select 0) + (_posSecond select 2))) exitWith { false }; // Right of pos
if ((_pos select 1) > ((_posSecond select 1) + (_posSecond select 3))) exitWith { false }; // Bottom of pos

true;

First argument is getMousePosition, second argument is ctrlPosition _ctrl

#

ez

lone glade
#

ai intensifies

vapid drift
#

lol you would be surprised what an un-supervised individual and some dental floss can accomplish on metal bars

austere granite
#

use something like ```sqf
params ["_control"];
private _controlPos = ctrlPosition _control;
private _controlParent = ctrlParentControlsGroup _control;
while { !isNull _controlParent } do {
private _parentPos = ctrlPosition _controlParent;
_controlPos set [0, (_controlPos select 0) + (_parentPos select 0)];
_controlPos set [1, (_controlPos select 1) + (_parentPos select 1)];
_controlParent = ctrlParentControlsGroup _controlParent;
};

_controlPos

#

(So call that instead of ctrlPosition)

lone glade
#

I'll have to pull out the 🗞 adanteh

little eagle
#

Adanteh, this probably doesn't work for rotated controls or triangle shapes like in the concept art.

austere granite
#

ah

#

see i didnt see picture

#

so

#

i will leave

#

o/

little eagle
#

Bye, lol

lone glade
#

triangle controls? you mean weird polygons? huehuehue

little eagle
#

A triangle is a weird polygon.

austere granite
#

use inPolygon huehuehue

little eagle
#

You probably could abuse inPolygon for this actually. 🤔

austere granite
#

yep

little eagle
#

As long as there are no rounded edges of the pseudo buttons.

#

sides*

#

I like the inPolygon idea.

austere granite
#

i like you

little eagle
#

Same.

#

It's funny, because the guy that asked this probably already left because they didn't like the answer.

ember oak
#

nono i'm here

vapid drift
#

lol

ember oak
#

but i think i will do a picture and the a invisibile buttons 😅

#

too much complicated

meager heart
#

do not give up that fast lol

wary vine
#

ezpz

#

create a picture control, in the config, duplicate the size and position elements, and turn it into a button 😃

little eagle
#

That will not work. Please check out the posted picture before making suggestions.

outer scarab
#

I'm trying to add functionality to this script to destroy all buildings of 3 specific classnames, in addition to applying sethit to random building components.if (isServer) then { { for "_i" from 1 to 2 do { _x sethit [format ["dam%1",_i],selectRandom [0,1],false]; _x sethit [format ["dam %1",_i],selectRandom [0,1],false]; }; } forEach ((markerpos "DE1") nearObjects ["house",600]); };

This works, randomly damaging buildings in the radius.
When it comes to targeting those specific buildings to setdamage 1 on, this is what I've tried to no success

{
    {
        _killhouses = Land_House_K_1_EP1,Land_House_K_5_EP1,Land_House_L_1_EP1;
            for "_i" from 1 to 4 do {
                _x sethit [format ["dam%1",_i],selectRandom [0,1],false];
                _x sethit [format ["dam %1",_i],selectRandom [0,1],false];
                _killhouses setdamage [1,false];
            };
    } forEach ((markerpos "DE1") nearObjects ["house",600]);
};```
```_killhouses = format ["%1", ["Land_House_K_1_EP1","Land_House_K_5_EP1","Land_House_L_1_EP1"]];
if (isServer) then
{
    {
            for "_i" from 1 to 4 do {
                _x sethit [format ["dam%1",_i],selectRandom [0,1],false];
                _x sethit [format ["dam %1",_i],selectRandom [0,1],false];
            };
    } forEach ((markerpos "DE1") nearObjects ["house",500]);


    {
            for "_i" from 1 to 4 do {
                _x setdamage [1,false];
            };
    } forEach ((markerpos "DE1") nearObjects [_killhouses, 1000]);
};```
subtle wigeon
#

what do i need to add to this to make it a vitual arsenal

#

_Cargo = createVehicle ["B_supplyCrate_F", position _parachute, [], 0, 'NONE'];

still forum
subtle wigeon
#

// add your items here
_Cargo addAction ["Open Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}];

obsidian chasm
#

Anybody have experience creating units via Orbat, ive followed every step and I just can't get my units to show up in game.

subtle ore
#

@obsidian chasm Are you talking about BiS ORBAT Viewer or ALiVE

obsidian chasm
#

Alive, sorry. I didnt know there were others

subtle ore
obsidian chasm
#

Aye, watched videos on it as well

#

I wonder if I'm failing on the addon/pbo part as far as I know I'm doing it properly

subtle ore
#

if you're loading ALiVE and CBA I don't think so

obsidian chasm
#

Ye.. I copied the things the guy in the video told me to the autogen.hpp and cfgpatches.hpp I then packed them into a pbo , placed the @myfaction folder into arma 3 directory and then loaded local mod

#

yet what I created does not show

#

I feel like I've missed a step somewhere because I've done exactly what I'm reading

outer scarab
#
    _KH = format ["%1", ["Land_House_K_5_EP1","Land_House_L_1_EP1","Land_House_K_1_EP1"]];
    {
            for "_i" from 1 to 2 do {
                _x sethit [format ["dam %1",_i],1,false];
            };
    } forEach ((markerpos "DE1") nearObjects ["_KH",600]);
};``` I'm not getting any script errors from this, but it still isn't destroying those buildings. Tried with _x setdamage [1,false] too
still forum
#

It takes one typename

#

_KH is not a valid typename

#

And an array of valid typenames is also not one typename

#
{
    {
            for "_i" from 1 to 2 do {
                _x sethit [format ["dam %1",_i],1,false];
            };
    } forEach ((markerpos "DE1") nearObjects [_x,600]);
} forEach ["Land_House_K_5_EP1","Land_House_L_1_EP1","Land_House_K_1_EP1"]

outer scarab
#

Thanks, I'll give that a go. This is what I'd just tried forEach ((markerpos "DE1") nearObjects ["Land_House_L_1_EP1",600]);

little eagle
#

nearObjects only lists mission objects, not terrain objects.

outer scarab
#

Interesting, the earlier part of the script works despite using nearobjects

#
{
    {
            for "_i" from 1 to 2 do {
                _x sethit [format ["dam%1",_i],selectRandom [0,0,1],false];
                _x sethit [format ["dam %1",_i],selectRandom [0,0,1],false];
            };
    } forEach ((markerpos "DE1") nearObjects ["house",600]);
};
{
    {
        {
            for "_i" from 1 to 2 do 
                {
                _x setdamage [1,false];
                };
        } forEach ((markerpos "DE1") nearObjects [_x,600]);
    } forEach ["Land_House_K_5_EP1","Land_House_L_1_EP1","Land_House_K_1_EP1"];
};``` in its entirety. Still doesn't destroy the listed buildings
still forum
#

Yeah

#

because that code is never executed

#

{...}; You create a CODE type value. And just discard it again

#

Remove the left most braces

outer scarab
#

I'll have to keep an eye out for that, now it works. Thanks for your help @still forum

#

The only reason I needed to do that in the first place is cause those buildings have some weird bug, only a unit's gear (minus uniform) is visible from the outside looking in or vice-versa

still forum
#

CUP?

outer scarab
#

Yeah

still forum
#

A uniform is not gear (loong story)

outer scarab
#

That's the playermodel as far as the game's concerned right?

still forum
#

yeah

outer scarab
#

I wanted to know if someone had managed to fix that, but after this it'd have been the wrong time to ask lol

still forum
#

No way to fix that besides fixing cup

outer scarab
#

Done, surprised it hadn't been caught before, it's been happening for a few months

river meteor
#

If I want to retrieve a variable from the client when they disconnect how would I do that? I have a event handler for seeing when they disconnect, but I don't believe I can remoteExec to a disconnected client

little eagle
#

You can't. The moment they disconnect it's too late.

river meteor
#

I figured. I guess I'll just track the variable on the server side

unborn ether
#

@Manason#7990 Its better to store that kind of stuff in some database

river meteor
#

@unborn ether it is stored in a database, but to edit the data I need it on the client, when they disconnect I want to update the database with the new data

winter rose
#

save frequently, not on disconnection event or you can always have issues with unexpected events (client crash, etc)

unborn ether
#

@river meteor You can just save stuff on some events ^, like InventoryOpened or when RscDisplayInterrupt (ESC menu) gets active, etc. Frequent enough and not flooding events.

#

@river meteor Or you can just make some delay counter and use it everywhere possible. This will give more consistency with some flood protection.

outer scarab
still forum
#

@outer scarab 22. do not post URL links w/o short description of what it is , anywhere

little eagle
#

I don't get it.

wary vine
#

anyone know anything about

_pos = player getRelPos [10, 0];
_tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
_tank setPos (_pos vectorAdd (getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));

_tank hideSelection ["zasleh", true];
_tank hideSelection ["zasleh2", true];
_tank hideSelection ["clan", true];
 
_tank animate ["Wheel_podkoloL3", 0.5, true];
_tank animate ["Wheel_podkoloL6", 0.5, true];
``` syntax not working on a server?
little eagle
#

_tank setPos (_pos vectorAdd (getPosWorld _tank vectorDiff (_tank modelToWorld [0,0,0])));
tf?

wary vine
#

its from the wiki

little eagle
#

So what's wrong. There is a tank in your vid.

wary vine
#

that was from the second syntax

little eagle
#

Maybe it's your debug console.

wary vine
#

apparently the tank is there , but invisible ...

#
 
_pos = player getRelPos [10, 0]; 
_tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
player setpos (getpos _tank);
systemChat format ["%1",_tank];
little eagle
#

_tank hideSelection ["zasleh", true];

#

Google what "zasleh" means.

wary vine
#
_pos = player getRelPos [10, 0]; 
_tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
player setpos (getpos _tank);
systemChat format ["%1",_tank];
``` this is what im using now.
#

still same issue.

little eagle
#

player setpos (getpos _tank);

#

_tank setPosASL getPosASL player

#

?

wary vine
#

ok that worked.

#

dafuq was the issue there.

little eagle
#

The whole setPos thing you use is weird.

#

Tank's probably stuck under ground.

wary vine
#

i was just using the stuff on the wiki to start, works fine in editor.

#

but not on the server

little eagle
#

Editor, what map?

wary vine
#

all

#

tried tanoa, altis, and vr

little eagle
#

idk, looks bizarre to me.

wary vine
#

yh

#

its only so I can use simpleobjects for my farming system, instead of classnames xD

#

wouldn't have worked, but now they added set/get var on simple objects , it will 😃

little eagle
#

re:

_pos = player getRelPos [10, 0]; 
_tank = createSimpleObject ["a3\armor_f_beta\apc_tracked_01\apc_tracked_01_rcws_f.p3d", _pos];
player setpos (getpos _tank);
systemChat format ["%1",_tank];
#

getRelPos reports AGL, or really just z=0 always.

#

CSO requires ASL or ASLWorld with model paths.

wary vine
#

ahh

little eagle
#

So the object is created at sea level inside the terrain.

#

getPos reports AGLS, so for objects stuck under ground z is probably 0 or negative.
setPos being AGL would put you on top of the terrain for 0, dunno about negative.

wary vine
#

so you have to create it with ASL, but then you can use normal setPos to move it ?

little eagle
#

No.

obsidian chasm
#

Damn, spent a while learning how to use orbat alive, turns out i just get so many errors from my custom soldiers. fuck this game man

meager heart
#

is that for custom groups ?

#

"orbat alive" < this

obsidian chasm
#

ye, just get some weird errors

#

i just wanted them to work like any normal soldier because my mission wont save inventory

#

i just give up, its demoralising

little eagle
#

weak

meager heart
#

my mission wont save inventory
getUnitLoadout ?

obsidian chasm
#

i have no idea how to go about that

#

i mean will it even fix my issue?

#

the inventory saves using save inventory/load inventory just sometimes on respawn it changes to the default soldier

#

it can go 19 respawns without randomly switching also

meager heart
#

🤔

winter rose
#

if I may ask here, does anyone have experience with bikb commands, aka kbTell, kbAddTopic etc? I need help to fill the biki. please @ me or contact me at #community_wiki . Thanks!

little eagle
#

Sounds like a race condition, Victus. I bet it's the scheduler. It's always the scheduler.

obsidian chasm
#

would that first comment possibly be what might work?

#

i cant get on now to try it, thats all

meager heart
#

Call the script [] execVM "gearSpawn.sqf"; from init.sqf.
no 😀

#

first comment ^

obsidian chasm
#

😦

little eagle
#

The script in the post is a mess. Looks like someone threw shit at the wall hoping it sticks.

obsidian chasm
#

thats my plan

little eagle
#
  1. ctrl+a, delete, so broken code doesn't interfere
obsidian chasm
#

params ["_newUnit", "_oldUnit"];
if (isNull _oldUnit) exitWith {};
_newUnit setUnitLoadout (getUnitLoadout _oldUnit);

#

what about that

little eagle
#

2,

// initPlayerLocal.sqf
params ["_unit"];

_unit addEventHandler ["killed", {
    params ["_unit"];

    private _loadout = getUnitLoadout _unit;
    _unit setVariable ["commy_respawnLoadout", _loadout];
}];

_unit addEventHandler ["Respawn", {
    params ["_unit"];

    private _loadout = _unit getVariable "commy_respawnLoadout";
    _unit setUnitLoadout _loadout;
}];
#

respawnTime has to be > 0 for this to work.

obsidian chasm
#

hm, how come?

little eagle
#

Otherwise respawn eh triggers before killed eh.

obsidian chasm
#

my mission is escape so being downed and revived etc

#

i mean I guess I could set respawn delay to 0 lol

#

if thats what i have to do

little eagle
#

It has to be > 0, not 0.

obsidian chasm
#

oh shit sorry

#

tired

little eagle
#

greater than

#

lol

obsidian chasm
#

ye i know lol

meager heart
#

do you have respawn templates there ?

#

i mean loadout is script or config ?

obsidian chasm
#

the loadout is via script

meager heart
#

well ... commy knows de wey ^ 😀

obsidian chasm
#

hopefully this works because I cant be bothered if not

#

its so tiresome being unable to do stuff like this when you have zero idea why

#

lol nope, still spawning as the default soldier

#

🤣

meager heart
#

how you add your loadouts ?

obsidian chasm
#

through a script in initplayerlocal apparently

wary vine
#
player playmoveNow (selectRandom ["Acts_TreatingWounded01","Acts_TreatingWounded02","Acts_TreatingWounded03","Acts_TreatingWounded04","Acts_TreatingWounded05","Acts_TreatingWounded06"]); 
``` just checking, this should work for anims right ?
meager heart
#

@obsidian chasm show it

obsidian chasm
#

thats without commys stuff, obviously

meager heart
#

BIS_fnc_addRespawn inventory < that thing required config loadout

#

in your case, first loadout in that config will be uns_men_USMC_68_MED

obsidian chasm
#

so where is that located?

#

i mean i must have it i just dont know what it is

meager heart
#

did you copied that from BIS mission ?

obsidian chasm
#

ye i did

#

a while ago

meager heart
#

check description.ext in that BIS mission, you will find there something like #include "Loadouts.inc" or #include "LoadoutClasses.inc"

unborn ether
#

Or just better create your own functions.

meager heart
#

yes ^

obsidian chasm
#

i have // Player loadouts
#include "LoadoutClasses.inc"

meager heart
#

make your own

obsidian chasm
#

are there any tutorials on how to do that?

#

please

#

i remember a while back i tried changing that stuff but it didnt seem to have any effect

meager heart
#

i have no idea about tutorials

obsidian chasm
#

ah ok, so if i can figure out how to change this, itll fix my issue?

#

or is this a shot in the dark lol

#

im at wits end honestly

meager heart
#

ah ok, so if i can figure out how to change this, itll fix my issue?
yes

obsidian chasm
#

well, big frustrating day ahead of me

#

thanks for taking the time to help me

meager heart
#

glhf

hearty plover
#

Why use that instead of onPlayerRespawned?

#

@little eagle

unborn ether
#

@obsidian chasm The best way is to study SQF from scratch.

unborn ether
#

Interesting, if you can actually wait for setVariable result besides just diffing the data before and after?

little eagle
#

lol nope, still spawning as the default soldier
Of course you spawn as the default soldier. The script makes it so you respawn with what you had when you died.

#

You're still just throwing shit at a wall. You probably have some script error in your mission that prevents everything else from working. I said step 1 is to ctrl+A delete. Make a new mission, add my script, and you'll see that it works.

#

Why use that instead of onPlayerRespawned?
Why use onPlayerRespawned instead of the simpler eventhandler?

obsidian chasm
#

you realise I spawn as a different guy, right?.. so me spawning as the default guy isnt good

#

@little eagle

little eagle
#

Your mission is borked, mate.

obsidian chasm
#

So the other guy lied?

#

or are you just being an arse for no reason lol

#

@little eagle

little eagle
#

What? Your mission is evidently broken. First step I'd do is checking the RPT's.

obsidian chasm
#

it was working fine last year

#

only recently has this been happening

#

but ye i can see you're kind of hard to deal with, kind of odd but whatever

#

it is what it is

little eagle
#

Code I gave you works 100%. If it doesn't for you, then you made a mistake or the problem is somewhere else. Check the RPT's.

obsidian chasm
#

we already came to the conclusion that it is loadclasses..

meager heart
#

conclusion should be "do not copy paste crap" and more important do not copy paste things when you have no idea what they doing... make things yourself from scratch and you will have less frustration... so far everything what you showed from that mission and your scripts, can be described with

commy2 💩💩 - Today at 02:03
Looks like someone threw shit at the wall hoping it sticks.
Victus_Mortuus - Today at 02:03
thats my plan
#

^ also probably "greatest quotes update" there 😄

obsidian chasm
#

it's almost as though I'm trying to learn something kind of hard with zero prior knowledge and just getting told it's "easy" etc

#

i wonder if you guys were ever new or just born with the ability to mod arma and stuff lol

#

🤣

still forum
#

I already knew how to program when I got into Arma

#

If you know the basics then it's really all easy stuff

meager heart
#

i started with scripting in different game, with different language, had 0 experience with "programming for games"... in arma first scripting happened for me in a1 times... but something serious/complex only after a3 release... still noob, but i'm trying 🤷

obsidian chasm
#

congratulations, it's as though other people are different

#

who'd have thought

mellow obsidian
#

Victus haven't read the context here at all but are you trying to learn sqf or?

cosmic kettle
#

@obsidian chasm there is no easy way here. Either find/pay someone or learn it yourself from scratch indeed. Everyone has his/her story on why we do it, but it all comes down to the same. We all one day wanted to create something.
Except commy, he fell in a tub of sqf while young.

obsidian chasm
#

I'm trying to learn bits every day

#

hard to learn chinese though lol

meager heart
#

nihao ma

cosmic kettle
#

your comparison is semi-correct. You can easily compare this to a genuine language. You learn to speak it by talking to others. By yourself you only get so far.

winter rose
#

while totally neutral to this conversation, ^ I like the comparison

obsidian chasm
#

and I am trying, you realise I knew literally nothing about all of this last year but jumped into the deep end because my friends and I enjoyed Tanoa escape so I thought "damn a ww2 escape would be sweet" so I made it

#

it's extremely hard to communicate on here since I don't know half the things you lot are saying majority of the time

#

so me explaining things also gets muddled very quickly

cosmic kettle
#

When in doubt, google it. If that results in nothing, ask. People will happily help if the question is well constructed

still forum
#

SQF is much more readable than other languages.

mellow obsidian
#

Usually its hard for the people trying to explain something to know what level they should explain it on.

#

^
That is true

still forum
#

SQF is plain english. But there are other languages which really are chinese

#

Like brainfuck

cosmic kettle
#

Dedmen, You are assuming everyone speaks English in that statement.

still forum
#

Well. Everyone who is in this discord does indeed speak english

mellow obsidian
#

But If you have low skill level I recommend just having some fun in the debug console and having the rpt open

cosmic kettle
#

It's very readable to us, Frenchies could have a harder time.

obsidian chasm
#

Least I finally fixed my issue

#

now only one issue left lol

#

it never ends does it

meager heart
#

fix it

mellow obsidian
#

One does not simply play without RPT errors

still forum
#

#DebuggerThatAutomaticallyBreaksAtError

#

#GoodOldTimes

nocturne basalt
#

Hi guys. I have a weird problem, and I dont think this have been attempted before. Here goes...

Im spawning 50mx50mx50m boxes on memorypoints.

Im using this script to do so

#
private ["_ship"];

_ship = _this select 0;
_ship setFeatureType 2;

for "_i" from 1 to 749 do
{
    _mempoint  = format["Component%1", _i];
    _box = "TIOW_geo_box_50m" createVehicle (position _ship);
    _boxSpawn = _ship selectionPosition [_mempoint, "Memory"];
    _box setPos (_ship modelToWorld [_boxSpawn select 0,_boxSpawn select 1,_boxSpawn select 2]);
    sleep 0.005;
};
#

for some reason, half the boxes spawn alot further up than the rest

still forum
#
private ["_ship"];

_ship = _this select 0;

->
params ["_ship"];

nocturne basalt
#

its not a function. just an init script

obsidian chasm
#

@meager heart will do when i figure out the issue lol

still forum
#

Doesn't change my argument ^^

nocturne basalt
#

it works to some extent, but around half spawn further up than where the memorypoint actually is

still forum
#

Could it be that the ones that spawn higher up are the ones that spawned after some boxes already existed below them?

nocturne basalt
#

hm, I have 749 mempoints each with individual names

still forum
#

Yeah that is the problem

nocturne basalt
#

oh