#arma3_scripting

1 messages ยท Page 324 of 1

jade abyss
#

Not very helpfull at all.

zenith edge
#

but the response time after I responded badly was much faster, u can call it a logical fallacy, but I don't know what that term means

jade abyss
#

i call it nonsense.

#

There are enough false claims around, no need for further bs.

little eagle
#

Dscha doesn't need help looking bad

jade abyss
#

โ˜

zenith edge
#

so arma makes a variable global if u have no _ before it, that is interesting

jade abyss
#

Global != Public

little eagle
#

people respond faster if you start giving bad advice

@zenith edge That doesn't qualify as logical fallacy because it isn't even an argument. It's just one premise.

zenith edge
#

but if you read what I said, I said I don't know what that term means

still forum
#

I would've answered right away. But I only check Discord every few minutes. Makes no difference if somebody gives bad advice or no advice

zenith edge
#

but I am still trying to interpret dscha, why am I using the term global wrong

little eagle
#

There are a lot of pedantic people. Maybe some of them are more likely to respond to errors than respond to asks for help.

zenith edge
#

a variable that is accessable throughout the program

jade abyss
#

Who said that?

zenith edge
#

well you corrected me, twice

jade abyss
#

I did?

little eagle
#

The problem is that global variable simply is a shitty term in a MP based environment, because it refers to multiple concepts.

jade abyss
#

It is, yeah.

zenith edge
#

hmm, since I don't know sqf context, mine would be refering to, available across the entire mission in all scopes

#

unless you mean

#

localizd

#

as in across all clients

#

and sessions

limpid pewter
#

i don't see any code, i thought this was a scripting channel ๐Ÿ˜›

jade abyss
#

_abc = Local Var, vanishes when script is done.
abc = globalVar, stays until end of round for example
abc = 1; publicVariable "abc"; = spread across all Connected Machines.

zenith edge
#

then I wasn't even thinking about localization

still forum
#

available across the entire mission in all scopes and that's wrong. there are scopes in which the variable might not be available

#

But that's going to far ๐Ÿ˜„

little eagle
#

name one example

still forum
#
MyVar = true;
with uiNamespace do {
  //different scope
  if (isNil "MyVar") then {
    systemChat "not defined";
  };
};

Will output "not defined" although we defined MyVar right at the beginning

little eagle
#

It is still available if you use this syntax:

missionNamespace getVariable "MyVar"
still forum
#

That's true.

little eagle
#

And therefore what you said is false.

zenith edge
#

yea, i don't sqf really, so I didn't know arma 3 used global and public as global per client, and global across all clients/server

#

thought it was just local and global

jade abyss
#

what?

little eagle
#

"global per client" ๐Ÿ˜‚

jade abyss
#

Rephrase that pls, that makes no sense^^ yea, i don't sqf really, so I didn't know arma 3 used global and public as global per client, and global across all clients/server

zenith edge
#

each client would be a seperate instance of the program?

#

so it is available across all scopes, within that instance?

jade abyss
#

Local, Global = Client only
Public = Var spread across the Net, setting every GlobalVar XYZ on each Machine.

zenith edge
#

global being a generic term for all

little eagle
#

global variables are by default local to one machine

zenith edge
#

I'm using global in 2 ways

#

as the word

#

and the term

#

in same sentance

little eagle
#

public global variables are global (same on all machines).

#

Yes, I know.

#

But "global per client" makes no sense.

#

It's a contradiction.

zenith edge
#

so global, across all scopes on client. And global, across all scopes, across multiple machines.

#

depending on what you define the whole as

jade abyss
#

No.. public.

zenith edge
#

again, the word

little eagle
#

I wouldn't use the adjective global outside of "global variable".

zenith edge
#

and the term

jade abyss
#

Public = everyone
Global = On my Machine
local = On my Machine in that scope.

zenith edge
#

are seperate things

little eagle
#

To refer to global variables

zenith edge
#

you know you can use the word global in a context not relating to ther term global

#

lol

jade abyss
#

Long Story short: Shitty naming.

zenith edge
#

yes

#

because if we are talking public

little eagle
#

local = on my machine in that script instance
private = on my machine in that script instances scope and all it's child scopes.

zenith edge
#

access modifier

#

if we aren't talking about sqf

#

and talking variables

#

which is why I was confused

#

when you said public

little eagle
#

I would abandon all knowledge of other languages when thinking about SQF :S

jade abyss
#

Public -> Sets GlobalVar XYZ on all Machine to its value.

zenith edge
#

I am learning

#

wacky sqf things

still forum
#

There aren't really public global Variables though
You can execute a command to send your value of the variable to other clients in Multiplayer. But that doesn't make the variable Public. It's still a local global variable

jade abyss
#

What Commy said. ignore everything.

#

Yes Ded^^

little eagle
#

Dedmen is technically right, but it helps to have "public global variable" as a concept when doing MP stuff.

still forum
#

So there are really only global/local variables. And SQF provides a way to send a copy of your global variable to other clients

jade abyss
#

It's more or less just "Hey, update this Var. I don't care what you do after that"

zenith edge
#

lol, this got into nitpicking wording when I just pointed out I learned sqf has 3 layers and not 2

little eagle
#

It's not nitpicking. It's all basic stuff.

jade abyss
#

Unless you update it with publicVar again (wich is ... ah fk this... -.-)

zenith edge
#

you nitpicked me using both the word global, and the term global

jade abyss
#

Because it was wrong

little eagle
#

^

zenith edge
#

global is an adjective

jade abyss
#

Doesn't matter in sqf

zenith edge
#

you assumed context that wouldn't make sense instead of context that does make sense

#

so nitpicking

jade abyss
#

Turn around, run against a wall, sqf was born.

little eagle
#

I just said I wouldn't use it like you did, because it leads to confusion. Which leads to bugs.

jade abyss
#

โ˜

narrow musk
#

๐Ÿถ

zenith edge
#

I was hoping I wasn't talking to the lowest denominator so I could used complex sentances ๐Ÿ˜ƒ

#

and noone

#

could misinterpret

#

mmm

#

I spelt that wrong

#

there

#

besides, I have a white name, noone should trust me anyway

little eagle
#

Now that is a logical fallacy.

zenith edge
#

I have a bad tendancy to beleive in people

#

I try not to

#

how closely does BE watch sql queries and returns from extdb3?

#

would it block certain returns?

#

would be nifty to change code of the mission mid mission ๐Ÿ˜ƒ

still forum
#

It doesn't do anything

#

so.. 0% closely

zenith edge
#

kewl

#

I was hoping that was the case

#

seems like you could do interesting things to missions by modifying DB that mission pulls from

#

while mission is running

still forum
#

If mission is badly coded and doesn't sanitize inputs.. then sure

zenith edge
#

?

#

idk what you mean

#

I mean like being able to manage the game from a webpage.

#

by changing fields in the DB

#

mission checks the change, and implements code to effect game

#

without you ever launching game

#

things like that

#

or live updates to pricing

#

without having to load server with newer version

#

of the mission

#

and if mission is capable of compiling code and running it while game is running via a string, you could have some functions that can be bugfixed via DB, instead of updates to mission code

still forum
#

Yeah.. You can do all that. You can also just load scripts from a textfile that you can edit live.. Or write your own Extension to do whatever you want. Or just use Intercept and implement your own Server manager with direct access to SQF

frosty cave
#

and when you do the last one, make a linux .so for it please ๐Ÿ˜‰

zenith edge
#

good to know dedmen, I was assuming it could. I'd like to develop a website that will balance and control game live while game is going/etc

#

since mission I play has a lot of units, and having people touch code to adjust balance

#

is bad

#

rather they touch a website

#

that everyone can view

#

that has access

#

DB's seem good for that

#

easy to filter/add/remove/etc balance via SQL

#

it would've sucked if I had started writing the code and idea wasn't possible ๐Ÿ˜ƒ

still forum
#

After what you said already it sounds like you are more a C/C++/Java programmer than SQF right?

zenith edge
#

ya

still forum
zenith edge
#

i looked at it vaguely once and thought it was great idea

#

but i wasn't modding

#

I am doing some help with a mission atm

#

and thought, man, they need some tools

#

๐Ÿ˜ƒ

#

going into an sqf file to change balance seems silly when you are managing so many different items

queen cargo
limpid pewter
#

hey, hopefully quick question. when and how often, is "thisList" updated upon a trigger activation? Is it constantly updated, or only once as it is activated?

#

btw, to anyone that was helping me before with the regen script, i got it to work

little eagle
#

Triggers is every 0.5 seconds, no?

limpid pewter
#

idk, im the one asking hehe

#

i can probably test that tho, now that i know that it does update periodically.

#

@little eagle sorry just one more question since you seem to know some stuff about triggers. If i were to spawn a script with the trigger activation. Could i then use this: ```sqf
_objArray = _thisList;
or this
_objArray = thisList;

#

to obtain the array of object? or would i need to pass some params into the function within the activation feild of the trigger?

nocturne bluff
#

[_thisList] execVM/ or call xxxx

_objArray = _this select 0; or better params ["_objArray"];

mild pumice
#

i can do it with player setdamage 0.5 but i don't want to modify his health

still forum
#

You can probably do it with setHitpointDamage

queen cargo
mild pumice
#

ok it's working with setHitpointDamage thanks

player setHitPointDamage ["HitLegs",0.5];
still forum
#

@queen cargo He is holding his right leg because it hurts so much

tough abyss
#

Could be done without setHitPointDamage by forcing the proper animation

little eagle
#

Show how to.

still forum
#

Use the onAnimationChanged eventhandler. And if the player tries to walk replace it by the hurt walk animation. Easy. But kinda hacky. Hurts performance a tiny bit. And IMO too much work to get something done that can be done easier

little eagle
#

Has anyone ever tried this? I see a ton of potential problems with this.

#

If something is "possible", but not feasible, then you might as well say it's not possible.

jade abyss
#

Replacing the Anim?

little eagle
#

Yeah, but this is #arma3_scripting so it's implied to be done without config changes.

jade abyss
#

hmm

little eagle
#

And I don't think ALWAYS limping would be the desired solution.

queen cargo
#

Hurts performance a tiny bit animations are barely swapped at all
impact with a simple if (_anim != "foobar") then switchmvoe "foobar" is ignorable

#

biggest problem should be different weapons need different moves

#

and using the wrong one renders the weapon unusable unless swapped twice

still forum
#

That is what i meant by tiny.
Also I'd expect such a short eventhandler to be coded in place. Meaning it's the if and switchmove and compiling all that everytime the eventhandler is executed even if the animation doesn't match

queen cargo
#

the latter actually can be harmfull

#

using switchmove or any other animation command doing that can break certain actions completly

#

they might fixed it by now

#

but back when i did it, it completly broke in certain idk ... edge cases? it just happened and felt random and out of place ...

still forum
#

I'll look over it again in a couple minutes. Maybe I'll find something else

little eagle
#
private _color = WH_NT_FONT_COLOR_OTHER;

...

_color = [_color select 0, _color select 1, _color select 2, ((_color select 3) * (_alpha))];

->

private _color = + WH_NT_FONT_COLOR_OTHER;

...

_color set [3, (_color select 3) * _alpha];
#
private _showVeh = if (!isNil "WH_NT_SHOW_VEHICLEINFO") then [{WH_NT_SHOW_VEHICLEINFO},{false}];

Still think the missionNamespace getVarariable ARRAY syntax would help this one a lot.

still forum
#

Wow. That optimization possibility wasn't on my radar. Need to remember that.

little eagle
#

Which bit? I wrote two things.

#

This:

private _showVeh = if (!isNil "WH_NT_SHOW_VEHICLEINFO") then [{WH_NT_SHOW_VEHICLEINFO},{false}];

is a weird way of writing:

private _showVeh = missionNamespace getVariable ["WH_NT_SHOW_VEHICLEINFO", false];

Which is simpler and faster.

#

Yes.

#

mission namespace is where all global variables reside by default.

#

You fetch a a global variable and if it's undefined, you use the default value instead (here: false).

#

Both statements are equivalent. I don't think there is any difference between them functionally. But the second one is as I said faster and avoids the super ugly = if

still forum
#

Yes. because https://community.bistudio.com/wiki/getVariable There is no getVariable that doesn't take a left argument.
Well. Atleast that says you have to have anything there. You could also use other Namespaces or objects or stuff. But not much sense in that

little eagle
#
if(_u in units player) then 

->

if (group _u == group player) then
#

This avoids the array operation.

#

Sure.

#
if (vehicle player isEqualTo player) then 

->

if (isNull objectParent player) then 

Uses unary operations exclusively which means it's probably twice as fast...

still forum
#

https://github.com/Whalen207/WH/blob/master/wh_nametags.Stratis/wh/nametags/fn_nametagDraw.sqf#L17
private ARRAY with one variable is not much different from private ARRAY with a dozen variables in it. Performance wise.

if (isNull objectParent player) then 2 unaries and one nular ๐Ÿ˜‰ And the nular one is quite bad because of https://feedback.bistudio.com/T123419
You might actually improve performance by storing player in a local variable instead of calling player everytime. But at that point optimizing just get ridiculous

little eagle
#

The same nular operation is used twice is the current version though.

still forum
#

Ouhh yeah. Yours is an improvement anyway. Because the binary->unary

little eagle
#
if (_fov > 1.67) then { _fov = 1.67 };

->

_fov = _fov min 1.67;
#

Not sure about this one, but it should be faster on average.

still forum
#

definetly. min is just a simple arithmetic operation. if/then are two quite complicated functions

little eagle
#

Yeah, but you always assign a new value to the variable.

#

On the other hand, you trade two binary expressions for one. (>, then vs min)

still forum
#

That's cheap if the variable type doesn't change.

little eagle
#

Does that matter in SQF?

#
    private _team = assignedTeam _u;
    _nameColor = switch (_team) do 
    {
        case "RED":     {    WH_NT_FONT_COLOR_GROUPR    };
        case "GREEN":     {    WH_NT_FONT_COLOR_GROUPG    };
        case "BLUE":     {    WH_NT_FONT_COLOR_GROUPB    };
        case "YELLOW":     {    WH_NT_FONT_COLOR_GROUPY    };
        case "MAIN":     {    WH_NT_FONT_COLOR_GROUP    };
        default          {    WH_NT_FONT_COLOR_GROUP    };
    };

Something something namespaces.

little eagle
#

Oh, I don't know about that. I was just thinking that the whole thing could be turned into a one liner. At least for the function that is used every frame.

// init
WH_TeamColors = [] call CBA_fnc_createNamespace;

WH_TeamColors setVariable ["RED", WH_NT_FONT_COLOR_GROUPR];
WH_TeamColors setVariable ["GREEN", WH_NT_FONT_COLOR_GROUPG];
WH_TeamColors setVariable ["BLUE", WH_NT_FONT_COLOR_GROUPB];
WH_TeamColors setVariable ["YELLOW", WH_NT_FONT_COLOR_GROUPY];
WH_TeamColors setVariable ["MAIN", WH_NT_FONT_COLOR_GROUP];

// each frame
_nameColor = WH_TeamColors getVariable [assignedTeam u, WH_NT_FONT_COLOR_GROUP];

The only downside would be, that you couldn't change the colors at runtime.

#

Oh.

#

CBA_fnc_createNamespace is highlighted. Neat.

#

testing:

CBA_fnc_createNamespace 
CBA_fnc_notAFunction
#

hmm, maybe not.

still forum
#

a CBA hash would probably also suffice

#

or just

[WH_NT_FONT_COLOR_GROUPR,H_NT_FONT_COLOR_GROUPG,..] select (["RED","GREEN",...] find assignedTeam u) 
#

Which is essentially a CBA hash in miniature form

little eagle
#

Sure. You also need a + 1 to handle -1

still forum
#

and that will definetly be faster than a switch or a series of if statements

little eagle
#

Or use param instead of select

still forum
#

-1 is not found right? assignedTeam can only return a fixed set of strings

little eagle
#

select -1 errors out

still forum
#

Yeah. I just mean that the find cannot fail. Because you handle every possible case

#

But BI might add more Team colors.. theoretically

little eagle
#

assignedTeam can return a bunch of stuff that is not documented...

#

Including nothing.

#

Whenever you remote control a drone or AI as zeus...

still forum
#

Ouhhh.. Okey then.

#
[WH_NT_FONT_COLOR_GROUPR,H_NT_FONT_COLOR_GROUPG,..] param [
    (["RED","GREEN",...] find assignedTeam u),
    WH_NT_FONT_COLOR_GROUP
];

Where WH_NT_FONT_COLOR_GROUP is the default color in case anything goes wrong

little eagle
#

I'm hesitant to suggest things that improve performance at the cost of readability.

#

And this is so fucking ugly.

still forum
#

True. Just use a CBA hash and be done with it

little eagle
#

I think CBA is meant to be optional, but you can always create your own pseudo namespaces without it I guess.

#

But yeah, Besides what's mentioned already, this one has potential for performance improvement.

still forum
#

@tough abyss And then another select on the array of colors? That's exactly what I posted. Just that mine is more performant because it's using param instead of your if check.
If you do

_teamID = ['MAIN','RED','GREEN','BLUE','YELLOW'] find (assignedTeam _unit);
[WH_NT_FONT_COLOR_GROUPR,H_NT_FONT_COLOR_GROUPG,..] param [_teamID, defaultColor];

It would be the same as mine. Though IMO alot more readable. But looses a negligable amount of performance because of that variable assignment

little eagle
#

Yes.

#

Many times.

#

You overestimate the cost of creating an array in SQF

still forum
#
_ents select {
// Only other entities...
        _x != _unit &&
        // ...and only if they're on the same side, or in the same group.
        {(side _x isEqualTo side _unit) || {(group _x isEqualTo group _unit) || {(side _x isEqualTo civilian)}}}
//&& !(_unit iskindof "VirtualMan_F")}
}
#

yep. Literally copy pasted your if block. Because that's exactly what select does

little eagle
#

ents
Lord of the Rings.

still forum
#

select just checks a condition. for each element in the array. If the condition returns true then that element will be included in the resulting array that select will return

#

Which is exactly what your if->then was doing

still forum
#

I think you could very easilly cache the vehicle Nametags.
Just setVariable it on the vehicle. And you can check if the cache is still valid using _cachedCrew isEqualTo (crew _vehicle)
That should work I think.

still forum
#

@hasty violet I left a couple more comments as comments on your latest commit

still forum
#

Actually collected quite a bit of stuff there.

#

I really like your comments. I don't see such extensive comments that often.

#

That's about a dozen other recommendations. I'll go to bed now and come back tomorrow with new ones ๐Ÿ˜„

#

Very good. Keep it up ๐Ÿ˜‰

queen cargo
#

null is not the same as an empty string

#

neither is nil

jovial ivy
#

Erm quick question.

#

Is there a way I can convert, "[x,.y,z]" which is a string to a array that works with setPos?

#

Im transfering the data over a gui using lbData which only allows a data type of string.

rancid ruin
#

you can use call compile but there might be a better way to do it in 2017

dusk sage
#

parseSimpleArray

#

Is the new quicker way

jovial ivy
#

Hmm gotcha.

#

Worked like a charm, thanks @dusk sage

modern sigil
#

I've never been able to figure this out, but doesn't Arma have a chat event that I can bind to for parsing player inputs? Like if I want to say (!command arg1 arg2) in global chat or whatever, I can parse and react to it?

#

I've never seen it in the list of Event Handlers but I feel like I've seen people implement that somehow on some servers.

queen cargo
modern sigil
#

Pro click, @queen cargo . Thanks man!

#

Ah I see what this guy did. He did it the React way in web development:

  • Track all of the buttons that are pressed on the keyboard via the "KeyDown" event
  • When the "chat" button is pressed, start memorizing the buttons until they hit Enter or Escape
  • When they hit Escape, just abort and forget about it
  • When they hit Enter, check whether the stuff it memorized matches a command
  • If it did, run the command
queen cargo
#

hooking the textbox should be simpler

warm gorge
#

How could I check if a player is running up a hill?

#

Its for an auto-run script, I just need to know if their on a hillside, the script already does the running

jagged halo
#

man i can't seem to get the squad names to stick at the slot selection screen. You guys got any ideas?

#

lame

vapid frigate
#

@hasty violet you can declare without initializing with private ["_vehicleName"]; or private "_vehicleName";

#

(can do multiple at the same time with the first one)

#

wil be 'nil' until you set it to something

#

i'm not sure if it'd really help performance or anything though if that's the plan (would be negligible anyway)

#

yeh it will be out of scope if you do it in the if statement

#

you could put the second if statement inside the first one

#
{
    private _vehicleName = format ["%1",getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayname")];
    .....
    if (!(_vehicleName isEqualTo "")) then
    {
        drawIcon3D ["", _color, [(_position select 0),(_position select 1),((_position select 2) + WH_NT_FONT_HEIGHT_VEH * 3)],
        0, 0, 0, _vehicleName,WH_NT_FONT_SHADOW,_sizeV,WH_NT_FONT_FACE_MAIN];
    };
};
subtle ore
#

I was actually having a bit of an interesting time with something related. Can't get this to work: params["_unit"]; hint format["%1, %2",getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"),(parseText format["<img image=%1/>",getText(configFile >> "CfgVehicles" >> typeOf _unit >> "icon")])];

#

no errors, just no image.

vapid frigate
#

not quite sure if/how that would work

#

because it's parsing text, then formatting it back from structured text into text

#

maybe params["_unit"]; hint parseText format["%1, %2",getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"),(format["<img image=%1/>",getText(configFile >> "CfgVehicles" >> typeOf _unit >> "icon")])];

#

assuming hint can use structured text

subtle ore
#

@vapid frigate well yes a hint can use structured text, just was wondering if i could trick it to do it all in one line instead of assigning it a variable and potentially losing performance and organization

vapid frigate
#

what i pasted should work then

#

(building the whole string to parse and then parsing it)

subtle ore
#

ooooh, that makes a lot more sense. wow i feel stupid, thanks

simple solstice
cedar kindle
modern sigil
#

Nice, thanks FP guy @cedar kindle

cedar kindle
#

who are you ๐Ÿ˜‚

warm gorge
#

@simple solstice Perfect, just what I needed. Thanks

simple solstice
#

๐Ÿ˜Š

modern sigil
#

Actually @cedar kindle I just looked deeper into the CBA way of doing this and it's actually the exact same thing but more obfuscated. The way the other guy did it works with vanilla, at least. So maybe I can use the first one for compatibility's and mission dependency's sake.

cedar kindle
#

yeah, I assumed you had CBA running

#

most people do

jovial nebula
#

Hello guys, does anyone know if it is actually possible to run an sqf script when the server is getting stopped ?

jade abyss
#

nope

tough abyss
#

Not unless you're stopping it via script

jovial nebula
#

Thx

queen cargo
#

@vapid frigate @subtle ore instead of parseText format [...] use formatText [...]

warm gorge
#

@queen cargo Is there actually a difference between those 2 methods ^?

queen cargo
#

formatText can process more text then format

#

parseText format is slightly slower

queen cargo
#

it does not have an upper output limit like format @tough abyss

warm gorge
#

Ive always used parseText format, I guess ill use formatText now ๐Ÿ˜ƒ

thorny monolith
#

I have two arrays:

_letters = ["a","b","c","d","e"];```

How do I create a new array using these two to produce:

`_final = [[1,"a"],[2,"b"],[3,"c"],[4,"d"],[5,"e"]];`
queen cargo
#

there is no simple magic command
you have to iterate over both arrays and add them up

depending on your specs, the actual way differs

#

in case they always are even in length ```sqf
_outArr = [];
for "_i" from 0 to count _numbers do
{
_outArr pushBack [_numbers select _i, _letters select _i];
};


better question however is: why you want those two arrays joined like that?
thorny monolith
#

I've got a number of objects, for each object I'm creating a marker. Then every 30 seconds I want the marker position to update based on the objects new position. I couldn't work out how to properly nest a foreach so I've hardcoded a nested array. however that relies on all the objects being present, which they might not be:

_escapeeMkr = [];
{
  _Mkr = createMarker [str(_x), (getPos _x)];
  _escapeeMkr pushBack _mkr;
} forEach _escapee;

{
    _x setMarkerShape "ELLIPSE";
    _x setMarkerSize [50, 50];
    _x setMarkerColorLocal "ColorRed";
    _x setMarkerAlphaLocal 0.3;

} forEach _escapeeMkr;


_finalarray = [[ind1,"ind1"], [ind2,"ind2"], [ind3,"ind3"], [ind4,"ind4"], [ind5,"ind5"], [ind6,"ind6"], [ind7,"ind7"], [ind8,"ind2"], [ind9,"ind9"], [ind10,"ind10"], [ind11,"ind11"], [ind12,"ind12"], [blu1,"blu1"]];


{
  while {alive (_x select 0)} do {
    _marker = (_x select 1);
    _pos = getPos (_x select 0);
    _marker setMarkerPos _pos;
    sleep 30;
  };
} forEach _finalarray;
#

so I want to change _escapee to something like ( allPlayers select { side _x == independent} ); and then join _escapee with _escapeeMkr to dynamically populate _finalarray

subtle ore
#

@X39#2180 thanks, I'll try that out now "instead of parseText format [...] use formatText [...]"

#

@X39#2180 seems like the formatText just spat out the string I fed it in the format in the second variable it was supposed to hint. parseText just remained empty.

little eagle
#

You don't use parseText together with formatText

#

You replace parseText format with formatText

tough abyss
#

Hello, I have this script:
https://pastebin.com/DHHkUMTB
What it does is running a function of gear I created.
When I join the mission as the "PE_PL" for example, it won't find the others because I they didn't join the session.
It does give the gear of PE_PL though.
And I get an error says "undefined variable" on all of them.
What can I do to fix this? Is there a way to check if the other units has joined the sessions?

little eagle
#

formatText already reports Structured Text and not String.

#

parseText formatText would be a syntax error and is shown as such on screen and in RPT

#
waitUntil {scriptDone processParamsArray};

This looks wrong.

#

Adir

subtle ore
#

@little eagle Well of course I didn't combine the two. hint parseText format[] and hint formatText[]

little eagle
#

Then what did you do?

subtle ore
#

hint parseText format["%1, %2",getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"),(format["<img image=%1/>",getText(configFile >> "CfgVehicles" >> typeOf _unit >> "icon")])]; original, edited: hint formatText["%1, %2",getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"),(format["<img image=%1/>",getText(configFile >> "CfgVehicles" >> typeOf _unit >> "icon")])];

tough abyss
#

Why? @little eagle

#

I have processParamsArray = [] execVM "ParamsArray.sqf"; in init.sqf

little eagle
#

init sqf runs after object init, so the variable will be undefined

#

Hard to tell what's wrong with just a piece of code that does exactly nothing effectively

#
formatText["%1, %2",getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"),(format["<img image=%1/>",getText(configFile >> "CfgVehicles" >> typeOf _unit >> "icon")])];
#
, <img image=/>
#

So no wonder hintshows nothing

#

Yeah, this is all backwards. Let me fix it for you.

#

@subtle ore The icon config entry is NOT a picture. You cannot display it

tough abyss
#

What if I do
if (!alive _unit) exitWith {};

subtle ore
#

@little eagle It's a string....

little eagle
#

e.g. iconMan

#

iconMan is not a picture

subtle ore
#

That was the whole point of parseText initially, getting that image path from that icon (a string) into the image.

little eagle
#

That string does not represent an image though

#
_unit = player; 
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"); 
private _icon = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "editorPreview"); 
 
hint formatText ["%1, %2", _displayName, image _icon];

systemChat _icon;
#

This works for example. But it uses an actual image.

#

editorPreview and not icon

subtle ore
#

Hmm, what about the picture entry?

little eagle
#

pictureis for CfgWeapons and not CfgVehicles.

#

Are we talking about soldiers or vehicle vehicles?

subtle ore
#

vehicle vehicles.

little eagle
#

Should probably rename _unit to _vehicle then

subtle ore
#

sigh I was quickly running it through, polishing it later.

little eagle
#

Well that might've been a mistake.

subtle ore
#

Nah.

little eagle
#
_unit = vehicle player; 
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayname"); 
private _icon = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "icon"); 
 
hint formatText ["%1, %2", _displayName, image _icon];

works inside vehicles

#

icon is an image for vehicles

subtle ore
#

Yes, I'm not executing this anywhere other than the debug console. cursorObject and just feeding the vehicle through.

little eagle
#

Problem solved?

subtle ore
#

Yep.

tough abyss
#

could someone explain to me why player SetPosASL [ (getPosASL _dest select 0) - 10*sin(_dir),(getPosASL _dest select 1) - 10*cos(_dir),getPosASL _dest select 2]; throws errors for a string near the first getPosASL?

little eagle
#

formatText looks pretty shitty compared to the parseText format method though

#

Should've went with my instincts. X39 is again wrong.

#
private _vehicle = vehicle player; 
 
private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayname"); 
private _icon = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "icon"); 
 
hint parseText format ["%1, <img image='%2' size='5'/>", _displayName, _icon]; 
#

This can be used to resize the image which might be necessary.

subtle ore
#

Yes I see, was looking at thow the different images can include line breaks with text and such. But I'll play back and forth with it. parseText looks like the way to go.

little eagle
#

@tough abyss because _dest is undefined.

tough abyss
#
titleText ["", "BLACK OUT"];
systemChat "Teleporting to destination!";
sleep 1;
_dir = random 359;
player SetPosASL [ (getPosASL _dest select 0) - 10*sin(_dir),(getPosASL _dest select 1) - 10*cos(_dir),getPosASL _dest select 2];
systemChat "Arrived at destination!";
sleep 1;
titleText ["", "BLACK IN"];
//disableUserInput false;
systemChat "You are good to go soldier!";```
#

pretty sure it would be?

little eagle
#

parseText can handle all the html stuff, while formattext can only piece together already done images.

#

It's essentially useless, because it's a worse version of parseText format

tough abyss
#

it worked fine with getPos but it'd spawn players in the water, hence setPosASL

little eagle
#

And the 8012 char limit will never come into play anyways.

shadow sapphire
#

How would one make it where map marking could only be shared via Direct Chat?

subtle ore
#

yeah I saw the a3 example for it all, included a html variant of text posted there.

little eagle
#

@tough abyss That doesn't help. What is _this? There is too many unknowns to answer your question.

tough abyss
#

it's an object

#

with a variable name

#

passed through with an addaction

#

needed to determine the position the player needs teleporting to

little eagle
#
player SetPosASL [ (getPosASL _dest select 0) - 10*sin(_dir),(getPosASL _dest select 1) - 10*cos(_dir),getPosASL _dest select 2];

looks overly complicated.

tough abyss
#

well, edit x and y coordinate slightly and set the correct height, no?

little eagle
#

Maybe it helps if you do one step of that in individual lines?

tough abyss
#

could do, thanks

#

Can anyone help me please?

little eagle
#

@tough abyss

_dest = tank; 
player setPosATL (_dest getPos [10, random 360]);
#

This looks much simpler and I think it does what you were trying to do

#

Adir, your script does nothing. It's really hard to say why it wouldn't work.

tough abyss
#

It works.
The only problem is that it throws errors of "undefined variable", on the units that are not in.
For example if I'm PE_PL, and I'm alone in the server it will throw the errors on all of the other units.

#

So I wondered if there's a way to make it check if they are even exist it execute the script.

little eagle
#

And it probably also doesn't work if these units jip

tough abyss
#

Most likely, I didn't check JIP yet

#

still according to the code _dest = (_this select 3) select 0; returns a string, not an object

#

even though it's an object

#

it's a general script for TPs

little eagle
#

So I wondered if there's a way to make it check if they are even exist it execute the script.

If (!isNil "PE_PL") then {

};
#

What string does it report?

tough abyss
#

I don't know, it just says Type String, expected Object

#

for getPosASL

little eagle
#

Maybe you should add some debugging with diag_log.

tough abyss
#

I don't follow What string does it report?

little eagle
#

The question was for TheNightalk3r

tough abyss
#

oh

little eagle
#

lol

tough abyss
#

<

#

so I need to run the check on every single one of them?

little eagle
#

juggling balls here

#

With the way your script is set up, yes

tough abyss
#

ok

#

this addAction ["Teleport to Base","scripts\teleportBase.sqf",["base"]]; and then _dest = (_this select 3) select 0; should select the object with name base right?

little eagle
#

well, "base" is indeed a string

#

So it selects the string "base"

tough abyss
#

any way for it to select the object called base?

little eagle
#

pass the object as argument and not a string I guess.

still forum
#

I think it's still within scope though... because there's a loop, below, and I can't have it being re-initialized again and again throughout the loop
But if you are resetting that variable in every iteration of the loop. That doesn't matter. You are pulling variables into a scope where they are never used/needed.
What do you mean by re-initialized again and again?
@hasty violet And I don't see the script error in there. Maybe Arma.Studio's Linter can see it @queen cargo ๐Ÿ˜‰

tough abyss
#

thanks that worked

#

I thought it required the object between "s

little eagle
#

No. Why would it?

still forum
#

Everything between "" is a string. A string is not an object.

little eagle
#

Beautifully said.

tough abyss
#
case 2: 
{
If (!isNil "PE_PL") then {>```
```sqf
private ["_gear"];
waitUntil {scriptDone processParamsArray};
_gear = Gear;
switch (_gear) do 
{
    case 2: //MultiCam
    {
        If (!isNil "PE_PL") then {
        [PE_PL,"BLUEFOR","PL", "multicam"] call gearscript_fnc_assignLoadout;
        };
        If (!isNil "PE_CM") then {
        [PE_CM,"BLUEFOR","CM", "multicam"] call gearscript_fnc_assignLoadout;
        };
    };
}; ```
little eagle
#

Looks like you made a mistake.

still forum
#

Well... The error is at your case 2 But you don't have that. So.. Arma is just fooling around with you.
Also wtf is up with that private _gear Gear thingy there.
just switch directly on Gear.

little eagle
#

BLUEFOR

#

BLUFOR?

#

potential typo

tough abyss
#

Sorry, I actually do have it.
But I just showed you case 2 but it's exactly the same.

#

I edited the code

little eagle
#

I don't see it.

still forum
#

Why do you have multiple cases that do the same? In a switch that switches on a private ARRAY privatized local variable that really is just a Global variable

tough abyss
#

on case 0 it's "aor1" in case 1 it's "aor2", etc.

little eagle
#

Maybe post the whole script and not an edit

tough abyss
#

ok

still forum
#

If you have 99% duplicate code and just one string or a single char inside a string is changing. You are doing something wrong

tough abyss
#

well yes that's how it is

#

I'm not an expert

still forum
#

Wouww okeyyy.

little eagle
#

Now give the full error. With line number ๐Ÿ˜ƒ

still forum
#
_camo = ["aor1","aor2","multicam","multicam_alpine","multicam_arid","multicam_black","multicam_tropic"] select Gear;
waitUntil {scriptDone processParamsArray};

If (!isNil "PE_PL") then {[PE_PL,"BLUEFOR","PL", _camo] call gearscript_fnc_assignLoadout;};
If (!isNil "PE_CM") then {[PE_CM,"BLUEFOR","CM", _camo] call gearscript_fnc_assignLoadout;};
...

Now your script is 1/6th the size + a little bit faster + more readable

little eagle
#

It's a mess.

#

It's a config that tried to be a script.

still forum
#

But it works.. I guess... Well. Actually it doesn't. Because of that error you posted.

tough abyss
#

case 2: { If (!isNil "PE_PL") then {> 21:54:02 Error position: <}; case 2: { If (!isNil "PE_PL") then {> 21:54:02 Error Missing { 21:54:02 mission_scripts\gear_script\gearSelector.sqf, line 91 21:54:02 Error in expression <"] call gearscript_fnc_assignLoadout;}; };

little eagle
#

What's the goal? Make something that works or make something that can actually be maintained.

tough abyss
#

Dedmen, how does it select the camo?

still forum
#

_camo = ["aor1","aor2","multicam","multicam_alpine","multicam_arid","multicam_black","multicam_tropic"] select Gear;

#

Just read the code ^^

#

It select's the element of that array by the Index stored in Gear

little eagle
#
If (!isNil "PE_PL") then {[PE_PL,"BLUEFOR","PL", "multicam"] call gearscript_fnc_assignLoadout;};};

This line has one {, but two }

still forum
#

The line below too

#

And all the other places where that was copy-pasted

little eagle
#

But the two case blocks above have the same amount of opening and closing curly brackets.

still forum
#

No. case 0 is correct. The others aren't

little eagle
#

Sure.

#

case 1 seems to be correct too

#

See? It helps knowing which line to look for.

#

Looking at this is hypnotising.

still forum
#
    case 1: //AOR2
    {
        If (!isNil "PE_PL") then {[PE_PL,"BLUEFOR","PL", "aor2"] call gearscript_fnc_assignLoadout;};};
        If (!isNil "PE_CM") then {[PE_CM,"BLUEFOR","CM", "aor2"] call gearscript_fnc_assignLoadout;};};

Look closer

little eagle
#

Hmm. True.

still forum
#

Also these types of errors are why you should use a Linter

little eagle
#

I don't want the variable to exist in any capacity unless I'm using it.
I'd like to hear the reasoning behind that

rancid ruin
#

+1 variable = -1 FPS

#

didn't you know this

still forum
#

https://github.com/Whalen207/WH/blob/master/wh_nametags.Stratis/wh/nametags/fn_nametagUpdate.sqf#L17
Why does that variable need to be available in that scope?
You could define it as private
https://github.com/Whalen207/WH/blob/master/wh_nametags.Stratis/wh/nametags/fn_nametagUpdate.sqf#L72
and
https://github.com/Whalen207/WH/blob/master/wh_nametags.Stratis/wh/nametags/fn_nametagUpdate.sqf#L98

What is your reason to not do that?..
It's true. Right now you could access the variable of the last entity that was processed after the loop. But you don't do that and I don't see any reason to.
Well. Theoretically. In practice you are never assigning your Initial variables. Meaning that private _var code actually does nothing. Meaning they aren't private and not available in that scope

little eagle
#

I think.

private _targetPosition;

is a syntax error

#

It's either

private "STRING"

or

private _var = value;
#

Currently it's:

private _undefined;

and the only reason it doesn't error is, that it's running in unscheduled environment.

still forum
#

yep. I think theoretically the engine sees that as reading a variable and just ignores... No. private is coupled to = so that's a syntax error

#

ahhhh. yeah. You are calling private ARRAY as private nil currently.

little eagle
#

yup. Or private STRING. No difference.

#

I feel like that huge if-then-else-if construct could be a switch and it would be less indented.

still forum
#

I wonder how many people do stuff like this

_privateVariableName = "_myVar";
private _privateVariableName; //privatize _myVar
little eagle
#

Hopefully no one.

delicate lotus
#

isnt both the same?

little eagle
#

Elaborate.

weak obsidian
#

If I want to create an object per script on another object, like on a table, is it enough to createvehicle with array and set "can_collide" or are there other things that need to be considered?

little eagle
#

You could try.

weak obsidian
#

I did and so far item spawns on table. The thing is that with arma and physics etc. from experience things can be a bit wonky, that's why I'm asking if there is anything else to consider.

little eagle
#

I wouldn't worry about hypothetical problems until they arise or are shown to exist.

weak obsidian
#

ok

tough abyss
#

Hi, I tried dedmen's way of the script

_camo = ["aor1","aor2","multicam","multicam_alpine","multicam_arid","multicam_black","multicam_tropic"] select Gear;
waitUntil {scriptDone processParamsArray};

If (!isNil "PE_PL") then {[PE_PL,"BLUEFOR","PL", _camo] call gearscript_fnc_assignLoadout;};
If (!isNil "PE_CM") then {[PE_CM,"BLUEFOR","CM", _camo] call gearscript_fnc_assignLoadout;};
...

But it doesn't give the gear, no errors.
I used params before in order to get the gear

class Params
{
        class tfwp_gear
        {
                title = "Gear For The Mission";
                values[] = {0,1,2,3,4,5,6};
        texts[] = {"AOR1","AOR2","MultiCam","MultiCam Alpine","MultiCam Arid","MultiCam Black","MultiCam Tropic"};
                default = 2;
        isGlobal = 1;
        code = "Gear = %1";
        };
};```
still forum
#

Well. It does the same as before. Can't you make the values just be Strings? do they have to be numbers?

tough abyss
#

They have to be integers, yes

subtle ore
#

what about BIS_fnc_getParamValue; ?

still forum
#

Getting the value into Gear worked before.
Is your code really ... or did you add all your isNil checks back in there?

tough abyss
#

I removed the ... and added the others

still forum
#

Okey. Have to ask. Because there are such people here ๐Ÿ˜„

tough abyss
#

lol if I had ... I would get errors ><

#

good to know there are worse than me ><

still forum
#

you could put a
systemChat _camo after the waitUntil. To check if your code is being executed

#

That way you also see if it choose the correct camo

tough abyss
#

yup it says "multicam" which is the right one in the parameter

#

but I still don't get the gear

still forum
#

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

tough abyss
#

and if i run [PE_PL,"BLUEFOR","PL", "multicam"] call gearscript_fnc_assignLoadout; in the debug in does give me the gear

still forum
#

maybe PE_PL is still nil. For.. I don't know whatever reason

tough abyss
#

nono

still forum
#

Can you pastebin the full script again?

tough abyss
#

I checked it also with my long way

#

and it did give the gear

still forum
#

That is not what you posted above..

#
_camo = ["aor1","aor2","multicam","multicam_alpine","multicam_arid","multicam_black","multicam_tropic"] select Gear;
waitUntil {scriptDone processParamsArray};

If (!isNil "PE_PL") then {[PE_PL,"BLUEFOR","PL", _camo] call gearscript_fnc_assignLoadout;};
If (!isNil "PE_CM") then {[PE_CM,"BLUEFOR","CM", _camo] call gearscript_fnc_assignLoadout;};
...

is correct.
but

_camo = ["aor1","aor2","multicam","multicam_alpine","multicam_arid","multicam_black","multicam_tropic"] select Gear;
waitUntil {scriptDone processParamsArray};

If (!isNil "PE_PL") then {[PE_PL,"BLUEFOR","PL", "_camo"] call gearscript_fnc_assignLoadout;};
If (!isNil "PE_CM") then {[PE_CM,"BLUEFOR","CM", "_camo"] call gearscript_fnc_assignLoadout;};
...

isn't

#

You see the difference?

tough abyss
#

yes

#

it's a string

#

<

#

ffs

still forum
#

I can't find your error if you fix your code snippet before you post it here ๐Ÿ˜„

tough abyss
#

I actually did CTRL + H from aor1 to _camo

#

and didn't realise that it will keep the "

#

I didn't think about including the "" to the search

#

sry

#

I have the gear now

#

Thanks alot ^^

#

arrays are pretty cool lol

little eagle
#

you could do the same thing with your 'roles' ("PE_PL") and turn the whole script into essentially a one liner with a bit of 'config' at the top.

agile pumice
#

Am I using this macro correctly?
#define SEL(ARRAY,INDEX) (ARRAY select INDEX)
parseNumber SEL(_query,2);

#

its throwing a Error Missing ; error and I'm not sure why

#

would be nice if my rpt would give me the full error line instead of chopping it off

dusk sage
#

did you add a ; at the end of the line?

agile pumice
#

yes

#

didn't include it in my paste lol

#

oh shit

#

I know what I did

fast sphinx
#

We currently have a militarized server running the exile mod. Some of the air assets have radar that is just nuts, like being able to see things 18k out. would it be possible to run a script that would make all air assets not see or lock on to targets further than 3k? We would like to add back some of the better heli's and jets but being able to lock on at 5k-6k out just make them a little OP. I am just learning to script, but any help with this if possible would be greatly appreciated. Much thanks to any who respond.

subtle ore
#

@fast sphinx 18k km out? that's a stretch.

fast sphinx
#

The Apache Heli is pretty close to that.

delicate lotus
#

isnt 18km out realistic?

subtle ore
#

@delicate lotus It is, it's just like saying how we shouldn't have UAV's and just do it ourselves. Real radar stations would pick up on much more than it does ingame.

#

@fast sphinx Which?

vapid frigate
fast sphinx
#

@delicate lotus Yes it is realistic, but we are running the exile mod not a mill-sim. just makes them a little OP

vapid frigate
#

would only help for AI though if anything

subtle ore
#

@vapid frigate AI variant, won't work on players afaik.

#

@fast sphinx "Over Powered" means absolutely nothing. It does what it is designed for.

fast sphinx
#

Yes I know it is doing what it is supposed to. I would like to make it to where all air assets have the same radar distance so it is a level playing field.

vapid frigate
#

i think you'd have to make config changes to do it

subtle ore
#

Why? What's the point of air superiority?

fast sphinx
#

@subtle ore Nevermind

vapid frigate
#

it's pretty obvious why it'd be overpowered in a pvp game

fast sphinx
#

I don't think he understands

vapid frigate
#

is a custom config an option?

subtle ore
#

#offtopic_arma , final words on this: Make your "balancing" magic happen then. Or don't have them at all, doesn't make sense why you would want to damper the power of the plane.

fast sphinx
#

@vapid frigate It might be. Like I said, I am new to scripting but I do have some Dev's on our team that could maybe help with that. I figured I would come on here and ask where to start since the knowledge here is so vast.

vapid frigate
#

to change them, but would have to modify the choppers configs to do so

#

(so it'd have to be in an extra pbo on server/all clients)

fast sphinx
#

@vapid frigate I appreciate the assistance in a place to start. Going to get with one of our Dev's and see if he can assist in getting this in motion. Again thank you.

weak tiger
#
18:38:31   Error position: <params ["_destination","_destinationName>
18:38:31   Error Local variable in global space
18:38:31 Global namespace not passed during: 

params ["_destination"

why would I be getting this on arma start when im not even compiling or running this .sqf, pretty sure its just being pulled out of the pbo

#

dev branch btw

#

doesnt happen on stable

meager granite
#

it runs somehow then, probably through some event that fires during game loading

weak tiger
#

@meager granite the only reference to it is in a custom Cfg class

class CfgOverthrowMissions
{
    class FactionWeapons
    {
        target = "Faction";
        repeatable = 1;
        condition = "_standing < 50";
        script = "\ot\missions\factionweapons.sqf";
        chance = 100;
    };
#

its not compiled or run until much later than arma load

covert inlet
#

Not sure if its possible but has anyone considered trying to make the Praetorian 1C able to shoot down morters

half inlet
#

is there a way to get the unit a curator is currently remote controlling?

#

as it stands, if a curator uses remote control on an AI, the player command will still point towards the curator, not the AI unit that he is controlling

#

nevermind, found out how to access it: missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", objnull]

#

(found in BIS_fnc_moduleRemoteControl)

still forum
#

@hasty violet worldToScreen.. Maybe? Dunno. I should probably look at what poscamtoworld does first

rotund cypress
#

Hey guys, I've been trying to make a system to initiate variables to publicvariables on start with entries that have publicVariable = 1; and then the functionname. This is the code ```{
publicVariable (getText (_x >> "variable"));
[LOG_INFO, format ["%1 IS NOW A PUBLIC VARIABLE", _x], _fnc_scriptName] call log;

true

} count (configProperties [
configFile >> "CfgFunctions",
"isNumber (_x >> 'publicVariable') && {(getNumber (_x >> 'publicVariable')) isEqualTo 1} && {isText (_x >> 'variable')}"
]);
. I get the following errors 20:29:17 Warning Message: 'version/' is not a class ('publicVariable' accessed)
20:29:17 Warning Message: 'init/' is not a class ('publicVariable' accessed)
20:29:17 Warning Message: 'createShortcuts/' is not a class ('publicVariable' accessed)``` Any thoughts?

still forum
#

you are not checking isClass _x

rotund cypress
#

But everything is a class in the config? @still forum

#

I had that before but removed it cause I didn't see a point of having it there

#

Or are you on about the properties below a class?

still forum
#

no it's not

#

yes

rotund cypress
#

Ah okey then I see

still forum
#

version/init/createShortcuts are probably just entries that are not classes

rotund cypress
#

Ah ye right

still forum
#

you can probably use configClasses instead of configProperties?

rotund cypress
#

But it does not go through classes below?

still forum
#

I don't know

rotund cypress
#

I was looking into it, but I think I came to the conclusion to use this since it can check inherit classes

#

Okey the error is gone now

#

it is still not making them public variables however

#

Maybe i am missing something... it seems like it does not go through the classes below the most parent class

shut flower
#

Does anybody has a clue how the blue cylinder displayed in 3den when playing down a trigger is made? Is there a script command to create a cylinder?

queen cargo
shut flower
#

isn't this polygon 2d?

#

and isn't this only for maps? I mean the 3d cylinder in 3den not the blue circle on the map

chrome nebula
#

Hey guys, sorry if it's the wrong place. I'm looking for a script that basically blacks out the players screen if they're not connected to Task Force Radio, with maybe a text saying "this server requires you to have TFR connected on 123.123.123.124" or something. Anyone offer some wisdom?

#

Even when TFR is running but not connected to the channel or anything

shut flower
#

There are all public funcs of TFAR

chrome nebula
#

Sorry I'm damn awful at making a script from scratch, could you maybe offer some further help? ๐Ÿ˜‚

shut flower
#

I'm not completely into TFAR (But @still forum is)

#

My solution would be to double check the channel the client is in with the channel he should be into

#

and then just use cutText

still forum
#

Ah I know what you wanna do

#

don't need tfar discord for that. One sec

chrome nebula
#

...?

#

Thanks for the list there too @still forum

chrome nebula
#

I'd probably have to use the teamspeakchannelname one

shut flower
#

you should use both

still forum
#

The server/channel functions will return empty string if not connected

shut flower
#

to make sure he is not on a different server which has a channel named like yours

chrome nebula
#

Ugh I'm so sorry for asking this guys, but there isn't any chance one of you could write up a quick script for me?

still forum
#

If he is on the right server and you are using serious mode automove will kick in anyway. So server check should be enough

shut flower
#

gimme a sec

chrome nebula
#

Literally would mean so much to me

shut flower
#

do you use cba?

chrome nebula
#

Yeah

shut flower
#

and lets switch to a private chat

chrome nebula
#

Okay ๐Ÿค˜๐Ÿป

shut flower
#

btw @still forum why doesnt tfar uses channel ids?

still forum
#

It could. I don't know. That was part of the old system before I joined. I can add that though.
I'll push that to my todo list

shut flower
#

great, would be awesome so that the system is not depending on the channel's name

still forum
#

Serverid would also be neat. But I guess that doesn't exist

#

But the TFAR automove would still be depend.... Nah. I can make that a number too If I want to..

tough abyss
#

Hi, is there a way to run a SQF file from a FTP server?

dusk sage
#

...?

still forum
#

Download it. Enable filePatching. And run it

#

You can write a Extension that fetches it and gives you the code back as a string

#

Or you could use Intercept (Solves all Problems :D)

shut flower
#

Is Intercept a managed dll?

still forum
#

managed means?

#

C++/CLI no. C# no. Plain C++ But I don't think that's what you mean with managed

shut flower
#

I have no real clue about C++ by AFAIK there is managed C++ which can be using in C# like a C# library

#

and if not you need to use dllimport

#

but I assume it's not

still forum
#

Yeah no. Unmanaged

tough abyss
still forum
#

What did you do @hasty violet ?

#

That could do what you want

tough abyss
#

Can I use this to run the sqf file?

#

yes ^

still forum
#

You can also use htmlLoad script command I think

#

But I'm not sure if htmlLoad can handle ftp

shut flower
#

The annoying part about Intercept IMO is that the dll has to be whitelisted by be

#

Or is there a way to get around this?

tough abyss
#

I think I'll do KK's

#

thanks

dusk sage
#

@tough abyss It looks like you're tackling something that you shouldn't be

#

Or atleast, haven't thought about the best method to do it

still forum
#

You don't need whitelisting Serverside

shut flower
#

but clientside

still forum
#

And somehow I also like that Idea of only running Intercept Serverside. the Server is a secured Area. And Intercept is quite powerful.

shut flower
#

but how to handle scripts that has to run on the client? using intercept I have to write a client dll or am I wrong?

still forum
#

Yeah. You would need to do that. And get it whitelisted and stuff.

shut flower
#

thats the annoying part

#

I would adore it if you just could whitelist dlls serverside with signatures

still forum
#

Not really a way to get around that. Even if BI would integrate Intercept. You would still need whitelist for your Plugins
Yeah. That would be awesome. That would give the Serveradmins the control on what is safe and what's not. And Serveradmins might not have a clue. But. They are sure not gonna whitelist a known Hack. That would also elliminate the Problem of BE going offline and everyone being screwed because TFAR/ACE don't work anymore

#

Write a Feature Request on the Feedback Tracker. I'm sure it will be ignored for eternity.

shut flower
#

Problem of BE going offline and everyone being screwed because TFAR/ACE don't work anymore
which really happens too often

#

I'm sure it will be ignored for eternity
Like most things that are requested and really could be useful

still forum
#

Or Mods could just define their Extensions in their PBO's. So people would allow them on their Server by just allowing the bisigns of the PBO's

#

Btw we are planning to do exactly that in Intercept. That you have to provide a hash for your Plugin in your config. So it makes sure the right one is loaded

shut flower
#

You could exchange the extension. At least they have to be signed in any way

still forum
#

We also wished.. Wait a second

shut flower
#

holy crap this issue is even from the old bugtracker

#

freaking old

still forum
#

LUL that feature request was created by Bohemia itself. 3 years ago. And it was even assigned

shut flower
#

I think it was merged from the old issue tracker

#

The extension whitelisting was just a rash action as hackers found too many exploits

#

Quick implemented to "solve all problems"

#

but it's not a nice solution, it impedes extension makers

still forum
#

I think that feature request would solve a lot of problems. It would prevent Hacking even more than Battleye does currently.

shut flower
#

hmm, let's think about DankHax ๐Ÿ˜„

#

they directly manipulated data packets

still forum
#

Battleye even whitelisted my Debugger a couple weeks back. A completly obvious Hack that hooks deep into the Engine and can Manipulate any Script that runs. Whitelisted. Just like that. I just got messaged on Discord one day "Hey. The debugger was whitelisted"

#

With extension bisigns that couldn't happen. We just wouldn't provide a bisign for it. So no one can ever accept it except if they have bisigning disabled

shut flower
#

How are you whitelisting extensions? Writing an email to suter like in good old days or is there now an easier way?

still forum
#

Yep. Exactly like that

shut flower
#

Wow. A support panel would be nicer for such things

still forum
#

I think you could also just buy a couple hundred bucks code signing certificate and sign your Extensions. That would whitelist them automatically. Which is what all the Drivers do.

#

A lot of Hackers also do that btw. If you can spent like 300 bucks to get your Hack whitelisted. That you then sell for 80 bucks a piece to dozens of people.. You really don't care about the couple hundred for the cert

shut flower
#

Do you really think so? I know that it was like that back some years but I think Be changed this completely and whitelisted all drivers and so on

#

because there are drivers hooking up into every program (which are definetly signed) but still get blocked by BE

still forum
#

Well.. A year back you could just create a certificate yourself and sign your dll. And BE would accept it. That is what I used back in the day to get my hack around BE.
There were also Companies leaking their certificates. So you could use that leaked certificate which BE was already accepting to sign your Extension. That also worked for a while. I think BE added a blacklist for these certs

shut flower
#

You were a hacker?

still forum
#

Yeah. Well. Just experimenting. For research purposes not for Hacking purposes

#

I wanted to make a deeply engine integrated Cyborg HUD thingy. A bit Crysis like.

shut flower
#

"research purposes" ๐Ÿ˜„

still forum
#

That could detect heat signatures through walls and stuff. Correctly implementing everything like I wanted never happend because I never had the Time. But I had a working ESP that could see enemies through walls. So.. Had a little fun on KotH with that till I got banned ๐Ÿ˜„

shut flower
#

Haha, got banned from KotH too because I was flying around ๐Ÿ˜„

#

obviously not in a helicopter or jet

still forum
#

I can strongly advice anyone to try to build a Hack. It's a awesome learning experience. You learn a lot about how the Arma Engine works in its bowels. And also a lot of how Computers work in general.
And later you can use that experience for good. For example by contributing to Intercept. Although I finished most of the Hacky stuff already

shut flower
#

that were my first c# experiences but I never managed C++, it's just confusing for me

still forum
#

goes to bed. 3AM is sleeptime

shut flower
#

some days I'm waking up at 3am ๐Ÿ˜„

#

good night anyway ๐Ÿ˜„

tough abyss
#

anyone know how to closeDisplay if the display is created like this

fnc_SpawnIt  = {
//close the display here!

};

simply adding _display closeDisplay 1; did not work.

#

out of the fnc_SpawnIt i can call the closeDisplay correctly though

#

i know i can createDialog and closeDialog but that would require an extra file to hold the dialogs :/

shut flower
#

is fnc_SpawnIt executed in scheduled or unscheduled environment?

#

I assume that _display is not available in the fnc_SpawnIt scope

#

so _display is undefined

#

and therefore you can't close it

#

are you passing _display as a param to fnc_SpawnOt? @tough abyss

tough abyss
#

no i dont pass _display. the fnc is called like this ```_buttonBox ctrlSetEventHandler ["ButtonClick", "_this call fnc_SpawnIt"];

shut flower
#

this can't work

#

if you add an ui event handler the code will be executed in a different namespace and a different scope

#

therefore you don't have _display defined

tough abyss
#

yeah i figured so. i guess ill just make a pseudo dialog and replace it with the display

shut flower
#

you don't have to

#

you can get your display in fnc_spawnIt like that private _display = findDisplay <idd>

#

and then it would work

#

you have to get the idd from the config

dusk sage
#

I read that very briefly, and I'm not 100% sure how you're carrying it out. But you can get the players direction (vectorDir), and aslong as your lines (plane) are normal to that, it will face the player

#

That will give you a normalised vector (in the same direction)

#

You might have seen it denoted as a unit vector

#

no, it's not

#

'normal' to a plane, is orthogonal

modern sigil
#

Does anyone know how to detect whether the player is actually controlling a UAV device and in that UAV interface mode?

tame portal
#

@dusk sage 90 degreeeeeeees

#

I learned something useful!

little eagle
#

That is why "normalized vector" is a shitty term and you should call it "unit vector". "norm" also refers to the length of a vector, so I argue that you might as well name the command "vectorDenormalized".

modern sigil
#

@hasty violet use
```sqf
code-here
```

#
_vehicle = createVehicle["Penis", getPos player];
player moveInDriver _vehicle;
#

๐Ÿ‘

little eagle
#

You subtract the position from your target from the position of your origin. That is the vector from the origin to the target.

#

It seems weird to me that you calculate the cross product of a unit vector and a non-unit vector.

#

uhm

#

1,0 x 2,0 = 0,0
So length 0, but the non-unit vector had length 2

#

Why not do the cross product between two unit vectors? The result will be the unit vector orthogonal to the plane both vectors span.

#

So you can simply vectorMultiply the result with the desired length.

#

Which is (WH_NT_FONT_SPREAD_TOP * _fov) I guess?

indigo snow
#

You can normalize after getting the crossproduct if youre only interested in the direction of the result anyway

#

There is also only one orthogonal vector, you can just scale it infinitely

little eagle
#

Why? The result of a cross product between two unit vectors will be a unit vector. Or 0,0,0 I guess.

#

But if you do the cross product between one or more non unit vectors, you won't get the orthonormal from what I can tell

indigo snow
#

Either start with two unit vectors or normalize the cross product, it makes no difference in the direction of the final result

#

You will

little eagle
#

Really?

indigo snow
#

Yes

#

E.g Moment = r x F in 2/3D physics

jade abyss
#

Was there a way to Calc Dir to Vector?

indigo snow
#

vectorDir is a thing

jade abyss
#

Nah, i need from e.g. input 90 output [0,1,0] for example

indigo snow
#

Oh rotation matrix

jade abyss
#

No clue, fighting with Vector a bit, achieved some stuff, still blackmagic for me

indigo snow
#

x = rcos(_a) + rsin(_a)

#

I'd try to make use of the screenToWorld and related commands

#

Do your foo in screencoordinates and translate back when ready to draw

jade abyss
#

STW is pretty neat (WTS also)

indigo snow
#

But maybe its time to return to the original problem

jade abyss
#

Whats the Prob?

indigo snow
#

(player - target) is from target to player technically, btw.

jade abyss
#

again: What are you trying to achieve?

indigo snow
#

Line 1, _unitVectorPlayerToTaget

jade abyss
#

stacked? Like they stay above the head?

little eagle
#

_targetPosition = cursorObject modelToWorldVisual[0,0,2];
?

indigo snow
#

So your current approach is moving the vectorUp from the player to the target position, scaling for UI size? There's bound to be a more natural solution.

little eagle
#

That would mean 2 meters above the feet, no?

jade abyss
#

get the MemoryPoint Pos of the Head

indigo snow
#

eyePos?

vapid frigate
#

seems like the answer is right there above their heads

little eagle
#

badum

jade abyss
#

No @hasty violet Use it as reference MempointToGround

#

So only using it for the Z-Axis, rest taken from getPos/worldToScreen or whatever you use

#

Then it's above his head?

indigo snow
#

Get world coordinates of center > transform to screencoords > move up N amount of pixels > drawIcon?

jade abyss
#

Thats why i told you:
Z = (memoryPoint "HEAD" distance getPosATL _Unit select 2) + 1

indigo snow
#

Whale wants "up" to be from reference of the viewing plane, not world

jade abyss
#

+Why using ScreenToWorld anyway? ModelToWorld is enough

chilly wigeon
#

Any tips on how to hook a mission ending via the #missions admin command? I was hoping the Ended mission event handler would catch it, but it doesn't seem to.

indigo snow
#

DrawIcon directly on the screen?

#

display 46

jade abyss
#

You make it yourself harder than it has to be.

#

modelToWorld

modern sigil
#

What you want is BIS_fnc_addScriptedEventHandler

#

Or you want to use BIS_fnc_loop

indigo snow
#

Youd have to keep track of dialog for every player and keep moving them on and off screen, thatd be non ideal for you

jade abyss
#

Again: You make it yourself harder than it has to be...

indigo snow
#

Sort them into one list and then process that list separately?

#

Youd know how many pixels youd need

#

Really you want a control solution here, though

#

Its a bit shit but its the 'nice' solution vs ducktaping together all kinds of broken parts

#

Id create like 15 controls, always keep them active, and move them on and off screen and change the text as you need

#

Some spectators do it that way, too

jade abyss
#

โ˜

#

Or just create them, when they are needed

indigo snow
#

Creating a control is relatively expensive though

#

Itd still be an each frame thing

jade abyss
#

if(isNil "Control1")then{createthings}
otherwise use the existing one

vapid frigate
#

you can ctrlCreate and ctrlDelete too

indigo snow
#

Its like you can make a canoe out of ducktape

#

But theres already some good materials right there

vapid frigate
#

to do what you want you sorta need the camera up vector.. but not sure if it's possible to reliably get it

indigo snow
#

Id assume to always use vectorDirAndUp

#

Else youd roll and the tags would roll with you

#

Wierddd

vapid frigate
#

i think vectorUp player in first person is always 0,0,1 though

jade abyss
#

๐Ÿคฆ

indigo snow
#

Nah youll probably actually need the crossvector of dir and up

#

Anyway

vapid frigate
#

yeh sry, you would need the dir and up of camera.. but don't think you can get either?

indigo snow
#

And then the diff between player and target

#

And then construct the real up from that

#

Basically cheat a bit by saying your only interested in the plane spanned by dir and up, not their actual individual directions

#

because the cross product of the normalvector of that plane and the vector to your target would be your "relative" up

#

Then grab their modelcenter, translate along that axis, and use that as anchor position for your icon drawing

#

Et voila, super expensive nametags

jade abyss
#

๐Ÿคฆ

indigo snow
#

Or just use a control :D

little eagle
#

The camera points always up 0,0,1

indigo snow
#

Yea but youre not really interested in their actual direction anyway i guess

#

Mainly the vector between player and target

#

And some normal vector to that

#

Which would always be the modelcoordinate [-1,0,0] i guess

#

(Or any multiple of it)

#

Actually better have it negative with the right hand rule and all

#

Adjust your vectorCross

#

Its wrong

#

[0,1,0] as an educated guess

#

If its sideways its just a matter of figuring out which axis you got wrong

#

Since youve just found a rotation of your desired solution anyway

#

Yea what is that vectorMultipy doing

#

so whats it look like now?

#

it does very much

#

right hand rule

#

pseudocode:

_x = player modelToWorld [0,1,0]; // Or [0,-1,0]
_r = _TargetPos vectorDiff player;
_up = _r vectorCrossProduct _x

Then normalize and scale.

#

thats just your vectorUp

#

try reversing the arguments in your playerdifftotarget

#

pretty sure you got the vector in the wrong direction there

#

yea

#

did you change that [0,0,1] too then?

#

since that implied your took the crossproduct of the wrong vectors

#

change how, the magnitude or the position of the 1 ?

#

yea thats expected

#

because of your vectorCross

#

tried adapting my earlier pseudocode above?

#

your working with the wrong vectors atm

little eagle
#

vectorMultiply (1) is a placeholder, right?

indigo snow
#

As for the earlier discussion, me and whale worked out the coordinates.

removeMissionEventHandler ["Draw3D",missionNamespace getVariable ["drawHandler",-1]];
drawHandler = addMissionEventHandler ["Draw3D", {
    _offset = 2;
    _icon = "\a3\ui_f\data\map\Markers\Military\dot_ca.paa";

    _target = cursorObject modelToWorldVisual [0,0,1];
    _player = player modelToWorldVisual [0,0,1];

    _dir = _target vectorDiff _player;
    _side = (vectorDir player) vectorCrossProduct (vectorUp player);
    _drawUp = (vectorNormalized (_dir vectorCrossProduct _side)) vectorMultiply _offset;

    if ((_drawUp select 2) <= 0) then {
        _drawUp = _drawUp vectorMultiply -1;
    };

    _drawPos = _target vectorAdd _drawUp;

    drawLine3D [_target, _drawPos, [1,0,0,1]];
    drawLine3D [_target, _player, [0,1,0,1]];
    drawLine3D [_target, _target vectorAdd _side, [0,0,1,1]];

    drawIcon3D [_icon, [1,1,1,1], _drawPos, 1, 1, 45, "Target", 1, 0.05, "TahomaB", "RIGHT"];

}];

Anything other than the relative axes coordinates such as offsets etc is irrelevant for this example, it includes some drawlines to see what happens.

warm gorge
#

How could I get x amount of positions evenly distributed around a circle? Would probs be a bit difficult to do

indigo snow
#

theres a few online functions you can seek out for that, its a fairly standard problem

#

im personally a fan of the sunflower one because golden ratio

warm gorge
#

Ill look that up, im not a fan of math so algorithms for stuff like that are confusing to me

indigo snow
#

https://pastebin.com/aXLYieYr
is a way too complicated function that tries to return the approximately closest water position using that algorithm

jade abyss
#

Why not getRelPos then checking if Z-height below ASL? oO

indigo snow
#

i dont remember

#

other than wasting an afternoon with this instead of studying so i kept overcomplicating for the fun of it

jade abyss
#

relPos gives you AGL Pos, so AGLtoASL should be doable.

#

Yeah, pretty overcomplicated^^

indigo snow
#

probably but whats the fun in that haha

jade abyss
#

^^

indigo snow
#

i think it started with using lineInterects radially and seeing when theyd first hit water

jade abyss
#

oh boy

indigo snow
#

then figuring out evenly spaced points on that disc

tough abyss
#

tide height

indigo snow
#

and then it all devolved into maths fun

#

it doesnt take waves into account yet either, i think ๐Ÿ˜›

warm gorge
#

Im having trouble finding algorithms for this point distribution around a circle

jade abyss
#

This adds Nยฐ to the current angle?

private _pos = _origin vectorAdd [_r*cos(_a),_r*sin(_a),0];    ```
indigo snow
#

yea but then the density decreases with the radius

#

also @warm gorge , just google "evenly distributed points on a disc"

#

youll have to convert whatever language to sqf though

#

because complicated can be a fun timewaster

subtle ore
#

0_o

indigo snow
#

if you could look back in this channel there were some earlier non-overengineered solutions but i only kept this one

subtle ore
#

or, perhaps. A solid solution?

warm gorge
#

Ill have a look at that link

#

This seems to be for spreading points completely over a whole disc/circle. I need just on the outer edges. Very confusing

indigo snow
#

ah

#

well thats way easier

blazing zodiac
#

Does anyone know of a way to add an action to each door

#

Basically anywhere the "open door" action exists I need this action to exist

indigo snow
#

here is uniform on disc:
https://pastebin.com/EdrSgsk1
here is uniform on edge:

edgePoints = {
    params["_n","_origin","_radius"];
    _positions = [];
    for "_angle" from 0 to 360 step (360 / (_n - 1)) do {
        _positions pushBack (_origin getPos [_radius, _angle]);
    };
    _positions
};
warm gorge
#

Perfect, works exactly as I wanted. Cheers ๐Ÿ˜ƒ @indigo snow

#

Wait the first example code above worked, whats the edited version for?

indigo snow
#

faster code

#

alternative getPos syntax beats a vectoradd, two multiplications and a cos and sin

#

i originally needed that to make sure the Z stayed 0 but you dont need that i think?

warm gorge
#

For some reason the edited one chooses positions in a straight line in 1 direction to a point of the outside

indigo snow
#

oh

#

switched arguments

#

[_radius, _a] ><

warm gorge
#

ah yep sweet

little eagle
#
_position getPos [_radius * sqrt random 1, random 360];
indigo snow
#

i never realized arma has a map equivalent with linearConversion

#

@hasty violet what happens at L155-157 ?

warm gorge
#

Are there any known issues with playMusic? Im using its alternative syntax (playMusic [name, start]) to play part of a default arma track to all players via remoteExec, but for some reason it sometimes doesnt work, and only plays for some players

indigo snow
#

wouldn't you do _nameColor set [3, (_nameColor select 3) * (_alpha)] there too?

#

but aight i actually thought you overlooked a variable name change or something there

jade abyss
#

overcomplicated.

indigo snow
#

@warm gorge they might have music turned off / volume to 0?

jade abyss
#

Thatss not what i mean.

#

+mtw would work

#

modelToWorld

indigo snow
#

youd still need to take into account the orthogonality of the player screen

jade abyss
#

Yes

#

Nothing

#

It stays above the head

indigo snow
#

he wants above it in screen sense

#

screencoordinate + Yoffset

jade abyss
#

heightDiff + DirDif + linearConversion -> X,Y Pos

indigo snow
#

so you need to transform the modeloffset according to the orientation of player and target

jade abyss
#

way better, vector stuff is... meh^^

#

oO

#

Wayyyyyy to heavy load

indigo snow
#

mhm

#

you could do some angle magic maybe

#

dot the vectorup and relative vector to find angle with horizontal and transform the Z offset vector

#

you can refactor it a lot

#

like the double vectorMultiply on L171

#

vectorUp player is also always [0,0,1]

jade abyss
indigo snow
#

and i still cant visualize why ((vectorDir player) vectorCrossProduct (vectorUp player)) is just a modeltoWorld [0,-1,0]

jade abyss
#

pretty old code and was just for testing. Most of the stuff can be calced with linearConversion

indigo snow
#

you should cache a lot of stuff you calc in here

#

if you calc this every frame you should really store a lot of stuff like colours, classes etc

jade abyss
#

You mean me?

indigo snow
#

nah

jade abyss
#

rgr

indigo snow
#

but like whales colour blind colours, or the config lookups

jade abyss
#

getText stuff?

indigo snow
#

how far is that debugger? be interesting to see how the load is distributed

#
private _vectorDiff = (_targetPosition vectorFromTo _unitPosition) vectorCrossProduct ([cos(getDir player + 90), sin(getDir player + 90),0]));
private _targetPositionTop = _targetPosition vectorAdd (_vectorDiff vectorMultiply (WH_NT_FONT_SPREAD_TOP * _distance / _fov * -1));
private _targetPositionBottom = _targetPosition vectorAdd (_vectorDiff vectorMultiply (WH_NT_FONT_SPREAD_BOTTOM * _distance / _fov));
#

well yea

delicate lotus
#

makes sense

indigo snow
#

drawicon is pretty slow but the other stuff matters too

#

yea but you can and should cache a lot of it

#

and possibly limit the total amount of draws

#

how often will they change colour blind settings?

still forum
#

if you add an ui event handler the code will be executed in a different namespace and a different scope not necessarly.
therefore you don't have _display defined if you grab it out of _this via params then you do

little eagle
#

All non-scripted eventhandlers are executed in mission namespace. And scope is irrelevant too, because local variables carry over into child scopes.
It's different script instances.

nocturne iron
#

@hasty violet do you mind if I pinch some of your code, with attribution of course

nocturne iron
#

Using it for very different purposes so I'll be doing a lot of dissection but the work on managing stances and the math etc is really helpful

#

Thanks for continuing to contribute

tough abyss
#

Hi, I created this message box with BIS_fnc_guiMessage

[] spawn {   
_result = ["Do you want to place the rally point objects?", "Rally Point Objects", "Yes", "No"] call BIS_fnc_guiMessage;   
    if ( _result ) then 
    {   
        hint "Yes";
    }
    else
    {   
        hint "No";
    };        
}  

My problem is that whenever I press the ESC button, it returns false, but I only want it to close the message and do nothing.
Is there a way to configure it the way I need it?

#

Thanks

jade abyss
frosty cave
#

hilarious

#

it's so floaty

jade abyss
#

Also lands slowly, when it reaches you ๐Ÿ˜„

frosty cave
#

is this a public script? I want to play with ๐Ÿ˜›

jade abyss
#

I don't even have a use for it. just played around with that stuff.

nocturne iron
#

dscha that's pretty spooky

jade abyss
#

+Nah, not public.

vapid frigate
#

you implemented pathfinding in sqf?

jade abyss
#

That was the easiest part.

modern sigil
#

@jade abyss I really like this -- you could use this maybe on a unit to maybe try and get them to follow properly like escorting a hostage in vanilla.

jade abyss
#

uhm, no idea.

#

it's more or less just a mix of setVelocityModelSpace and vectorStuff

vapid frigate
#

how do you make it find a path like that?

jade abyss
#

it follows me, every 1s a Pos will be saved in an Array, when its reached -> DeleteAt 0 -> Select 0 (next Pos) in the next run and move to that Pos.

vapid frigate
#

ah ok

#

thought you'd made A* in sqf or something

jade abyss
#

Thats why, it's not a big deal. Just looks funny, how that Box follows me sits right infront of me ๐Ÿ˜‚

vapid frigate
#

which would probably be possible.. but barely feasible let alone for nothing

modern sigil
#

!

#

Great idea -- what if you created a floating object, like a pet, that would follow you around? People would pay for that in Altis Life VIP slots or whatever.

vapid frigate
#

just need to make it so when you turn around and look at it, it drops like at the end

#

would be like the metal gear guy is stalking you

jade abyss
#

Like the ghosts from Mario? ๐Ÿ˜„

indigo snow
#

Why havent people mentioned it needs to explode yet

#

Nice scriptfoo

jade abyss
#

Uh, explosion, good point. brb

vapid frigate
nocturne iron
#

Flying crate VBIED

#

ALiVE better implement it next update or it's not immersive

jade abyss
#

!!

frosty cave
#

dscha's "follow me lootbox"

nocturne iron
#

companion*

modern sigil
#

Yo -- what if it was a createVehicleLocal ammo box that you could store your equipment in?

jade abyss
#

For example

#

I doubt it would work in MP properly (for other players)

nocturne iron
#

http://i.imgur.com/ZrQmYCl.png

is there any way to format drawIcon3D to display multiple images and text like this or do I just need to stuff around with rendering multiple icons?

vapid frigate
#

that's pretty much what the conversation all day today has been about

#

scroll up to see whale's problem

nocturne iron
#

Alrighty

jade abyss
#

TL;DR:
No. Multiple draws must be done.

nocturne iron
#

Damn

vapid frigate
#

yeh.. and it requires some tricky maths to get right

#

so if it's at all possible, controls would be better

nocturne iron
#

Gotta be a 3D render :/

vapid frigate
#

why?

nocturne iron
#

Failing that, I'll just change the design into a static readout

#

Making a C&C ripoff Zeus RTS

#

The effect of the text over the towns would look really nice

vapid frigate
#

you can just use worldToScreenVisual (or related stuff) to position the controls

#

so they still show over the town or whatever

nocturne iron
#

Hm

modern sigil
#

I tried making a Zeus RTS thing a while back but the problem is how that Danger.FSM thing works: as soon as the AI go into combat mode, everything is fucked and they don't listen to you anymore.

#

You'd have to make it into a mod with your own custom RTS AI overriding the vanilla stuff.

nocturne iron
#

I'm strongly considering it

#

So far though, it's more of an evolution of Warfare and focuses on slower combat speeds

nocturne iron
#

I think I've found a work around

nocturne iron
#

@vapid frigate @hasty violet

Managed to get the multiple drawIcon3D icons to line up not terribly

#

Only works if you specify a specific render range though

chrome mason
#

_veh == "O_Heli_Light_02_F" || _veh == "O_Heli_Light_02_v2_F" This would be an or command right? this thing: ||

nocturne iron
#

Yeah

chrome mason
#

sweet so i can add more in that statement?

#

if(_veh == "O_T_VTOL_02_vehicle_F" || _veh == "O_T_VTOL_02_infantry_F" || _veh == "O_T_VTOL_02_Infantry_hex_F") then Like this for all the colours of the xi'an?

quasi rover
#

Is it Okay to use same variable name but different type on Eden editor? e.g. variable name: AA1 of empty marker, aa1 of object(Turret).

nocturne iron
#

@chrome mason yep. gp wo;d

#

Marker names and variables aren't the same thing @quasi rover

#

so it's fine to duplicate

jade abyss
#

@chrome mason

if(_veh in ["O_T_VTOL_02_vehicle_F","O_T_VTOL_02_infantry_F","O_T_VTOL_02_Infantry_hex_F"}) then ```
nocturne iron
#

a good convention would be calling the marker "m_aa1" though