#arma3_scripting

1 messages ยท Page 275 of 1

indigo snow
#

Think carefully for yourself what your cases are.

rotund cypress
#

Is it possible to set a background of a RscActiveText?
With Style = ST_PICTURE

cerulean whale
#

What's the command to hide the frame around an RscText (with Style ST_MULTI) or an RscEdit?

#

I've tried all these ```SQF
colorBackground[] = {0,0,0,0};
colorActive[] = {0,0,0,0};
colorBackgroundActive[] = {0,0,0,0};
colorBackgroundDisabled[] = {0,0,0,0};
colorDisabled[] = {0,0,0,0};
colorFocused[] = {0,0,0,0};
colorShadow[] = {0,0,0,0};
colorBorder[] = {0,0,0,0};

manic sigil
#

That is sadly obvious in hindsight. I'm still thinking in a round compass way, not just flat numbers :/

halcyon crypt
#

define "frame" @cerulean whale

cerulean whale
#

A small line that goes around the outline. I will send a sc, 1 secv

manic sigil
#

Nevermind, I finally see what's happening... since I have two 'on target' states, since one is complete the other feedback is overwritten for the first case.

tough abyss
rotund cypress
#

Is it possible to set a background of a RscActiveText?
With Style = ST_PICTURE

tough abyss
#

Does it support it?

rotund cypress
#

I'm note sure

tough abyss
#

Looked at the root configs?

rotund cypress
#

no actually not

tough abyss
#

I see a style member variable

#

in the RscActiveText root

#

style = 2;

rotund cypress
#

What does that mean?

tough abyss
#
     Display options:

    0 (ST_LEFT): Text is left-aligned.
    1 (ST_RIGHT) : Text is right-aligned.
    2 (ST_CENTER): Text is centered.
#

Nope no textures

rotund cypress
#

But ST_Picture?

#

It should also be there?

tough abyss
#

Nope

rotund cypress
#

basically I have style set to style = 0x30;

#

on RscActiveText

tough abyss
#

You can use inherited structure to achieve it.

#

Cancel button uses RscActiveText

#

in the arma 3 menu

rotund cypress
#

What do you mean by inherited structure?

tough abyss
#

All GUI data is inherited data structures

#

Meaning one thing inherits the characteristics of the next.

#

It's an OOP thing.

#
class RscActiveText
{
    deletable = 0;
    fade = 0;
    access = 0;
    type = 11;
    style = 2;
    h = 0.05;
    w = 0.15;
    font = "TahomaB";
    sizeEx = 0.04;
    color[] = {1,1,1,1};
    colorActive[] = {1,0.5,0,1};
    colorDisabled[] = {1,1,1,0.25};
    soundEnter[] = {"",0.1,1};
    soundPush[] = {"",0.1,1};
    soundClick[] = {"",0.1,1};
    soundEscape[] = {"",0.1,1};
    text = "";
    default = 0;
    shadow = 0;
};
#

Base class

#
class ButtonOK: RscActiveText
        {
            idc = 1;
            x = 0;
            y = 0;
            w = 0;
            h = 0;
            default = 1;
        };
#

ButtonOK inherits from RscActiveText

#

So all the characteristics in RscActiveText are basically placed into ButtonOK

rotund cypress
#

Oh yeah now I see what you mean yeah i have that for everything

tough abyss
#

colorActive you possibly could use an image.

rotund cypress
#

Those buttons is all made with RscActiveText

#

What I want to accomplish is a background on each button

tough abyss
#

Just a color?

#

or an image?

rotund cypress
#

Background colour

tough abyss
#

Ah now I know what you mean

#

So do you want hightlight color?

#

when you hover?

rotund cypress
#

No

tough abyss
#

or do you want a color always?

rotund cypress
#

Colour always

tough abyss
#
colorBackground[] = {r,g,b,a};
rotund cypress
#

already tried

#

didnt work

tough abyss
#

What color did you set it as?

rotund cypress
#

1,1,1,1

tough abyss
#

So white?

#

You do know you have to go back to the main menu

#

to reload GUI yes?

#

GUI data is stored in UI-namespace

#

So go back to the server-browser

#

page

#

then reload the mission.

#

IF on your local listen server

rotund cypress
#

Alright maybe thats it, ill test

#

Ye im testing locally

tough abyss
#

Yeah GUI is stored UI-Namespace

rotund cypress
#

also

#

1,1,1,1

#

Is white

tough abyss
#

Yes

rotund cypress
#

Yeah just said it cause you said it was black above xD

tough abyss
#

Yeah sorry

#

0,0,0,1 would be black

rotund cypress
#

ye ๐Ÿ˜„

tough abyss
#

Reload the mission?

rotund cypress
#

One sec

#

no background

tough abyss
#

Hmmm

#

Have you got all the classes?

#

Everything that says required "yes"

rotund cypress
#

actually

tough abyss
#

Make sure you have it.

rotund cypress
#

colourbackground[] =

#

๐Ÿคฃ

tough abyss
#

Didn't add the [] array definer?

rotund cypress
#

coloUr

#

color*

tough abyss
#

Difference of spelling

#

yeah BI use American spelling

#

for color

rotund cypress
#

๐Ÿ˜ฆ

tough abyss
#

same with armor

#

Which is quite ironic

rotund cypress
#

Considering european country

tough abyss
#

because they're a czech company.

#

Yeah

#

All the naming for body parts are also in czech

rotund cypress
#

ye

#

One more thing

#

ctrlSetFade 1

#

does that fade to visible?

#

or is 0 doing that?

tough abyss
rotund cypress
#

cant find fade

tough abyss
#

Found it

#

I hate the wiki

#

Damn rabbit hole

#

_ctrl ctrlSetFade 1; // hides the control

_ctrl ctrlSetFade 0.5; // control is 50% visible

_ctrl ctrlSetFade 0; // control is fully visible
rotund cypress
#

^

#

I tried that example

tough abyss
#

You also have to ctrlCommit

rotund cypress
#

But it seemed to fade the control to invisible

tough abyss
#
controlName ctrlCommit time 
#
_ctrl ctrlSetFade 0; // control is fully visible
#

Thats confusing.

#

1 == Alpha 100%

#

normally.

#

0 == 0% Alpha

rotund cypress
#

so alpha 100 is totally invisible then

tough abyss
#

instead it's 0% == 1;

#

100% == 0;

#

BI why can't you keep a "standard" of design.

#

facepalm

rotund cypress
#
    _ctrl ctrlSetFade 0;
    _ctrl ctrlCommit 5;
    _ctrl ctrlSetFade 1;```
#

Im doing this

tough abyss
#

Yeah

#

So whats happening here is

   _ctrl = _display displayCtrl _x;
    _ctrl ctrlSetFade 0; // Fully visible
    _ctrl ctrlCommit 5; // Commit change in 5 seconds
    _ctrl ctrlSetFade 1; // Fully Invisible
#

So you need this.

#
 _ctrl = _display displayCtrl _x;
    _ctrl ctrlSetFade 1; // Fully Invisible
    _ctrl ctrlCommit 5; // Commit change in 5 seconds
    _ctrl ctrlSetFade 0; // Fully visible
#

@rotund cypress

rotund cypress
#

ye trying now

#

    // -- Display Control
    _ctrl = _display displayCtrl _x;
    _ctrl ctrlSetFade 1;
    _ctrl ctrlCommit 3;
    _ctrl ctrlSetFade 0;

} forEach [ 1231323, 123123, 123132, 123124 ];```
#

This just makes it invisble after 3 secs

tough abyss
#

The problem is probably the IDCs

#

fault.

#

See if they're hiding something.

rotund cypress
#

and now its not doing anything

#

    // -- Display Control
    _ctrl = _display displayCtrl _x;
    _ctrl ctrlSetFade 0;
    _ctrl ctrlCommit 3;
    _ctrl ctrlSetFade 1;

} forEach [ 1231323, 123123, 123132, 123124 ];```
tough abyss
#

...

#
 _ctrl = _display displayCtrl _x;
    _ctrl ctrlSetFade 1; // Fully Invisible
    _ctrl ctrlCommit 5; // Commit change in 5 seconds
    _ctrl ctrlSetFade 0; // Fully visible
#

1 == Invisible

rotund cypress
#

that made them invisible

tough abyss
#

0 == Visible

rotund cypress
#

when I did that

#

after 5 seconds

tough abyss
#

Hmmm.

#

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

rotund cypress
#

its very weird

tough abyss
#

ArmA 3 always is.

#

Use pseudo-code

#

Thats what I'd do.

#

It makes you life so much easier.

#

It speeds development period.

rotund cypress
#

I agree with pseudocode

#

Why not

tough abyss
#

You end up with a better result in the end

#

if you mock up what you need to do in natural english.

#
forEach [Player name And FPS] in list
            add to ClientFPS list
            if Client is in FPS list.
            Delete client from list 
            add updated entry to list.
#

I needed to make a comparison between the 2 values

#

Instead of 1

#

Comments are not necessarily psuedo-code

#

See how that contains keywords?

#

forEach [Player name And FPS] in list
add to ClientFPS list
if Client is in FPS list.
Delete client from list
add updated entry to list.

#

Reversing certain things also helps as forEach syntax in "true" languages.

#

Has a lot of functionality.

#

PHP vs ArmA 3 ForEach

#

PHP eats arma 3 alive.

#

Yeah.

#

Pseudo-code is helpful. Only language thats comparable to A3

#

is C-code

#

Hell you can even make structs in A3

#

C is closest to SQF

#

It's why with code.

#

*3 backticks c *

#

" `c

#

you can use keywords in discord

#

to syntax highlight.

#

cs after the beginning 3 backticks == C#

#

cpp after the beginning 3 backticks == C++

#

js == JavaScript

#

java = Java

#

etc.

#

I read the GUI in arma 3 using C++ highlighting.

#

and description.ext's

#

Whats the quickest way to replace an entry in an array @tough abyss

#

python for example has .insert([index],value] method.

#

Whats A3 equivlent ?

#

Why couldn't BI have just made accessing Indexes this syntax ?

#

Array[index]

#

Instead it's this screw-nuttery. _array select _something

cerulean whale
#

They have to be special

#

I found out today there is a cheat menu on multiplayer servers that anyone can access

#

sigh

#

so stupid

tough abyss
#

Which cheat menu?

#

Is this inside the GUI namespace?

cerulean whale
#

Place items on ground, end mission before SQL saves

#

and it bypasses handleDisconnect

tough abyss
#

Just listen for onCheat

#

Executes custom statement when player enters GETALLGEAR cheat (see: GETALLGEAR).

#

onCheat = "_this kick player ";

rotund cypress
#

I just supplied a fix for you @cerulean whale

#

Did that not work?

cerulean whale
#

@rotund cypress I used a similar thing but did it slightly diferently. @tough abyss that only works for GETALLGEAR, not things like ENDMISSION which is used to dupe

rotund cypress
#

What did you do differently @cerulean whale

tough abyss
#

You know if you want to be an ass?

#

and stop the server

#

BIS_fnc_shutdown;

#

xD

#

Hooks the exit button

cerulean whale
#

I just have no idea why they would put that in their game on MP. Saved Data to SQL, Logged to RPT, Broadcast. Kick from game. I am also just running the Shift + - through my keyHandler

#

@tough abyss You can't run that through this menu though, can you?

tough abyss
#

If it allowed global execution possible

#

Could also close everyones game xD

cerulean whale
#

Yeah

tough abyss
#

Everyone and the server.

cerulean whale
#

It's kinda funny haha

rotund cypress
#

But ben

tough abyss
#
/*
    Author: Karel Moricky

    Description:
    Shut downs the game.

    Parameter(s):
    NOTHING

    Returns:
    NOTHING
*/

//--- Open options menu (forces to return to main menu)
ctrlactivate ((finddisplay 0) displayctrl 102);

//--- Close options menu
(finddisplay 3) closedisplay 2;

//--- Activate exit button
ctrlactivate ((finddisplay 0) displayctrl 106);
#

hahah

#

It's funny to use on hackers.

rotund cypress
#

@cerulean whale If you kick them, its the same as using the cheat

tough abyss
#

I did that to a hacker once.

#

It was funny.

#

He was trolling our server so I used remoteExec from the server

#

And closed him and his game xD

cerulean whale
#

@rotund cypress Yes and no, I am saving to the SQL first. I use the kick to make sure they don't access anything first. but I save to SQL before that

rotund cypress
#

Why not just block the key with the script I made?

tough abyss
#

Ah key handler

rotund cypress
#

Solves all your problems

tough abyss
#

Shift + Minus

cerulean whale
#

Yes, but I also want to do some research into how many people use it and such.

rotund cypress
#

You can still do that

#

Just log it

#

When they press it

cerulean whale
#

Plus kicking lets all the kids know not to use it haha

rotund cypress
#

Well with this menu they CANT use it

#

And if you just stick a logging thing in there you can log it aswell

#

But if you let them use it, they can still combat log and shit silently without you ever knowing about it

#

Unless you log that aswell

#

But this will just prevent it completly

tough abyss
#

Do you guys know if you can use BIS_fnc_MP ?

rotund cypress
#

I dont think you can anymore

tough abyss
#

to remoteExec BIS_fnc_shutdown ; ?

rotund cypress
#

Probably not

cerulean whale
#

Another issue though @rotund cypress The guys who I am doing it for aren't very good with SQF and such, I don't have time to walk them through setting crap up

tough abyss
#

*uses it on self for amusement

rotund cypress
#

You dont need to lulz

cerulean whale
#

Why don't you just remoteExec it? @tough abyss

rotund cypress
#

Just stick it in there ๐Ÿ˜„

tough abyss
#

Trying now.

cerulean whale
#

I gave them your thing and they said "What do I do with this" xD

rotund cypress
#

Then you tell them this: just copy and paste it into initPlayerLocal

tough abyss
#

SimZor

#

Show me the code?

rotund cypress
tough abyss
#

Sounds like an OnKeyPressedHandler

rotund cypress
#

nope

#

keyDown

tough abyss
#

Yeah.

#

Trying out BIS_fnc_shutdown; on my server.

#

I will so roflol if it causes my entire game to shutdown

#

Wonder if it would even invoke on the server-side

#

As the dedicated has no GUI

cerulean whale
#

Can you remoteExec a function via UID? If I wanted to execute it to one client would I just use remoteExec ["Function", UID]? or would I have to define the UID within the function and execute globally?

tough abyss
#

Just find their ID

#

I'm making a menu that lists all IDs

cerulean whale
#

or I could just make a small group of functions to do it

tough abyss
#

and names. next to the IDS

cerulean whale
#

I'll just make a function for it

#

global exec it with two parameters, player name you wnat to execute and what function

tough abyss
#

Could use it against a hacker as I said.

#

Yeah

cerulean whale
#

global remoteExec to check for the first param, then execute it for that player

tough abyss
#

[] remoteExecCall ["BIS_fnc_shutdown",hackersID,false];

#

And being executed server side.

#

It won't be restricted.

#

So use it for your own amusement

#

If your worried you can also check the player executing it is a valid UID

#

stored in a cfg file

#

Hmm

#

Looks like it's been disabled.

#

I'll see if I can get it work by correcting the GUI ID references.

#

Yeah the wrong IDC's

#

I can actually get this to work again ? Nope Access Protected for a Reason @cerulean whale

#

All button classes have an access layer allowed of = 0;

#

If you're familiar with that @cerulean whale

#

Welp I found out how to remote crash arma 3

#

@rotund cypress Might want to patch this one.

tough abyss
#

I love symbolic links

#

Hooking my github into the symlink back to a set of files I can live edit

#

and reflect the changes in the original file folder without all those files being present in that folder

fierce lantern
#

any clues on how to get enemy vehicles to respawn with AI in?

tough abyss
#

BIS_fnc_spawnGroup ?

tough abyss
#

Stupid question

#

how can I compare a previous value to a new value in a publicVariable?

#

["Player: Mr-Bob","FPS: 99"]

#

Need to look at the next index

#

If Mr-Bob matches MR-bob

#

replaces the FPS: with the current FPS

#

But any references I make are always back to Clientmsg

#

which never has a "stored" previous value

#

the only way I can think of doing this is using an array.

loud python
#

guys I have a new question

#

is there a way to make an enemy sit down but let him get up if he feels the need to? (If he hears shots, sees an enemy, etc.)

#

in other words, when his behavior changes from safe to combat/aware

dusk sage
#

@tough abyss Did you just say C is the closest to SQF?

#

Also can you elaborate on your question

#

I.e context

meager granite
#

@loud python _unit playAction "SitDown";

#

not sure when they get up though, I don't deal with AI

tough abyss
#

@dusk sage Same problem as yesterday.

#
Clientmsg - [
                ["Player: Mr-Bob","FPS: 99"],
                ["Player: Mr-catman","FPS: 79"]
                ];
#

Problem is finding the entry of the player

#

then looking ahead, to say does the FPS match, or not?

#

If it does, don't do anything

#

if it changed then updated it with the most recent record.

#

Only problem is my array is double nested.

#

so I need to retrive the entry, then look inside that entry for players name then look at FPS entry.

#

IF it matches do nothing

#

if it matches remove that record and update it.

#

So I need to know the current record

#

and previous record

#

Check if they are equal

#

but having the variable simply recieving the msg is not enough. I need a way to store the previous and compare it to the current @dusk sage

#

So I already know my requirements

dusk sage
#

Like I said yesterday, you should look at the array search method I sent you @tough abyss

#

Your previous value is already in the array, everything you need is there

#

If you know the index of the array, you can check the value as need be

tough abyss
#

Wierd question why havn't they made a new varient of find that allows for searching an array in an array?

dusk sage
#

I mean, a scripted implementation is trivial, is there truly a need?

#

Then again, there is dozens of useless or unneeded commands

tough abyss
#

I just thought having it engine native might? Make it faster?

dusk sage
#

Of course

tough abyss
#

much like deleteAt deleteRange ?

#

ohhhh.

#

I now realise what function you wrote.

#

Linear search.

dusk sage
#

Yes at the top of the hastebin

tough abyss
#

yeah I copied it.

dusk sage
#

If will return the parent index

#

Can't get any simpler

#

Adding anything more would be unneeded

tough abyss
#

I was trying to do some overly complicated way.

dusk sage
#

The hastebin should have contained the exact implementation you wanted

tough abyss
#

I have it.

#

Now with the index just use set [_index, value to replace];

dusk sage
#

If you only want to update if the FPS has changed, just check the first index of the found array

#

Yeh, as I wrote

#

And if they weren't found, pushBack their new array

tough abyss
#

find_index function

#

do I have to compile that?

dusk sage
#

No, its a code type already

#

You can call it as is

tough abyss
#

are inline functions worse or better than Functions-as-files?

dusk sage
#

I changed the method after first sending it, so make sure it was a forEach, not count

#

You must understand that 'functions as files' just end up as code within a variable

#

Albeit, compileFinal'd with some header inserted

tough abyss
#

But it hasn't answer the other question

#

What is the best way to compare 2 values?

#

2 different values?

#

feed them to an array?

dusk sage
#

I'm confused what you mean

#

Comparing two values? Literally?

tough abyss
#

One the changes compared to another.

dusk sage
#

var1 isEqualTo var2

#

Or ==, whatever floats your boat

tough abyss
#

PV_array = [1,0];

#

then that PV changes

#

and is recieved by PVEH

#

I was having trouble simply being able to compare a time dependent variable.

dusk sage
#

That PV changes?

tough abyss
#

I couldn't do this. Such as assigning a _temp = (PV_array select 0);

dusk sage
#

You know the new values from the PVEH args

tough abyss
#

then doing an _temp isEqualTo (PV_array select 0)

dusk sage
#

The old values are in the array

#

Using the hastebin I sent you before

#

You'd do something like

#

if !(_newFPS isEqualTo (clientFPS select _index select 1)) then {use set}

tough abyss
#

Where would you assign _newFPS?

#

Yeah you just answered my question.

#

The only way to keep track of previous values

#

is to use an array correct?

#

@dusk sage

dusk sage
#

Well if you want to store both their name and FPS, then an array is preferable

tough abyss
#

Doing _name = rebind to other variable doesn't work

#

One of the key differences with an actual programming language

dusk sage
#

You've lost me there

tough abyss
#

1 number or variable object is not the same as another.

dusk sage
#

๐Ÿค” ?

tough abyss
#

Unless you explicitly made it so.

#

It's got to do with memory locations and object declarations

#

I'll give an example.

dusk sage
#

I don't understand what you're saying

#

Yeah, that'd be good

tough abyss
#

nvm I was wrong.

dusk sage
#

Explain?

#

๐Ÿ˜›

tough abyss
#
>>> id(name)
1663710992
>>> id(othername)
1663710992
>>> id(1)
1663710992
>>> id(1)
1663710992
>>> id(2)
1663711008
>>> id("1")
19452640
>>> id("1")
19452640
#

ID's referencing memory addresses

dusk sage
#

What is this in sorry?

tough abyss
#

Python

#

But back to my original statement

#

The thing I needed to keep track of previous and current values was an array.

#

So this.

#
find_index = {
    params["_toFind", "_array"];
    private _ret = -1;
    {
        if (_toFind in _x) exitWith {
            _ret = _forEachIndex;
        };
    } forEach _array;
    _ret;
};
dusk sage
#

Pythons id() doesn't given you a memory address

tough abyss
#

Yeah it does

dusk sage
#

99% sure it doesn't

dusk sage
#

Yes if you read what every comment says

#

It tells you it is not a memory address

#

It is just int that's guaranteed to be unique

tough abyss
#

Ah I see only applies to small ints

dusk sage
#

A linear search yeah

#

Or without the fancy words

#

Looping through the elements

tough abyss
#

then breakout the loops. when you find the index.

dusk sage
#

๐Ÿ˜„

#

Yes

tough abyss
#

I am still going to get myself a data-structures and algorithms book

dusk sage
#

Algorithms start to get really icky in certain languages ๐Ÿ˜ƒ

tough abyss
#

Doesn't surprise me.

dusk sage
#

Are you experienced in any languages?

tough abyss
#

It's why they reduce it to Discrete math.

#

No.

#

I've tinkered with Python,

#

C

#

C++

#

C#

dusk sage
#

Oh god

tough abyss
#

Inb4 not C#

#

C# -> SpaceEngineers

dusk sage
#

That isn't a good mix to keep switching between ๐Ÿ˜›

tough abyss
#

Not sure which one I should stick with?

dusk sage
cerulean whale
#

@tough abyss I made a system for remoteExec by name. Better than the concept I came up with. .

loud python
#

@meager granite that works exactly as I want it to, thanks ๐Ÿ˜ƒ

#

any idea what's wrong with (behavior this != "SAFE")?

#

because apparently that is missing a )

indigo snow
#

typo

#

behaviour

loud python
#

oh, okay

#

thanks xD

#

damn, even GCC gives more meaningful error messages =/

#

๐Ÿ˜ญ

#

0 = [] spawn {while (behaviour this == "SAFE") {sleep 1}; hint "Asset Activated";};

#

What have I done wrong this time?

#

0 = [] spawn #{while (behaviour this == ... missing ;

round scroll
#

while { code } do { code }

loud python
#

thanks

#

dealing with AI is annoying...

#

can I use selectWeapon to have an enemy switch to his handgun or is there a better way?

steel mantle
#

Did anyone find out a way to log the "ENDMISSION" for combatloggers?

dusk sage
#

damn, even GCC gives more meaningful error messages =/
Nailed it @loud python

cerulean whale
#

@steel mantle I just use a script to block the menu, log it, save their data, then ban / kick them xD

cerulean whale
#

Is there a way to make a RscButton have a picture background?

stoic sphinx
#

Not that I'm aware of

rotund cypress
#

You can just block it through that

#

so the key wont actually work at all

#

so @cerulean whale how are you banning them then from in-game? ๐Ÿคฃ

cerulean whale
#

I have it setup for a 24h ban if the spam it xD

#

It's a DB thing

#

I do all whitelisting / bans through DB, unless they are for hackers and the like, then I use RCON

#

but you can't initialise if you're banned

rotund cypress
#

k

#

im sure its better to ban people for using something that is just easy to block so you wont loose players, good thinking!

cerulean whale
#

Lol, It's only if they spam it

#

haha

#

they get warnings

#

and It's blocked anysway

rotund cypress
#

im sure its great to even let them spam it

cerulean whale
#

Because I've seen people get around keyDown handlers that block something

rotund cypress
#

and if its blocked why do you need to save it?

#

and no, you cant get around this

stoic sphinx
#

Any way to detect setDamage with an eventHandler? Doesn't seem possible, but you guys might have some ideas

rotund cypress
#

damage player?

#

can you elaborate a bit on that?

#

what you actually want to do? @stoic sphinx

loud python
#

well you COULD periodically check for the players health, but that would be quite a hack

dusk sage
#

Or just take note of when you use setDamage

stoic sphinx
#

@rotund cypress I'm trying to detect when a zombie hits a player. The zombie uses setDamage to hurt the player

#

Its fine now, I've used AnimChanged

dusk sage
#

If you coded the setDamage, you always know when setDamage has been used

rotund cypress
#

Does anyone know what the difference is between RscListNBox and RscListBox?

loud python
#

@stoic sphinx another way would be to modify whatever script calls setDamage, but that might come with it's own set of problems. Maybe you could contact the author of that script and ask them to add hook to let you run some aditional code? (I am assuming it's not your own code, otherwise you could obviously just add your code after the setDamage)

dusk sage
#

gah

#

@native hemlock !

native hemlock
#

Wrecked

steel mantle
#

@rotund cypress @cerulean whale Thanks allot ๐Ÿ˜ƒ

rotund cypress
#

Thanks guys

rotund cypress
#

I saw that scriptname could be used in dialogs aswell, but I cant find any information on it. I can only find coverage on scriptName command in SQF

#

What is it used for?

dusk sage
#

Gives the file a nice name

#

spawn handles etc

rotund cypress
#

spawn handles?

dusk sage
#

_handle = [] spawn xxx;

rotund cypress
#

So you mean I could name the dialog "dialog"

#

and then open the dialog through [] spawn dialog; ?

dusk sage
#

Where did you read it could be used in dialogs?

#

And no, you can't load the dialog like that, it's not an SQF file

rotund cypress
#

I've seen both scriptPath = ""; and scriptName = "";

#

In dialogs before

#

I'm pretty sure I saw it when I looked through Bohemias code

#

I know it can be used for scripts

#

xD

dusk sage
#

Think you're confusing things

#

Unless you have an example of this

native hemlock
#
class Display3DENTutorial: DisplaySimulated
{
    idd = 318;
    scriptName = "Display3DENTutorial";
    scriptPath = "3DENDisplays";
rotund cypress
#

^^^

dusk sage
#

Do you know what purpose it would serve (practically)? @native hemlock

#

re scriptName

native hemlock
#

Sort of

#

Well I know where it's used, I just don't know if it has a practical purpose

dusk sage
#

๐Ÿ˜‰

native hemlock
#

BIS_fnc_initDisplays uses both of them

#

Yeah it's not something people need to concern themselves over, it's just part of how BIS does their dialogs

rotund cypress
#

What is it used for though, if you know? @native hemlock

#
    if (cheatsenabled) then {
        _scriptName = _class;
        _scriptPath = _path;
        uinamespace setvariable [
            _scriptName + "_script",
            compileFinal (
                format [
                    "scriptname '%1'; _fnc_scriptName = '%1';",
                    _scriptName
                ]
                + 
                preprocessfilelinenumbers format ["%1%2.sqf",gettext (configfile >> "cfgScriptPaths" >> _scriptPath),_scriptName]
            )
        ];
    };```
#

Does it have to do with that?

#

To get the scriptname from the dialog and the like turn it into whatever + _fnc_scriptName?

native hemlock
#

Something like that. I don't fully understand it, but BIS_fnc_initDisplays compiles UI scripts that aren't listed in CfgFunctions and saves them to UI namespace. It also adds a header to the files like CfgFunctions automatically does that sets the scriptName of the file.

rotund cypress
#

Oh ok I see

native hemlock
#

commy probably knows

dusk sage
#

I mean

#

If you look at it

#

It's nothing unfamiliar

#

It's doing as you said, CfgFunc headers

#

Then is grabbing the path from a config

rotund cypress
#

Yeah cfgScriptPaths

#

So it would really be the same as CfgFunctions

#

But a different way

#

And I think they use it because then it's faster to load all controls

#

Because everything is loaded on mission startup once

#

And then everything is already loaded when you need to open it

#

So it's a tiny bit faster

#

IIRC

summer valve
#

is there a CLI way for me to connect to an Arma3 server while the game is running ?
Basically a way like steam://connect=<IP> that works? Since that method apparently only works for Valve owned games like CS:GO but not for Arma 3 ๐Ÿ˜ฆ

cerulean whale
#

You can do a similar thing at @summer valve I can't remember it though, it's been ages since I saw something that did it

summer valve
#

@cerulean whale I spent some time looking around but neither the steam documentation nor the community wiki was helpful :/ Do you remember which program used that similar method?

nocturne iron
#

Is there a limit to how many scripts can be execVM'd at the same time?

#

nevermind, was encountering issues with call functions taking forever due to a packed init
tough abyss
#

@nocturne iron Just spawn a VM script every 0.5 second

#

s inside scheduled environment and watch the FPS

#

and count(diag_activeSQFScripts);

cerulean whale
#

Anyone know how to make a button have a picture as the background? I've been messing around with it all day but to no avail

rotund cypress
#

Is there a way to disable group images for arma xml groups or whatever they're called? Like the images that shows up on clothing and vehicles.

dusk sage
#

MaxCustomFileSize = 0;? @rotund cypress

#

Not quite sure, but that should work

#

But may kick people

blazing zodiac
#

Anyone know if the flyInHeightASL command is bugged again with loiter type waypoints? I know after the intial implementation it was bugged for loiter type waypoints (the main time you would wanna use it) and they had fixed it but it seems to be bugged again in my mission.

tough abyss
#

@summer valve It should work, both game and Launcher handles this. The exact form is this: steam://connect/<IP>:<GamePort+1>

#

@summer valve The trick with this steam protocol command is that you have to specify the server exactly, because Steam have to look it up to first to determine what game it is and then start that game. The other thing is that it will obviously work only for the games that are available through Steam server browser (so it won't work for LAN), otherwise Steam can't determine what game it is. And please note that the port you have to specify is not the game port, but the Steam port (which is always game port + 1).

blazing zodiac
#

Actually looks like flyInHeightASL is just straight up broken now, with the Yabon's at least.

tough abyss
#

use BIS_fnc_Flyby watch your ambient plane crash into the ground if the height isn't > 400M

#

Watch what happens

blazing zodiac
#

Man that was a pretty sweet month or 2 there where UAVs were actually usable from a mission makers perspective.

cerulean whale
#

@tough abyss I usually do that but I am doing a complicated show / hide system. I will juat add a show / hide thing to picture as well

summer valve
#

hmm @tough abyss I may still need your hand. Let's say the server IP is 91.121.245.93:2302.
If I run steam://connect/91.121.245.93:2303 the server information is getting displayed correctly, but the game is also trying to use port 2303 to connect which obviously fails (-> Connecting failed.)
Running steam://connect/91.121.245.93:2302 won't retrieve the steam server information as you said

little eagle
#

commy probably knows
: )

rotund cypress
#

@dusk sage I only want to limit it for a certain faction, not for everybody

#

Yes, @little eagle! Do you know why BI uses functions like BIS_fnc_initDisplays and scriptname and scriptpath in all their displays?

little eagle
#

To execute some additional SQF that runs for the display

#

it's their framework

#

unfortunately not usable by modders, since the folder paths are hard coded to BI pbos

#

CBA has displayLoad event handler for all of them though

rotund cypress
#

@little eagle But you can use onLoad and unLoad eventHandler?

little eagle
#

yes

tough abyss
#

"Local" EventHandler work with units?

loud python
#

Does anybody know if there's an event handler or some other sort of hook to execute code when a slingloaded vehicle is released? (for example, to add a parachute)

split coral
#

RopeBreak EH?

loud python
#

that would trigger with any rope, wouldn't it?

#

so it could lead to problems with mods that use ropes

split coral
#

yeah, possibly

#

"Triggered when a rope is detached from an object.
In the case of sling loading, this event handler must be assigned to the helicopter and will trigger for each detached rope. "

loud python
#

in that case it's just a workaround for what I want

#

it would work, but could lead to problems with mods, which is undesireable

rotund cypress
#

I personally use the ropeAttach in order to check if a vehicle is in the list of whitelisted vehicles to slingload, but as greenfist ropeDetach or whatever its called should work fine.

#

What is it that you want to do?

loud python
#

by the way, are there no global hooks other than the few .sqf files you can add? like, an event handler for any sling load release, not just for a certain vehicle

rotund cypress
#

You can add it to a vehicle when it's spawned

loud python
#

@rotund cypress I want to add a parachute when releasing a slingloaded vehicle from above a certain height

rotund cypress
#

How are you spawning these vehicles because the EVH can be attached then.

loud python
#

pretty much like when dropping a loaded vehicle from a blackfish

#

the event handler has a flaw though, that it triggers for all ropes, even if it has nothing to do with slingloading

rotund cypress
#

What other ropes is there than Slingloading ropes?

loud python
#

for example, what if some mod decided to use ropes to simulate refueling?

#

not sure if that will ever happen, but that's not the kind of unsafe code I want my missions to have

rotund cypress
#

Well you can make some checks

loud python
#

let's assume there's a few more mods: slingloading for blackfish, air refueling and either as a mod or as a script in the mission file the parachute thing

rotund cypress
#

I'm guessing you are making a Wasteland similar feature to airdrop. Then you can just make a variable when it is starting and then if that variable is false on ropeDetach then you dont add a parachute in the EVH

loud python
#

if the blackfish now attempts to refuel, upon releasing it would suddenly be attached to a parachute

rotund cypress
#

Not if you set a variable

#

And only to add that parachute when that variable equals to true

loud python
#

what if you're refueling while slingloading something? xD

#

Look, I know it's fairly safe code

#

I just don't like it

#

it goes against my coding phylosophy to write ode that "probably won't cause any problems"

rotund cypress
#

I agree with what you say there, but I'm out of options then I'm afraid. Are you certain that it could be done at the same time? Why don't you make a check to see if its slingloading and then you'll just make it unable to fuel at the same time.

#

Problem solved then.

#

Otherwise I don't see any other option really.

loud python
#

That was just an example, I'm not actually dealing with any mod of that kind

#

but it illustrates the problem I have with that workaround

#

there might be other similar situations that I'm not even considering right now

rotund cypress
#

Well, you will burn yourself out if you sit and think of 100 different ways it could fail. I mean, it's good but you can't catch them all in some situations.

loud python
#

I will probablt end up just using the ropeBreak event handler, but I will need to take a shower after implementing that because of how dirty I will feel

rotund cypress
#

OMG, LMFAO

#

It's so lovely to see some people think like that and really think about beautiful code, but how some people who just blazantly write dirty and shit code without giving a f***

loud python
#

I bet arma 3 would have less memory leak problems if no dev ever thought "This isn't technically 100% safe but I bet it won't ever actually cause problems"

rotund cypress
#

Probably

tough abyss
#

Question, easiest way to detect if player has entered a firefight? Either shooting or getting shot at?

rotund cypress
#

firedNear

#

or onFired EVH

loud python
#

with AI I'd say check the behaviour

#

don't think that works with players though (probably not)

tough abyss
#

More for player use.

#

Thanks on the firedNear tip

#

Will go with that one.

loud python
#

will firedNear detect being shot at from 1km from a sniper though?

#

or from 500m from an HMG

tough abyss
#

Not necessarily I believe.

loud python
#

or a tank, or artillery, etc.

rotund cypress
#

I think as long as the projectile is within 50 metres

#

of the target

loud python
#

that's the thing, it could either be the bullet passing by the object, or being fired near the object

tough abyss
#

But it is mostly for triggering some ambient noise during a mission (intense music playing...) lol

loud python
#

that would make quite a significant difference

#

then maybe use a detected by trigger?

tough abyss
#

Intense music won't need to play when they are getting sniped at, but more a high pace, close encounter

loud python
#

pfff... I had this great idea of calculating shots per second that are passing the player, building an average over a minute or so and choosing the music based on that

#

then I remembered: sqf

tough abyss
#

haha nice

#

Not trying to make it too complicated, just a few lines.

loud python
#

yeah such a feature would have to be coded into the engine to work

#

hey, there's another task for BIS

#

make a combat intensity variable/function

tough abyss
#

_intensity = [] call BIS_fnc_firefightIntensity;

loud python
#

and maybe a combat distance one as well

tough abyss
#

diag_log format [%1, _intensity];
IT'S OVER 9000!!!!!

loud python
#

possibly throw in some more data like What side is the unit fighting against, are they using silencers, etc.

tough abyss
#

Yep

loud python
#

I guess I should write all this stuff down and make a megathread on the forum xD

tough abyss
#

haha

loud python
#

in fact, I am doing that right now xD

tough abyss
#

let me know when it gets implemented... ๐Ÿ™„

#

BI does great ๐Ÿ˜‰

tough abyss
#

๐Ÿ‘

loud python
#

Don't forget to leave a message on the post so other people see you agree ๐Ÿ˜ƒ

finite mica
#

Does anyone know if there is built in functionality to color terrain squares on the map?

#

I haev seen a lot of missions and official screenshots using it, but I only managed to do it manually by creatin markers and moving them into position.

#

Is there automated functions for that?

tough abyss
#

Not really.

#

I have an old insurgency style mission with colored grids.

rotund cypress
#

Hey guys, I'm trying to create a camera over this position _cam = "camera" camCreate [ 0, 0, 0 ]; _cam camSetTarget [ 3770.76, 12796.1, 300 ]; _cam camSetRelPos [ 3770.76, 12796.1, 300 ]; _cam cameraEffect [ "Internal", "Back" ]; _cam camCommit 0;

#

Although it's not creating it at that position

finite mica
#

Thanks garrett.

tough abyss
#

If you want to set the position @rotund cypress use camSetPos

#

Not relpos

rotund cypress
#

This made it for me

#

_cam = "camera" camCreate [ 3770.76, 12796.1, 100 ];
_cam cameraEffect [ "Internal", "Back" ];
_cam camCommit 0;

tough abyss
#

It sets it relative to the target

rotund cypress
#

Although it doesn't set it to the point I want

tough abyss
#

So if you want it 10m to the N of the target, do camSetRelPos [ 0, 10, 0 ];

rotund cypress
#

I mean it's not pointing towards the direction I want it to point

tough abyss
#

What you are doing is setting the pos to say [10, 10, 10]

#

If you set relative pos to [10, 10, 10]

#

Your final position will be [20, 20, 20]

#

Get it?

rotund cypress
#

Kinda, but it's not pointing towards the direction I want it to point at

#

How do I solve that?

tough abyss
#
_cam camSetTarget player;
_cam camSetRelPos [0, 0.5, 1.5];
_cam cameraEffect ["internal", "back"];
_cam camCommit 1;
player setRandomLip true;```
#

Example code

rotund cypress
#

Okey, how do I define pitch and direction though?

tough abyss
#

Idk, I don't know much about cams

#

Never really worked with them.

rotund cypress
#

Aah I see

#

Alright, I'll have a look see if I can figure it out

rotund cypress
#

Is there a way I can block a dialog from being closed with escape without making it a title resource?

tough abyss
#

I have an array in an .hpp file. I want to try and generate a random number between x,y (math.random basicaly) how would i do so within the HPP file

rotund cypress
#

@tough abyss, TBH I don't think you can.

#

Why don't you do it in SQF instead?

tough abyss
#

thats what i was thinking

#

Just for convienece i guess

tough abyss
#

You can.

#

But it still requires SQF

#

arma 3's new random syntax will allow you to do that.

#

Which has been integrated into BIS_fnc_randomNum;

#

@tough abyss

[firstnumber,lastnumber] call BIS_fnc_randomNum;
#

Oh wow.

#

there is an actual SQF syntax highlighter in this discord....

#

danke

#

@tough abyss how do you do it? with `?

#

3 backticks the sqf `

#

Hang on

#

Wonder if there is a way to escape them

#

\` sqf

#

Grr....

#

```sqf ```

#
[1,1337]  call BIS_fnc_randomNum;```
#

O

#

Yep

#

Just as a reference for anyone

#

A single backtick first

#

then space and another space

#

escapes the backticks embedded

#

sqf

#

The first space and backticks escapes the code.

#

@dusk sage You've converted me

#

I love ATOM editor

#

It's syntax highlighting is easy on the eyes.

rotund cypress
#

@tough abyss AMIRIGHT!!!

#

What did you use before?

tough abyss
#

First was NPP

#

then was Posideon.

#

Atom was suggested to me from a python tutorial

rotund cypress
#

I mean, Atom is life, Atom is love

#

When I switched over when it came out, I was instantly in love.

#

I used to use Sublime Text 2 / Poseidon

tough abyss
#

Is it still updated by the ACE team?

rotund cypress
#

Never used NPP

#

NPP Sucks unless for log reading

#

Yes

tough abyss
#

Nah you can use C++ syntax hightlighting for logs.

#

If I knew how to I'd write my own syntax highlighter for RPT syntax

rotund cypress
#

Must have packages

custom-title
file-header
file-icons
file-types
git-plus
language-arma-atom
minimap
pigments
project-manager
#

That is not what I'm talking about, but RPTs will load shit slow in Atom

tough abyss
#

Been through the settings to find out why?

rotund cypress
#

No

#

Just probably because Atom has some memory leaks and is generally slow at opening things

#

And RPTs are big

#

Which Atom can't handle

tough abyss
#

Just opened a big log.

#

12580 lines

rotund cypress
#

How long did it take?

tough abyss
#

Loaded fine.

#

2 seconds

#

There is probably a way to speed it up.

rotund cypress
#

Try opening mission.sqm and see how long it takes

tough abyss
#

Some caching method or memory access control

rotund cypress
#

And also, reading RPTs is better with SQF SH then C++ SH

tough abyss
#

High speed viewer.

dusk sage
#

Yeah Atom can be really slow to open large logs (200k+ lines), and sometimes will just fail

#

I use NPP for RPTs, but will look into that link you just sent

#

Looks neat

tough abyss
#

damn

#

atom editor is pretty nice

tough abyss
#

@dusk sage scratch that it's deprecated.

#

I'm making my own Syntax highlighter for NPP for RPT

#

Hmmm

#

@rotund cypress I can recreate Atoms tidy syntax highlighting using N++

tough abyss
#

Welp I've hacked together my own syntax highlighter

tough abyss
#

High command

#

I believe.

proven crystal
#

how do i get a list of all locations on a map?

#

or all locations of a type

#

there is nearestlocations but i want all cities and villages

dusk sage
#

Read the nearestlocations syntax @proven crystal

#

[locationType,...]: Array

dim owl
#

hey does anyone know if i can force a interaction key in ACE3 ?

oblique spoke
#

(as a sidenote, ACE3 while not on Discord, is on Slack, they can almost assuredly answer if nobody speaks up here) ๐Ÿ˜‰

dim owl
#

okay again thanks ๐Ÿ˜„

oblique spoke
#

np ๐Ÿ˜ƒ

tough abyss
#

@dusk sage What do you thinkof my syntax highlighter?

#

Closely emulated Atom editor

#

With a few differences.

dusk sage
#

Looks neat ๐Ÿ‘

#

I use this in N++ for SQF

tough abyss
#

It's based off this.

#

But colors etc changed and highlighting modified.

tough abyss
#

@dusk sage Do you know how to get the styler in Notepad++ to match part of a word?

#

Does it support RegEx parsing?

tough abyss
#

would'nt it be effiecent if you just spawned the ai then set their gear?

tough abyss
#

@hasty violet Define dynamic scripts?

young current
#

Hey! Just checking if anyone has found a way to disable right mouse button input and override it with a scripted action?

tough abyss
#

Oh god...

#

I hate DAC

#

yes there is, write your own library.

#

Use markers

#

Make mission devs use markers to initialise AI

#

It's what I did for our community.

dusk sage
#

Does it support RegEx parsing?
No idea sorry @tough abyss

tough abyss
#

I even found out how to create AI on the fly with markers.

#

in Zeus

dusk sage
#

I didn't realise DAC was still around

tough abyss
#

Making Zeus listen for the marker name

#

and spawn the AI dependent on the marker type

#

"Yummy" more like performance hogging.

#

I&A removed DAC for a reason.

#

bohemia build in core functions actually do.

#

BIS_fnc_spawnGroup

#

BIS_fnc_spawnUnit etc.

#

Fairly rudimentary.

#

No.

#

But AI caching you can do in the editor

#

using simulation manager.

#

or you can use ai_cache script

#

We just use ALIVE

#

And hook alive and profile a group from BIS_fnc_spawnGroup

#

@ALIVE can handle headless clients etc.

#

And the reason DAC has an issue

#

with HC's is because it's so monolithic.

#

and so dense, improving performance by replacing old code systems with new is a headache.

#

Been there tried that.

#

I just said to our community nope.

#

No more.

finite mica
#

@young current Yes I managed to override it

#

Without usinganymods

#

You need to use:

(findDisplay 46) displayAddEventHandler ["MouseButtonDown", "_this execVM 'client\player\interact\hunter_mouseclick.sqf'"];```
#

this way I was able to block any weapon fire input for my hunter when he is disguised

#

the event handler also has a value for which mouse button

delicate lotus
#

Is there a way to make a HMG shoot at a specific location?

indigo snow
steep matrix
#

Fixed: Next target action would cycle only through enemy vehicles
Added: A new "Deleted" Event Handler
Tweaked: Vehicles without waypoints should no longer start their engines in the beginning of scenarios

#

wow these some are quite old issues and wishes

#

seems like @lavish ocean was heard after all ๐Ÿ˜ƒ

delicate lotus
#

can AI run out of ammo and how can I give a HMG infinite ammo?

indigo snow
#

they can, just use setAmmo every once in a while

steep matrix
#

new in dev
b:GROUP deletegroupwhenempty BOOL
b:OBJECT setfeaturetype SCALAR
u:creategroup ARRAY,SIDE (was just side)
u:isgroupdeletedwhenempty GROUP

young current
#

@finite mica I've been experimenting with this waituntil {!isnull (finddisplay 46)}; _WalkerGunControl = (findDisplay 46) displayAddEventHandler ["MouseButtonDown","_this select 1 call WalkerGunnerControls_Fnc;false;"]; But it does not override the default action, at least no when in vehicle. I received a hacky workaround for left button disabling, but right button still does both the binded action and what my function does.

#

It seems pretty much the same as yours but can't disable the binded action.

worthy spade
#

How can I prevent a snippet in initPlayerLocal from running on JIP players?

#

Oh wait... Didn't check the parameters... [player:Object, didJIP:Boolean]

regal ore
#

hey guys, sice i didnt get any response in animation_makers I will try my luck here. Anyone who knows how to write config for animations ? I got something, but can't make it working. Probably needs just a quick fix.

young current
#

@regal ore #arma3_animation is the relevant thread, people just seem to be in the middle of something..

worthy spade
#

Anyone knows why this doesn't work in initPlayerLocal:

#
if ((_this select 1) == true) exitWith {hint "YOU ARE JIP"};
finite mica
#

isnt there a THEN missing?

#

if () then

worthy spade
#

Not if using exitWith.

finite mica
#

whats the _this thing?

#

is it a numerical var?

#

perhaps try a == 1

#

I usually dont trust the bool in arma, I always use 1 and 0

worthy spade
#

It's one of the params from initPlayerLocal

#

I tried 1 also, no luck.

finite mica
#

does it spit out an error?

#

related to params?

#
//missing param error in editor can be safely ignored. Does not appear in MP
if (isMultiplayer) then {
    0 setFog [((paramsArray select 3)), 0.1, 0];


        
};
worthy spade
finite mica
#

in my mission I had to bracket this because it would report params error

worthy spade
#

Hmm.

finite mica
#

error type bool

#

it does not like your bool it appears

#

or that variable does not really exist yet

#

try running this code in the developer console after the mission is fully loaded, perhaps that helps

worthy spade
#

I has to be run from initPlayerLocal for the params though.

#

And I'd assume the params should exist when it initialises.

finite mica
#

all I know is that in that stuff I pasted, in my own initplayer, these params throw an error

#

but only in editor

worthy spade
#

I'll make some tests on a proper server.

#

Might be editor exclusive error as you're saying.

finite mica
#

or just test in MP in editor

#

you can swithc in what mode it does that

#

and for me any params error usually disappears in mp

thick lintel
#

cannot compare against a bool just use if ( _this select 0 ) exitwith {...

digital pulsar
#

reminds me of one funny piece of code i once saw in java if (x == true) {return true;} else {return false;} ๐Ÿ˜„

#

in SP you can simply define params array yourself at the beginning, load it with default values or whatever you like

worthy spade
#

I'll try that SaNiC.

tough abyss
#

[this, "HitRightHand", 0.5, false] call fnc_setHitPointDamage; anyone knows why it doesn't work?

meager granite
#

Nobody knows what fnc_setHitPointDamage is

little eagle
#

tag your functions people

#

(it's hopeless)

loud python
#

Doesn't that function just set damage to a body part?

little eagle
#

who knows

#

It's not something from the base game. It would have a less shitty name in that case

loud python
#

I think it is though

#

at least

#

I'm sure I've seen something similar once

indigo snow
#

Base game have the BIS prefix

#

Check if that function actually exists if i were you

loud python
#

yea, true

little eagle
#

HitRightHand isn't even a hitpoint in soldiers

indigo snow
#

Maybe RHS hitpoint?

little eagle
#

idk

loud python
#

Creates (or returns if it already exists) trigger with size of map

#

because articles are overrated

#

(not talking about fnc_setHitPointDamage)

little eagle
#

idk man.

#

a trigger the size of the map

#

that doesn't sound like a good idea

tough abyss
#

@left helm Incorrect.

#

Booleans can now be compared

#
True isEqualTo False
#

It can compare Arrays, Scripts and Booleans (alive player isEqualTo true)

#

Also for people who don't know

left helm
#

May want to try the proper case sensative version to ping him

#

Seems there are two of us

tough abyss
#

```sqf ``` to display syntax highlighting in SQF

left helm
#

@thick lintel

tough abyss
#

Sorry Sanic.

left helm
#

Meh no worries was just mildly confused for a moment

tough abyss
#

Discord should ask you who want if

#

it matches 2 case-insensitive checks

left helm
#

Yeah sadly the memeification of this name has caused all sorts of weirdness for me on that.

tough abyss
#

Matches Sanic or SaNiC ? Who do you want then gives you a choice?

left helm
#

Well the second one is the guy who was talking in here. I pinged him already though.

burnt gale
#

Hey guys, can anyone help me figure out how to return an array of sector names?

#
    Parameter(s):
        0: BOOL

    Returns:
    ARRAY of OBJECTs```
#

That seems to be the function where it is done, but I can't figure out how to write the string that gives me the array properly

tough abyss
#

@burnt gale Do you want a specific side?

#
_arrayOfObjects = [true] call BIS_fnc_moduleSector;
burnt gale
#

oh I think that might work, thank you

dusk sage
#

@tough abyss Indeed, finally a proper binary comparison ๐ŸŽ‰

tough abyss
#

what would be the quickest way to make sure a certain player is not on

#

i suppose i can do getPlayerUid and check if it is not equal to the player uid i have. but where would i go after that

#

(ran server side)

dusk sage
#

Need more context

#

Check if a certain player with a certain UID is online?

tough abyss
#

well
if the player is online (need a possible way to detect if the player is online so why not UID)

#

then i need it to not execute certain code

#

so

{ getPlayerUID _x isEqualTo "SomeNumber" then { do nothing } else {kick (this select 0)}; } forEach allPlayers;```
#

but im not sure how to make it not do something (new to the sqf life)

native hemlock
#

You can just leave it blank

tough abyss
#

oh

#

well

#

that solves my question

indigo snow
#

if !(player here) then { all code }

#

no need for an else if only one case gives results

#

! makes true false and false true

tough abyss
#

this would work then { if!(getPlayerUID _x isEqualTo "SomeNumber") then { kick (this select 0) }; } forEach allPlayers;

indigo snow
#

kick is also not a valid SQF command, youd need the serverCommand thing

#

also what is this select 0, normally this only exists where it is a sngle object

#

in the init field in the editor

tough abyss
#

^ the default code is kick (this select 0) which works

#

my issue is i dont want people to be kicked when a certain player is on

#

so i need a way to make sure this player isnt on then it can kick

#

this select 0 kicks via slot

native hemlock
#

Are you trying to run this from onUserConnected in the server.cfg?

tough abyss
#

onDifferentData

native hemlock
#

I don't think you can use normal scripting commands from there

tough abyss
#

damn

#

Does anyone know any way i could attempt this. Would hate to turn of verify signatures for such a thing

vague harness
#

Hey guys having a lil scrip problem here, I want to set the default ownership of ModuleSector_F using the following lines class CfgSectorPath {
class path_0 {
class sector_14 : sector {
dependency[] = {"base_west","sector_13"};
designator = "A";

#

here

#

class CfgSectorPath {
class path_0 {
class sector_14 : sector {
dependency[] = {"base_west","sector_13"};
designator = "A";

#

would it be using this?

#

//--- Set side
if (typename _units == typename sideunknown) exitwith {
_logic setvariable ["owner",_units,true];
true
};

#

if so, what do I replace in there to set it to a specific faction?

vague harness
#

NVM I figured it out

vague harness
#

@tough abyss Thanks!

tough abyss
#

What is the best way to create an entry point for your mods scripts while starting a dedicated server? This means the scripts must run just after you startup the dedicated server, not during the mission. I want preferably a non-hacky way of initializing resources via a dll, such resources are too expensive to instance everytime a mission starts.

sterile ravine
#

i have some compiled functions in my code, i want to dynamically create a call on this functions. _compiledfunc = str format["create%1",_selectedgroup]; [_group, _pos, _nbUnits, _radius] call _compiledfunc; how do i get the string _compiledfunc treated as the global variable the functions reside in?

#

sorry for my bad english - i maybe use the wrong terms to describe what i try to do.

sterile ravine
#

missionnamespace getvariable is also not working - i miss something here _selectedgroup = hexGroup; _compiledfunc = {missionnamespace getvariable (str format["create%1",_selectedgroup])}; [_group, _pos, _nbUnits, _radius] call _compiledfunc;

#

what is working is if i write createhexGroup instead of _compiledfunc; directly

rancid ruin
#

i think you want call compile format

sterile ravine
#

mhm - if i'm not completely wrong call compile format will not help here. i don't format the code here. i want to format the global variable name which holds the function and call this global variable.

little eagle
#

@tough abyss CfgFunctions with preStart = 1; (not preInit) or alternatively CBA preStart XEH.

tough abyss
#

oh thanks commy

sterile ravine
#

ok - i solved my problem - was an issue with parenthesis and object types

shadow sapphire
#

How do I create a waypoint for a unit that was created using createVehicle?

sterile ravine
#

[_group, _pos, _nbUnits, _radius] call (missionnamespace getvariable format["create%1",_selectedgroup]);

#

worked

little eagle
#

ModParams - Undefined or empty mod directory

#

what is Arma trying to say?

#

I get this times 13

tough abyss
#

Hey commy2, your solution is working great, but I get this seemingly benign set of errors:

#

"0:16:45 Error in expression <",_x] call bis_fnc_logFormat;
_function = [] call (uinamespace getvariable _x);

0:16:45 Error position: <= [] call (uinamespace getvariable _x);

0:16:45 Error Generic error in expression
0:16:45 File A3\functions_f\initFunctions.sqf, line 490"

little eagle
#

hmm, looks bad

#

what are you doing?

tough abyss
#

Nothing out of the ordinary, and script entry is succesfully run. No crashes either.

little eagle
#

yeah, but initFunctions.sqf crashes

#

fix it

#

or else you will run into problems

tough abyss
#

that is what I was worried about

little eagle
#

I don't know why that would happen though. Sure you're not on dev for 64 bit or something?

tough abyss
#

nope, I will fiddle around