#arma3_scripting

1 messages Β· Page 300 of 1

tough abyss
#

Is it posible to do if (condition and {conditions and {condition2}}) then { xyz };

rotund cypress
#

Yes ^^

#

and -> &&

plucky beacon
#

or literally and

#

or, and, not, and mod are all operators valid with their names

meager granite
#

I think my recent UI configs have more lines with defines than actual config lines

plucky beacon
#

lol

#

how did you manage that?

meager granite
#

I define all positions as combination of previous position defines

#

So each class has at least 4 defines for x, y, width and height, plus some other control-specific defines

plucky beacon
#

and it's a new line for each dimension?

meager granite
#

Advantage of this is that changing previous defines adjusts anything past it, instead of having absolute positions so when you move something you have to manually move each element after it

#

Feels a bit like HTML tables sometimes with cells adjusting size automatically depending on content of other cells

#

So in this case If i'll change BUTTON_WIDTH, positions for buttons will update so all 3 buttons are still aligned properly and have same distance between each other.

jade abyss
#

fml

#

But yeah, after a while, it ends up like that. I just checked my old Codes for the Animated Inventory

plucky beacon
#

animated inventory?

jade abyss
plucky beacon
#

oh fun

halcyon crypt
#

huh 2017mod still alive? πŸ˜›

#

nvm, old video

#

quite nice inventory thing though πŸ‘

jade abyss
#

yepyep, sadly never came to use.

halcyon crypt
#

at what point did you join the team?

jade abyss
#

erm.. @patent estuary Do you remember?

halcyon crypt
#

I used to be part of the team for a brief period, came in with Razor at the time πŸ˜›

jade abyss
#

must be about 1 1/2 Years before we canceled it.

#

Razor... useless idiot

#

(sry)

halcyon crypt
#

lol πŸ˜›

jade abyss
#

All he did was copy & Paste DayZ Code, then claiming he did that for A3... alltalk idiot

halcyon crypt
#

your name didn't sound familiar beyond discord so yeah I wondered ^^

jade abyss
#

uhm, okay? πŸ˜„

#

It ended up, that i scrapped the whole Code and rewrote from new. So much was broken (far far far from usable) or extremely Outdated (or even worse: DayZ Mod Code -.- )

halcyon crypt
#

there went the little work I did lol

jade abyss
#

What did you wrote?

#

+lol, sry about that πŸ˜„

halcyon crypt
#

I think I did the initial "jump scare" thing

#

prototype-ish

#

I believe

jade abyss
#

I can't remember seeing that in the Code, when i was in.

#

Maybe it was scrapped before :/

halcyon crypt
#

it basically was a ray tracing kind of thing that detected the mutants (or whatever they were called) and if they were in view it would set some value

#

and the screen went white or whatever

#

can't remember

jade abyss
#

hm, can't remember seeing something like that in the Code.

halcyon crypt
#

oh well

#

point taken 😁

jade abyss
#

sry ^^

halcyon crypt
#

that was in 2014 June-ish

jade abyss
#

long long long time ago

halcyon crypt
#

and then I lost interest in Arma for a good 2 years πŸ‘

jade abyss
#

hehe

tough abyss
#

So I have a player list box (RscListBox) acting as a player list, with the following code applied to it upon the dialog's loading: SQF _playersList = _dialog displayCtrl 80016; { _playersList lbAdd str _x; } forEach allPlayers; Thing is, if I run the following code, my name in the list box is replaced with bis_o, ```SQF
private _objList = [];

{
_objList pushBack _x;
} forEach nearestObjects [player, ["Tank", "Car", "Ship", "Helicopter", "Plane", "StaticWeapon", "CAManBase"], 50];

hint format ["%1", _objList];

jade abyss
#

How rude to interrupt with a Scripting Question

#

πŸ˜„

halcyon crypt
#

lol

tough abyss
#

Sorry πŸ˜ƒ

halcyon crypt
#

you're pushing the player object instead of the name

jade abyss
#

name _x

rancid pecan
#

I did it but the problem is still there 😦

jade abyss
#

Wich problem?

rancid pecan
#

@jade abyss okey i am try

jade abyss
#
  • -am +will =}
jaunty ravine
#

I'm having a little bit of a problem, Arma is ignoring CfgVehicleClasses completely. Anyone know a fix?

spring ravine
#

scripting/learnhowtoenglish channel

jade abyss
rancid pecan
#

@jade abyss i am try but still problem

#

😦

#

The problem continues

jade abyss
#

"problem"
What "problem"? I don't have a glassbowl πŸ˜‰

rancid pecan
#

this time. You do not see your own place, you see the place of others.

#

😦

jade abyss
#

Where do you execute that Code?

rancid pecan
#

"initPlayerLocal.sqf"

#

? 😦

plucky beacon
#

🀷 I gave it my best shot

jade abyss
#

Try to find out, if it was even started.
add a

systemchat str ["i was executed", _marker1];

to the while{true} part

rancid pecan
#

okey

#

i am try

#

@jade abyss

jade abyss
#

Don't ask me all the time oO Just try it.

rancid pecan
#

okey sory

jade abyss
#

No need to ask me for every step you wanna take =}

rancid pecan
jade abyss
#

One thing in advance: Do you start your game with "Show Script errors"?

rancid pecan
#

yes

#

local .rpt don't error

plucky beacon
#

it wouldn't output to the rtp it would output to the chat log

rancid pecan
#

@plucky beacon What can be the problem ?

plucky beacon
#

many possibilities

subtle ore
#

anyone know where I would find the explosion classnames? I tried looking through CfgMagazines but I couldn't differenciate between ammunition and explosions

plucky beacon
#

Altis life has a million scripts already and outside of a controlled enviornment I have no idea

#

like the particle effect or the noise?

subtle ore
#

the particle effect, I know there is one that inflicts damage as well. As if it's what is being placed after a mine explosion

subtle ore
#

Okay, thanks.

plucky beacon
#

I wonder if I can get aircraft to fly in formation using setdirveonpath

subtle ore
#

shouldn't they already be able to do that? πŸ€”

cedar kindle
#

this is arma ai

subtle ore
#

Yes, but Arma has always had the ability for formations. Planes (I would think) would be no different?

plucky beacon
#

Force formation and mimic any change in vector

#

And CLOSE formation

#

like can I get the ai to pull a blue angels with me as the lead craft

subtle ore
#

I have yet to see that happen. Many wishes to be had I guess.

plucky beacon
#

I want to have an army of drones match my every move and fire missiles synchronously

subtle ore
#

That, I think. Could be done to an extent. A badass moment to savour

subtle ore
#

holy crap

plucky beacon
#

I love ace combat btw because they do ridiculous shit like this

#

Arma AI don't know how to corkscrew, mach loop, or inver their aircraft at all

#

So if you
myVehicle setDriveOnPath [(position car)]
the myVehicle will constantly drive into car

#

note taken

#
jet2 setDriveOnPath [
    [(getPos jet1 select 0), (getPos jet1 select 1), (getPos jet1 select 2)+5],
    [(getPos jet1 select 0), (getPos jet1 select 1)-5, (getPos jet1 select 2)]
    ];
jet3 setDriveOnPath [
    [(getPos jet1 select 0), (getPos jet1 select 1), (getPos jet1 select 2)-5],
    [(getPos jet1 select 0), (getPos jet1 select 1)+5, (getPos jet1 select 2)]
    ];

totally just theorizing, I'm not a computer thatcan play arma atm

#

I'm going to try

#

it uses height? 🀷

#

Sets the path to follow for AI driver driver, pilot what's the diffrence

#

but is that how you would do it with land vehicles too?

#

I could also cheat this and literally attatchTo the planes to the main plane

#

then detatch when they disperse

loud python
#

is there any easy-to-use script out there that makes mine detectors more realistic, while still not making them a pain in the ass to use?

#

as in, maybe you hace to equip them to use them, or something like that?

plucky beacon
#

there are mods that use ACE

#

and RHS and stuff has mine detectors

loud python
#

I expected there to be mods, but I'd like a script, because I don't want to force people to download mods to play on my server / the missions I make

#

I don't have a server big enough for people to bother downloading anything to play on it xD

plucky beacon
#

there may be scripts but there certaintly isn't a mine detector model or anything

loud python
#

I wouldn't mind installing a mod serverside only though

#

No need for a model

plucky beacon
#

well if you want people to equip something they would hold it

loud python
#

just want the ugly rectangles to disappear

#

yeah, I expected that actually equipping it would be difficult without a mod

#

the problem I have with mine detectors is that there is just no downside to having one with you at all times

#

unless you have to buy them or something

#

but I like to play COD style PVP matches with my clan to improve aiming every now and then

#

and mines would certainly make it a bit more tacticool

plucky beacon
loud python
#

but, as I said, mine detectors

plucky beacon
#

you could probably rip this apart

#

it just beeps

loud python
#

Reading that right now, thanks for the link

plucky beacon
#

πŸ‘

loud python
#

I like this script

#

but still, nothing stops players from just having it turned on all of the time

plucky beacon
#

they have to have a mine detector item

loud python
#

I'll definitely think about using it for PvE missions though

plucky beacon
#

but they can have it on as long as they have a detector

#

if they remember

loud python
#

virtual arsenal

#

they can just save a loadout

plucky beacon
#

Fuck arsenal

rancid pecan
plucky beacon
#

hi again

rancid pecan
#

Thanks for your help

#

πŸ˜„

#

fixed

#

solved

plucky beacon
#

nice, good job

rancid pecan
#

There is a small responsibility πŸ˜„

#

How is the player accelerated?

plucky beacon
#

accelerated?

rancid pecan
#

Example: vehicle nitro

#

player speed

#

speed

plucky beacon
#

marker should follow at any speed

#

every half second

rancid pecan
#

This was a different question

#

But i could not 😦 thank you good night

plucky beacon
#

Later

polar folio
#

any good ideas on how to find out if a tank or static cannon is an AA one? talking about things that can't lock. basic stuff like flaks. ideally would love to read and analyse values from the config and find out that way to avoid class name lists

plucky beacon
#

you can make an array of classnames of AA vehicles

#

then do a if !(classname in list)

polar folio
#

read again πŸ˜„

plucky beacon
#

that's the only way I know how

#

I know lol

indigo snow
#

you might check if their ammo cost value for air targets is below a certain threshold

plucky beacon
#

you could probably reference the config

polar folio
#

i dont want lists. i want to determine via config analysis

plucky beacon
#

are you using mods?

polar folio
#

thx cptnnick sounds good

#

i have a mission that has a bunch of presets for popular mods. creates random tasks and stuff. i wan a task that is blowing up some AA. mods are optinal but if you select for example RHS in the lobby param, it'll read all the needed classes from the configs for tasks and other things liek the arsenal

indigo snow
#

I'm not really aware of any special simulation for AA especially if non-locking flak. Keeping in mind M2's and MG3s have served as light AA role on tanks πŸ˜„

plucky beacon
#

more of like a cheap bug spray

indigo snow
#

in the same vein guns changing from ARTY role to AT role in WWII πŸ˜„

polar folio
#

@indigo snow yer i'll have isKindOf "Tank" as a starting point i think. and whatever arty guns are children of. although that might be same as a static MG. will have to see. don't even know if stuff like IFA3 and UNSUNG even have AA cannons. so i'll need a plan B too. i might jsut make the task not AA specific but run the AA ambient code that makes them shoot into the air randomly only if they qualify for it

plucky beacon
#

what about static flak guns don't count as tanks

tender fossil
#

Are the exit codes for dialogs listed somewhere in wiki or elsewhere?

plucky beacon
#

Set driveonpath definately does not work for aircraft

#

confirmed

peak plover
#

Ezcoo what do you mean by exit codes?

tender fossil
peak plover
#

i think you might be looking for the idc values?

#

those are defined by the user

#

findDisplay 42069 closeDisplay 0;

#

Like this

still forum
#

No there is no documentation for exit codes. Unpack all arma scripts and configs and search through them all

tender fossil
#

Alright, thanks @peak plover & @still forum

plucky beacon
#

you can pass a private variable to a function right?

peak plover
#

yes

plucky beacon
#
_unit addEventHandler ["hit", {[(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax] call DNI_fnc_targetDamage;}];
hint format ["%1, %2, %3, %4, %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),(_this select 4)];
#

So _scoreMax is determined by...

#

private _scoreMax = switch (_classname) do {
    case "B_UGV_01_F": {1000};
    case "B_MBT_01_arty_F": {2000};
    case "B_Heli_Light_01_F": {4000};
    default {0};
};
#

classname determined by...

_classname = typeOf(_this select 0);

called from the init of the object

[this] call DNI_fnc_addHandler;
#

but even if it went to default it would be 0

#

So I guess reading from bottom to top...

#

B Alpha 2-5:1, O Alpha 1-1:1 (D.Nitro), 27.1561, <NULL-object>, any is the output anyway

#

not sure why instigator is null like that but largely irrelavent

peak plover
#

I am unfamiliar with switch

#

I hear if is faaster

plucky beacon
#

I'm not creating an if Pyramid here, I plan on making a whole library of vehicle classnames with it

#

so even if if is faster I ain't gunna

still forum
#

private variables can go lower in scope but not higher. and if you pass it as argument to call it doesn't matter. The variable private or not will be copied into _this

peak plover
#
private _scoreMax = _classname call {
    if (_this isEqualTo "B_UGV_01_F")exitWith{1000};
    if (_this isEqualTo "B_MBT_01_arty_F")exitWith{2000};
    if (_this isEqualTo "B_Heli_Light_01_F")exitWith{3000};
    0;
};
still forum
#

even worse nigel

#

much worse

peak plover
#

haha πŸ˜„

plucky beacon
#

I'm stickin' to my guns on switch case here

#

unless it is the problem which I doubt it

still forum
#

either use the switch. or two arrays

_classnames = ["B_UGV_01_F","B_MBT_01_arty_F","B_Heli_Light_01_F"];
_values = [1000,2000,3000];
_scoreMax = _values select (_classnames find _classname);
plucky beacon
#

Switch case is more readable and I plan on users being able to edit this for their own purposes

#

but in any case, why would the private variable that's passed return any

still forum
#

the two arrays method will be the fastest in the long run. But that depends on how often your function is called. If performance is not important use the most readable

#

What does actually return any? I can't see that from the code snippets you posted

plucky beacon
#

it's the one line of code at the end

#

in between messages

still forum
#

can you post the part between _scoreMax= and the call where _scoreMax is used?

#

oh wait.. no.. what should be inside _this select 3?

plucky beacon
#
unit: Object - Object the event handler is assigned to 
causedBy: Object - Object that caused the damage. Contains the unit itself in case of collisions. 
damage: Number - Level of damage caused by the hit
instigator: Object - Person who pulled the trigger

all the variables passed from the handler

#

1 2 3 and 4

peak plover
#

That's really nice dedmen

still forum
#

okey so can you post the part between assigning _scoreMax and using it?

plucky beacon
#

okay

#
private _scoreMax = switch (_classname) do {
    case "B_UGV_01_F": {1000};
    case "B_MBT_01_arty_F": {2000};
    case "B_Heli_Light_01_F": {4000};
    default {0};
};

if (_scoreMax == 0) exitWith 
{
    _error = parseText format["<t size='1.5' font='Zeppelin33'>Classname</t><br/><br/><t size='0.75' font='LucidaConsoleB' color='#ff0000'>%1</t><br/><br/>is not available in script, edit <br/><br/><t size='0.75' font='LucidaConsoleB'>vehicleCreator.sqf</t><br/><br/>Identical vehicle has been spawned on the enemy side instead.",_classname]; 
    hint _error;
};

_unit addEventHandler ["hit", {[(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax] call DNI_fnc_targetDamage;}];
#

goes to...

_unit = _this select 0;
_cause = _this select 1;
_damage = _this select 2;
_person = _this select 3;
_scoreMax = _this select 4;

if (_damage > 1) then 
{
    _damage = 1;
};

_DNI_Score = (_damage*_scoreMax);

hint format ["%1 is the score for the kill",_DNI_Score];
hint format ["%1, %2, %3, %4, %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax];
copytoclipboard format ["%1, %2, %3, %4, %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),(_this select 4)];
still forum
#

why are you not using params? would make things cleaner looking and more readable :x

#

well.. What value is inside scoreMax before you call.......

#

πŸ˜„

plucky beacon
#

nothing, the switchcase is the initial value

still forum
#

the insides of addEventHandler can't know your variable

#

addEventhandler turns your code into a string. When the eventhandler is triggered it compiles your code and executes it.

plucky beacon
#

I'd like to learn how to use Params actually

#

hmmm

#

goes to wiki

still forum
#

so your entire code is
[(_this select 0),(_this select 1),(_this select 2),(_this select 3),_scoreMax] call DNI_fnc_targetDamage; _this is passed to the eventhandler you know that. so _scoreMax is undefined

#

that recompiling is not on the wiki

plucky beacon
#

params isn't?

still forum
#

I said recompiling. nothing about params πŸ˜‰

plucky beacon
#

lol it's okay

#

but ya I see what you're saying

#

so how do I make it a value in the handler then? do I set it to a string and pass it?

still forum
#

the code inside the eventhandler is executed at a totally different time. Long after your script is done executing and your scoreMax value went out of scope and got deleted

peak plover
#

Yes YES!

still forum
#

you could do

_unit addEventHandler ["hit", format["[(_this select 0),(_this select 1),(_this select 2),(_this select 3),%1] call DNI_fnc_targetDamage;",_scoreMax]];
peak plover
#

Or add the score thing into DNI_fnc_targetDamage

still forum
#

Well...

peak plover
#

right before the hint

#

You are genius, lol

still forum
#

I would be against that. As we elaborated the score determination script is not performance optimized. a hit eventhandler runs in unscheduled... You shouldn't move slow code into there if you don't want players to have a terrible fps drop when being hit

plucky beacon
#

that was the idea with adding the event handlers AFTER using the switch case, so it didn't run a switch case every hit

#

and it would the maxScore for that vehicle every hit without having to check

still forum
#

the format["[(_this select 0),(_this select 1),(_this select 2),(_this select 3),%1] call DNI_fnc_targetDamage;",_scoreMax] call will return
[(_this select 0),(_this select 1),(_this select 2),(_this select 3),1000] call DNI_fnc_targetDamage;
so in the end you will have
_unit addEventHandler ["hit", "[(_this select 0),(_this select 1),(_this select 2),(_this select 3),1000] call DNI_fnc_targetDamage;"] which is exactly what you want

#

keep in mind this only works with some variable types. You can't pass an object like this

plucky beacon
#

mhmm

still forum
#
if (_damage > 1) then 
{
    _damage = 1;
};

noo...
_damage = _damage min 1;

plucky beacon
#

oh that's a thing?

#

neat

still forum
#

In short. Your code is close to horrible and I couldn't live with such crap running in my modpack πŸ˜„ But it may work for you ^^
it looks a bit like sqf back from the Arma 2 era.

plucky beacon
#

You're only the 8th person in this channel to tell me I'm fucking awful

hallow spear
#

does it work? I like it man

austere granite
#

gotta start somewhere :p

still forum
#

I wrote same bad code back in Arma 2 πŸ˜„ probably even worse readability wise

hallow spear
#

i was just typing that Adanteh

plucky beacon
#

heck I literally just threw this together this afternoon to test a proof of concept for a score attack using fixed wing.

#

Not exactly my magnum opus

#

I didn't even know handlers have their code passed as strings

still forum
#

How awesome would it be to have a script debugger. So these errors are easier to find :x

plucky beacon
#

I know there is one

#

lol

#

I saw

still forum
#

I also didn't. Till i found it out. ACE guys also didn't know.. And that issue was actually causing a kinda big performance penalty for them... Hopefully that eventhandler stuff will get fixed. Because compiling hundreds of lines of code every frame is not that... efficient

jade abyss
#
Dedmen - Today at 12:36 AM
In short. Your code is close to horrible and I couldn't live with such crap running in my modpack```
wow
plucky beacon
#

πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ dedmen spitting hot fire

still forum
#

People don't get better if you just say their code is meh-ish ^^ But true. My wording was a little high ^^

jade abyss
#

But ppl still learn, so there is a better way of telling them.

#

A "LITTLE"?

#

Your nose was as high as the Statue of liberty^^

#

I mean, remember your first crap πŸ˜›

still forum
#

googles statue of liberty to see if her nose is high

jade abyss
#

(i just saw mine, a few days ago, i shivered alot^^)

plucky beacon
#

about 298 feet for nose hieght

jade abyss
#

Nobody likes Klugscheißer πŸ˜„

plucky beacon
#

oh wait not including the arm

#

more like 218 feet

jade abyss
#

*punching nitro

still forum
#

I'll check my old arma 2 scripting stuff.. Let's see how bad it gets

jade abyss
#

I mostly just used several nonLocal Vars, cause i had no idea how to send Vars from one script to another by using spawn πŸ˜„

still forum
#

I mostly did small stuff.. so nothing reaaally bad to find.
and most of the bigger stuff is copy pasted from ACE or something and just modified a little

peak plover
#

Don't worry Dedmen, criticism is good. I love going back on old things and realising how shit my code was before and how bad it is now

still forum
#

Lol

sleep 10;

if (!isMultiplayer) then {
    sleep 1000;
};

waitUntil{!isNil "acrejoin"};
[] spawn {
    _ACREChannelID = 935;
    _ACREChannelPW = "germanforces";
    
    while {true} do 
    {     
        waitUntil{alive player}; 
        waitUntil{!isnil "acrejoin"};
        if ((!isNil "acre_sys_io_pipeHandle") and (!isNil "acrejoin")) then 
        {
            [_ACREChannelID, _ACREChannelPW] call acre_api_fnc_joinChannel;
        };
        sleep 10;    
    };   
};

sleep 5;

What the?

peak plover
#

hahaha

#

sleep 6000;

plucky beacon
#

sleep e621

still forum
#

correct answer would be lol...
server.sqf

#define acre_join "lol"
acre_join = "lol";
publicVariable "acre_join";

I apparently didn't know how to... loooooooll. that code is broken

#

after preprocessing it says

"lol" = "lol";
publicVariable ""lol"";

I apparently didn't know how to set variables back then

#

october 2013. so 3 and a bit years ago

plucky beacon
#

so I downloaded this debugger

jade abyss
#

Oh my

plucky beacon
#

lol

#

I put the DLL in, and by workspace I'm guessing it means mission workspace

still forum
#

Very hard to get working with mission scripts. easier with PBO's with PBOPREFIX. Better ask in the debuggers discord channel and try it out tomorrow. Cuz I wanted to go to bed an hour ago

plucky beacon
#

lol okay

#

thanks

still forum
#

the help-desk channel already has some writeup on how to get mission scripts to maybe work. I'll be there for you tomorrow. Or later today.. depending on timezone

plucky beacon
#

okay

peak plover
#

Debugger?

plucky beacon
#

dedmen is asleep

peak plover
#

It's bad when you have 30 mods and every mod has some slow code

plucky beacon
#

everyone

peak plover
#

WHAAAAT?

plucky beacon
#

I'd like to request evidence of those numbers

#

that's not a valid estimate when units that use mods run ops on private servers not daily

peak plover
#

True

plucky beacon
#

players who play on vanilla may play more often but that also doesn't mean they don't use mods on private servers

peak plover
#

Most players play vanilla

plucky beacon
#

First of all, you'd have to prove that players who play vanilla only play vanilla and never use mods

#

and you're saying those same peopl 24/7 have never played with a mod before

#

it's a pretty big grey area

peak plover
#

life, KoTH are the most played servers

plucky beacon
#

Everyone I've ever known to play Arma even on Wasteland, KOTH or otherwise play on private servers with mods on some days

peak plover
#

I think the most played public modded server is armastalker

#

But it's russia

#

And even that its roleplay

#

Hey, you started this

#

don't runaway now

plucky beacon
#

Don't correlate not as often with not at all. in fact I'd be interested in the number of unique IPs that download from armaholic and the workshop

plush cargo
#

#teamswitchdo

jade abyss
#
First of all, you'd have to prove that players who play vanilla only play vanilla and never use mods```

2 of the D41 KotH Guys played Arma for about 1 Year. KotH ONLY! Nothing else in A3! __**NOTHING**__ We made a small Exile Server -> They never heard of it before or knew that there are Addons^^
plucky beacon
#

2 of the D41?

#

first of all what's D41

#

and second you have found 2 people

peak plover
#

The plot thickens

jade abyss
#

D41 -> Distrikt41 -> My crap
+the 2nd part makes no sense.

#

+There are alot more, who play Vanilla only.

plucky beacon
#

Fine I concede, you win, your imaginary numbers are butter than my imaginary numbers

peak plover
#

Let's do a quick survey, How many of you here played arma 3 vanilla online? How many played modded online?

plucky beacon
#

not a big enough sample size

#

anyway

peak plover
#

Sample size does not matter

plucky beacon
#

what

#

are you

#

okay fine

#

I sample myself

#

I say yes

#

100%

#

proved

peak plover
#

I say yes as well

plucky beacon
#

wtf you mean sample size doesn't matter

peak plover
#

Still 100%

#

This concluds our survey. 100% players play vanilla online

#

FACT

plucky beacon
#

clearly your methods are undoubtely correct and cannot be proved wrong ever

jade abyss
#

Okay, lets just take one Group in your count:
Lifer.

plucky beacon
#

sample size doesn't matter

jade abyss
#

Vanilla.

#

Size DOES matter.

#

πŸ˜„

plucky beacon
#

apparently Nigel said it doesnt

plush cargo
#

lifers only vanilla bc they cant figure out how to install mods

peak plover
#

Hey, stop survey shaming, Healthy in all sizes

jade abyss
#

@plush cargo 99% πŸ‘

plucky beacon
#

Healthy in all sizes is bullshit

jade abyss
#

Fuck that! Obesity is a fkn health issue!

plucky beacon
#

^

jade abyss
#

\o/ Hunt the obese ones, until they loose weight \o/

#

And after that, the Gendermaniacs

plucky beacon
#

#onlytwogenders

polar folio
#

hm. that sounds weirdly reasonable

plush cargo
#

I play life sometimes, and even dev'd for a few servers πŸ˜ƒ

plucky beacon
#

this is getting out of hand

#

for myself

jade abyss
#

Stop touching yourself.

plucky beacon
#

k

jade abyss
#

You are disgusting

plucky beacon
#

dad

jade abyss
#

Did you just assume my parent-type?? #triggered

plucky beacon
#

Dscha's my dad now guys

plush cargo
#

poor child

plucky beacon
#

LOL

jade abyss
#

Yay, new slave \o/

plucky beacon
#

he beats me regularly when I don't comment my code

#

or use newlines on ifstatements

jade abyss
#

It hurts me more than you.

plucky beacon
#

I'm sure it does dad

peak plover
#

@jade abyss Is Terry Crews less healthy than Michael Cera? Currently 100% of my surveys say that they are both 100% healthy

jade abyss
#

It better be.

#

Who the f is Michael Cera?

plush cargo
#

Really use a diff name? damn the shame is real

peak plover
#

Michael Cera is this tiny guy

plucky beacon
#

Altis Life shame is true

#

LOL

polar folio
#

milsim and life are very similar actually

jade abyss
#

Oh god.. that disgusting guy... oh my

polar folio
#

both role playing

plucky beacon
#

The mission making aspect of them are not close

polar folio
#

atleast if by milsim you mean people planning for ages and then dying because they suck and talking all seriously addressing eachother by rank adn shit

jade abyss
#

I mean, the GameMode LIFE isn't bad at all! There is alot of potential in it and CAN make alot of fun!
BUT:
The Attitude and "the amount of retards (stealer/C&Pler) is just wayy too high"

plucky beacon
#

I must not have been in a milsim then because we didn't do that

#

and neither does the real army

polar folio
#

for some just using ACE means milsim

#

is why i put it that way

peak plover
#

Fair point badbenson

plucky beacon
#

In the military they just yell "CARLOS GET THE FUCK BACK IN THE TRENCH YOU RETARD"

polar folio
#

tell your dad to slap you. your reading sucks today

jade abyss
#

slaps @plucky beacon

polar folio
#

πŸ˜„

jade abyss
#

again

polar folio
#

no stop

plush cargo
#

calls cps

plucky beacon
#

stop

#

domestic abuse

#

Spammer

jade abyss
#

I can do what i want with ma slave

peak plover
#

hahah

jade abyss
#

whistle

plucky beacon
#

TFW everyone cares more about the spam than him beating me

plush cargo
#

lol

jade abyss
#

I just hit him twice

plucky beacon
#

3 times dad

plush cargo
#

maybe if you didnt deserve it......

jade abyss
#

twice

peak plover
#

That's not even the worse he could do to you

plucky beacon
#

dammit

peak plover
#

Life success isn't really that suprising as it was already successful in garrys mod, they just swiched platforms

jade abyss
#

@plucky beacon Have you met your Uncle Trevor? He just came back from Los Santos. He mentioned that he needs a buddy to "code"with.

#

Yep, Nigel.

polar folio
#

do most life game modes still run like shit? main reason i never got into it tbh

peak plover
#

get dir;
attachto;
setdir;

jade abyss
#

constantly

plucky beacon
#

always

polar folio
#

although i also lack patience for role play so i usually try to hunt cops asap.

plush cargo
#

most do run like shit bc everyone just adds any script they can find they think is cool

peak plover
#

What do you mean maintain direction?

polar folio
#

setdir after attachto i think

peak plover
#
if (_t isKindOf 'Reammobox_F') exitWith {
    _pos = ((getPosATL player) vectorAdd ((vectorDir player) vectorMultiply 1.5));
    _pos set [2,0];
    _t setPosATL _pos;
    _oldDir = getDir _t;
    _t attachTo [player];
    _t setDir _oldDir;
    _text = format ['Dragging %1',(getText (configFile >> 'CfgVehicles' >> (typeOf _t) >> 'displayName'))];
    titleText [_text,'PLAIN DOWN',0.75];
    TRUE;
};
plucky beacon
#

if ("Altis Life" in missionName) exitWith {delete.system32};

peak plover
#

``sqf

#

instead of ``

plucky beacon
#

eeew gray

#

if you say so

peak plover
#

if !("Meaning" in life) exitWith {player setDamage 1;};

#

😦

plucky beacon
#

too bad so sad

plush cargo
#

error in position *life expected array type: dogshit

peak plover
#

while {!("Meaning" in life)} do {player call fnc_eatFood};

plush cargo
#

dafuq

#

nah

plucky beacon
#

@jade abyss dad help

#

I feel violated

jade abyss
#

@lavish ocean

#

@open vigil

rancid ruin
#

why can't you ban people @jade abyss ?

plucky beacon
#

only the orange names I think

jade abyss
#

Never was able to.

rancid ruin
#

damn son dwarden reluctant to give out dat powah

jade abyss
#

+i don't rly wan't any Moderator rights πŸ˜„

plush cargo
#

no ones cliicking that you scrub

plucky beacon
#

LOL not using a bot

#

rookie

peak plover
#

Heh

rancid ruin
#

factoring in labour time, i wonder how much each copy/paste is making him

#

must be like 0.0000000000000001c per ctrl V

peak plover
#

Exactly, he is losing money as we speak

plucky beacon
#

he's got some work to do then

peak plover
#

Doing something productive he would be getting mad dough

rancid ruin
#

like he says, the games are cheap, so the margins can't be so high

plucky beacon
#

Yay economics

#

LOL

#

savage

rancid ruin
#

i bet 10x link spam doesn't bring in 10x link revenue either

jade abyss
#

minimum

peak plover
#

He could've just made some money by sayin stuff like Check out arma 3 Apex 70% off DLC BUNDLE 70% off.

spring ravine
#

well he is a little boy..... lacks the knowledge

plucky beacon
#

I actually bought that DLC bundle the minute I saw it

peak plover
plush cargo
#

"employee" thebombdigity

polar folio
#

*splash" goes the spammer

peak plover
#

hahaha @plush cargo I don't tihnk that's how it works

plucky beacon
#

That bot really cleans up the mess doesn't it

#

nice

plush cargo
#

his name?

plucky beacon
#

does Banning someone on discord remove their messages or is that a feature of the bot on this server?

jade abyss
#

You have a Choice

#

Remove Msg or not

#

iirc

peak plover
#

maybe Adrian Rogers @plush cargo

#

Who knows

plush cargo
#

thought at the end of url was his name, so if you use it, and buy something they know whos link it was and they get some $

peak plover
#

If someone uses his link to go there and buys something he gets a cut

plucky beacon
#

ya you can choose from 24 hours to 7 days or nothing

peak plover
#

0.01 %

plucky beacon
#

neat

#

also ya G2A is a scam anyway

peak plover
#

yup

plush cargo
#

so you guys hear about this new thing called g2a? pretty cool stuff

plucky beacon
#

ban now

plush cargo
#

lol

plucky beacon
#

πŸ”¨ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯

runic spoke
#

I seem to be having an issue with parseSimpleArray:
this: "[""MSG"", [""Mercenary""]]"
turns into: ["MSG",<null>]

rancid ruin
#

why are you using double "

runic spoke
#

is it because there is a space after "MSG"

rancid ruin
#

looks like a comma to me

runic spoke
#

a comma, and after the comma is a space.

rancid ruin
#

so? the engine doesn't care about that space

#

it's an array

runic spoke
#

no spaces are permitted between array elements

plucky beacon
#

rip

rancid ruin
#

oh hello

#

not seen this command

#

but why do you have a space if it's not permitted?

runic spoke
#

that's how my DLL returns it.

#

just gonna go fix that quick

rancid ruin
#

think we used to use compile to parse strings to code

runic spoke
#

parseSimpleArray is roughly 3x faster, than call compile, and is more secure.

jade abyss
#

can't you change "" to ' ?

runic spoke
#

only double quotes " supported for Strings: ["hello"] - correct, ['hello'] - incorrect!

rancid ruin
#

man this command looks so fucking hacky lol

runic spoke
#

that's not the problem though, the space is.

rancid ruin
#

sqf seems so inconsistent and cryptic still, even the new functions

#

why the fuck call a function "endl" and not endLine or something?

#

just why

runic spoke
#

wouldn't /n still be smaller?

rancid ruin
#

it's just so inconsistent it's crazy

#

they can't even decide on whether to use pos or position in function names

peak plover
#

they

rancid ruin
#

just like "oh a dev made a new function? yeah might be useful...STICK IT IN!"

runic spoke
#

Well, i think the reason why they are doing it is to make it easier for people to read. a new comer might not know what /n is. endl is more selft-explainitory (#spelling) than /n

rancid ruin
#

dammage

#

you've only got to look at dammage to confirm that BI do not proof read

#

no logic applied lol

runic spoke
#

russians have a hard time with that πŸ˜›

plush cargo
#

i like how they just added a new one and now there is allowDamage and allowDammage

rancid ruin
#

yeah, sweep it under the carpet, then put a new carpet on top of the old one

#

😩

peak plover
#

Only explenation

plush cargo
#

lol i hope thats true

#

like all the devs use dammage only when that dude is around

peak plover
#

Haha

#

Yeah, they guy is still around

jade abyss
#
StokesMagee - Today at 2:19 AM
only double quotes " supported for Strings: ["hello"] - correct, ['hello'] - incorrect!``` Ah, crap. Okay :/
runic spoke
#

yeah 😭

peak plover
#

haha why

#

why

#

In arma 3?

#

This looks really good

#

Cheating?

#

Hah does not concern me

#

I don't really understand it

#

Cheating feels artificial. Might as well spawn 30 ai in front of me in a line and shoot them

#

It's the same

plush cargo
#

I ❀ RscTree

#

so much info in one ctrl πŸ˜ƒ fucking donezo after messing with this all day

plucky beacon
#

Tfw studying for calculus but you got a sweet idea for a script in your head

cedar kindle
#

"why the fuck call a function "endl" and not endLine or something?"
the reason is literally in the description

plucky beacon
#

Endl is c++ terms

cedar kindle
#

yes

tough abyss
#

Thanks @halcyon crypt.

halcyon crypt
#

what did I do? πŸ˜› nvm it's the player name/object thing way above ^^

dusk dome
#

Say, just a question -- is it possible to somehow "fake" new gear slots through .sqf? I guess in a sense, disabling the default inventory system and writing your own through .sqf in order to allow things such as modular clothing?

subtle ore
#

@plush cargo glorious glorious trees i tell you.

young current
#

@dusk dome Afaik that is not possible unless you make all the clothing combinations into different models and switch them around according to what fake items the character is wearing.

dusk dome
#

ye, that's the plan.

subtle ore
#

Modification or mod

dusk dome
#

What do you mean?

#

I'm making the clothes myself and so on, if that's what you're asking.

subtle ore
#

Oh, good. I thougut you were asking if that could be done in a mission or scenario

dusk dome
#

Well -- I know making the clothes isn't, but the .sqf part -- that's possible in scenario's, yeah?

subtle ore
#

I would think unlikely. Because there is.more. to the inventory than. Just the ui.

dusk dome
#

yeah, i getcha. i mean, .sql is flexible enough though to actually write a fake inventory system, assuming somebody had the knowledge, yeah?

subtle ore
#

Yeah, i mean people have done stuff with vehicles before, loading anmoboxes. And that gives you a "fake inventory". But im not sure replacing it entirely is possible?

#

@jade abyss was doing some inventory replacement.

dusk dome
#

Nice, yeah, I getcha! Thanks for answers, I really appreciate it!

#

It was just a question out of curiosity, since I've been working on clothing recently. I've had some modeled out and I was wondering about getting a new gear slot for them via mod, but apparently that's hardcoded.

little eagle
#

yeah, i getcha. i mean, .sql is flexible enough though to actually write a fake inventory system, assuming somebody had the knowledge, yeah?
It's not

#

Too much hard coded stuff.

dusk dome
#

Got it, thank you!

#

Thank you everyone for the answer, I really appreciate it. You're all very kind!

little eagle
#

aww πŸ˜ƒ

peak plover
#

not specificed if it's multiplayer compatable, anyone ever used?

subtle ore
#

Huh?

peak plover
#

if i run hidebody _unit; on the server. Will the clients see the effect as well?

plucky beacon
#

Siri, where do I hide a body

polar folio
#

any way to manipulate the speed at which a sound is played? or only pitch?

plucky beacon
#

I thought I remembered something about speed but maybe it was just someone jerry rigging audio files to sound that way

polar folio
#

i only know about hte pitch parameter in playsound or playsound3D or both

peak plover
#

I asked google how do I hide a body and it started telling me stuff about how somone got cought by asking siri how to hide a body

polar folio
#

πŸ˜„ now that's a lot of layers lol. google warning you too about what you search with it lol

vital onyx
#

I am working on a drop-in replacement of inventory, short answer - it is possible, but tricky

#

@peak plover you should probably look to hideObject

peak plover
#

Hidebody sinks dead bodies into the ground

#

That's what I like

dusk dome
#

Thanks for mentioning, longbow. Let me know how that goes, definitely interested in gearslots for pants/shirts etc

young current
#

Me too @vital onyx! Let us know how it goes!

vital onyx
#

@dusk dome I do not promise paints and shirts, oringinal intention was to make a more clever loadout (say vest has specific pockets you can place only certain items)

#

@young current it will take some time, I really hope I will be able to complete it before our mod release

#

but changes in 1.68 made this chance of this thing to happen more real

tough abyss
#

This safe start script crashes the sever, any idea why? ```SQF
isSafeStart = true;
private _safeStartLoop = 1;

ssDelManProj = player addEventHandler ["Fired", {deleteVehicle (_this select 6);}];
if (vehicle player != player && {player in [gunner vehicle player, driver vehicle player, commander vehicle player]}) then {
ssDelVehProj = [(vehicle player), (vehicle player) addEventHandler ["Fired", {deleteVehicle (_this select 6);}]];
};
player allowDamage false;

while {isSafeStart} do {
uiSleep 60;
hint format ["Weapons are cold, wait for admin to trigger start. (%1 minute(s) since briefing stage started)", _safeStartLoop];
systemChat format ["[SafeStart] Weapons are cold, wait for admin to trigger start. (%1 minute(s) since briefing stage started)", _safeStartLoop];
_safeStartLoop = _safeStartLoop + 1;
};

#

It's called as such: ```CPP
QUOTE([] remoteExecCall [ARR_2(QQFUNC(safeStartOn), 0)]);

still forum
#

crashes the server? That script should only run clientside

plucky beacon
#

how do you know it crashes your server?

still forum
#

why are you even executing that on the server. player makes no sense on server. and hint and systemChat also don't

plucky beacon
#

imaginary player

#

should if(hasinterface)

still forum
#

should remoteExec on clients instead of on clients and server

plucky beacon
#

-2

#

Sometimes if the script requires something to be in sync with the clients I do it there too though.

#

in unscheduled of course

tough abyss
#

Thanks guys.

still forum
#

But if it crashes the Server report that to BI. That's a bug then

thorn saffron
#

Hey folks, I need some script that will monitor armor/global hitpoints of a vehicle in real time. I'm testing out a damage model and I need to know what is happening with the vehicle

regal sluice
#

ive got a question to scripting in altis life, i want to add a device to the heli trader (just the device not on the truck) and want to give it a code so it has inventory, and functions, is it possible for a helicopter to lift it with its ropes or is that impossible ?

subtle ore
#

Couldnt you just remoteExec it?

plucky beacon
#

@regal sluice if you want the device object to have inventory that would be in it's config.cpp which can't be edited without an addon. The most you can do is addactions to it or attatch it to something. It doesn't even have simulation physics

subtle ore
#

Oh woops. Chat upated. Sorry

plucky beacon
#

@thorn saffron Have you tried the handleDamage event handler?

subtle ore
#

@plucky beacon Get hit?

plucky beacon
#

negative

subtle ore
#

Isnt it basically the same thing except you can pass args?

subtle ore
#

Yes yes

plucky beacon
#

handle damage can get damage of all the parts too

subtle ore
#

Cool

plucky beacon
#

and from where, what direction, and what projectile hit it

#

handle damage outputs the most data involving taking hits as far as I know

thorn saffron
#

I'm not good at scripting and I need some monintoring script

subtle ore
#

Yeah i guess handleDamage would be your best bet @thorn saffron

plucky beacon
#

I'll help ya get started here

#

this addEventHandler ["HandleDamage", "hint format ['%1 was hit by a %2',_this select 0, _this select 4]"];

thorn saffron
#

I discovered that the fire particle if placed on the vehicle it actually damages the armor causing eventual destruction. You can put on the fire using destruction effects. As of now I can get AH-64 to burn out in about 24 seconds. This is pretty significant as it can allow for simulating ammo burnouts and such without the need for scripting

plucky beacon
#

you lost me at run out

#

run out of what, health?

thorn saffron
#

burn out

plucky beacon
#

you mean die

#

or stop being on fire

thorn saffron
#

I mean if I put 2 SmallFireFPlace cloudlets it destroys the helicopter on its ow in 24 seconds

plucky beacon
#

okay

#

use handledamage to output how much damage it's taking?

thorn saffron
#

yes, righ now it is just telling me that it takes damage. The interesting part is the fact it get's destroyed by "fuel explosion"

plucky beacon
#

So when fuel health reaches 0

thorn saffron
#

I want investigate it further

#

CUP's AH-64 does not have Fuel on its main config, but it inherits it
hmmm I wonder, if i increase the fuel armor, will it take longer for the helo to explode. I need to test that

plucky beacon
#

fuel ammo is an awkward term

#

and I'm pretty sure it's based of the hitpoints of fuel itself, not the amount of fuel

thorn saffron
#

fuel hitpoint's armor, man recently I could faceroll my keyboard and write better

subtle ore
#

I bet you, that the created fire effects are.causing damage. Ive had similar things like that happen before with created explosions

#

Hey @plucky beacon does the damage point selection work on that handle damage event handler yet? I took a look at it and at the moment it seems that it returns a empty string?

thorn saffron
#

that is exactly what I was looking for: a way to delay the final death explosion in order to give crew a chance to survive without making the helicopter impossible to destroy

plucky beacon
#

I don't know I haven't tried

thorn saffron
#

sadly it seems the control over the damage is rather limited. At coreIntensity 1 CUP AH-64 burns out from full HP in 24 seconds, but a t 0.9 it does not get destroyed

plucky beacon
#

in any case, you could set the handledamage to have
eventhandle "handledamage" >> if(_this select _whatever the one for damaged part is_ ) == "fuel hitpoints or something") then sethit "fuel" 0

#

my ultra psuedocode should get the concept across

thorn saffron
#

but I want it take damage

#

I just want to study the rate

plucky beacon
#

you can set a flat timer

subtle ore
#

Or just dont allow damage until they bail? Or it just ends up crashing anyhow? Dunno

plucky beacon
#

or you can set it to have half the damage it took

thorn saffron
#

alredy got that working in my mod

subtle ore
#

Welp. I mean

#

Explosives damage is handled after hit point damage i think

thorn saffron
#

the decreased explodiness has the side effect of making the aircaft harder to destroy using satchel charges and such, with is where the class DestructionEffects with the fire comes in

subtle ore
#

I looked at the handle damage event handler and there is a possibility of both of them.being hanled in the same frame.

thorn saffron
#

I just dont want to mess around with scripting, just bare config tweaks

#

pretty effective so far

subtle ore
#

Well i think what it comes down to is the damage model

#

I like to see what you have so far, its looking well for its purpose

thorn saffron
#

its just this:

        class HitEngine: HitEngine
        {
            armor=0.25;
            material=51;
            name="motor";
            visual="motor";
            passThrough=1;
            class DestructionEffects {
                
                ammoExplosionEffect = "";
                class Engine_Smoke {
                    simulation = "particles";
                    type = "SmallFireFPlace";
                    position = "exhaust1";
                    intensity = 0.5;
                    interval = 1;
                    lifeTime = 60;
                };
            };
            
        };
subtle ore
#

Which is hopefully we see getting a revamp with this next dlc. SmallFire will.still cause the damage.

thorn saffron
#

that is what I discovered, at first I put it there just for effect, only just now I noticed it actually damages the aircraft, with is something I was looking for

subtle ore
#

Okay, cool. So whats needed now? Im lost.

thorn saffron
#

A way to monitor the damage

subtle ore
#

Im pretty sure you can add event handlers to config entries

plucky beacon
#

I mean do whatevery you want but that helicopter totally should blowed up just saying

thorn saffron
#

from the crash?

#

yeah, but if you hit anything on the way down its fireball

subtle ore
#

@plucky beacon not the usage of it.i guess. Who knows the usefulness of it

plucky beacon
#

just watched the video

thorn saffron
#

@subtle ore the fire?

subtle ore
#

@thorn saffron the concept over all. Could be used as you had.shown for more effective landing in crash.scenarops

thorn saffron
#

for some bizarre reason I found out the best way to avoid exploding on crash is to point the nose down

#

with my mod on

subtle ore
#

Wait what? The nose? What the heck?

thorn saffron
#

yup

subtle ore
#

Lol, lovely.

thorn saffron
#

notice the fails where I didnt smack the ground with the nose

#

at least crash is no longer a death sentence

subtle ore
#

Yeah it was either the underbelly or the gear in which you crashed,

#

Yeah i like that asoect, i can now crash with a little more confidence

thorn saffron
#

not really, if you land on the gear you will still most likely explode. Smacking nose first seems to be most effective. Or maybe it was the gun πŸ€”

subtle ore
#

Ah i see, i didnt get enough time to watch it.thoroughly

thorn saffron
#

in the end the crashing bit is a bit random

#

not exploding instantly when you get shot at is nice however. I'm just looking for a way to use the fire damage to enhance the damage model further

subtle ore
#

Yeah, i see.

#

pretty sure you can add event handlers to a config entry. Try that out

thorn saffron
#

and what?

#

As I said, I'm not good at scripting

subtle ore
#

Take a look at what @plucky beacon did and the linkage provided. I dont know if config entries use magic variables or not, so not sure as to how to add it to the class specifically. You can hop down to config editing and imsur e they will have something on that

rancid ruin
#

ye if you "don't want to mess about with scripting" then ask in #arma3_config

thorn saffron
#

I came to the scripting part as i as asking for a way to monitor the damage in the game for testing

plucky beacon
#

handleDamage, that's all I know atleast

#

run some hints and formats

subtle ore
#

Handle damage, get hit. Best bet

plucky beacon
#

output to a log or system chat

rotund cypress
#

Does anyone know if possible to play music 3d?

#

like say3D but with music instead

subtle ore
#

same thing, no difference.

#

the 3d variants of commands need a sepcified path. Not defined in cfgMusic or cfgSounds

fossil topaz
indigo snow
#

setMarkerTypeLocal are you running this on just the esrver or all clients

fossil topaz
#

all clients I think, becouse the script is activated by the plane

indigo snow
#

just exitWith it if the player isnt on the side with AWACs

fossil topaz
#

ok thanks I will try with it

thorn saffron
#

no luck whatsoever in controlling the damage, if I change the passthrough, armor or the coreIntensity even slightly damage no longer applies
I guess the only way to do that is via event handlers fired when particular hitpoint is destroyed, but I dont want to do that really. I wanted a lightweight solution that you just slap into config

plucky beacon
#

playsound3d is a piece of shit

#

just chiming in unrelated

#

help, please someone

#
_object = _this select 0;
_player = _this select 1;

_player action ["SwitchWeapon", _player, _player, 100];

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

if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") exitWith {
    _filename = selectRandom ["typing1","typing2","typing3","typing4","typing5"];
    _soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
    playSound3D [_soundToPlay, _object, false, position _object, 6,(random [0.9,1,1.1]),18];
};

_filename = selectRandom ["pageturning1","pageturning2","pageturning3","pageturning4"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, position _object, 6,(random [0.9,1,1.1]),18];

systemChat format ["%1",_soundToPlay];
#

systemchat output the right sound path

#

and then it literally does nothing

#

is a function called from here

_object = _this select 0;

if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") then {
    [
    _object,
    "Search Computer",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
    "_this distance _target < 2",
    "_caller distance _target < 2",
    {/*started*/},
    {_this call bomb_fnc_searchingSound;},
    {_this call bomb_fnc_searchDone;},
    {/*interrupted*/},
    [],
    16,
    12,
    false,
    false
    ] call BIS_fnc_holdActionAdd;
};
#
_object = _this select 0;
_player = _this select 1;
hint format ["%1, is searching %2",_player, _object];
_player action ["SwitchWeapon", _player, _player, 100];

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

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

_filename = selectRandom ["pageturning1","pageturning2","pageturning3","pageturning4"];
_soundToPlay = _soundPath + "sounds\"+_filename+".ogg";
playSound3D [_soundToPlay, _object, false, getPos _object, 8,(random [0.9,1,1.1]),18];
_object = _this select 0;

if (typeOf _object == "Land_Laptop_f" ||typeOf _object == "Land_Laptop_unfolded_f") then {
    [
    _object,
    "Search Computer",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_hack_ca.paa",
    "_this distance _target < 2",
    "_caller distance _target < 2",
    {/*started*/},
    {_this call bomb_fnc_searchingSound;},
    {_this call bomb_fnc_searchDone;},
    {/*interrupted*/},
    [],
    16,
    12,
    false,
    false
    ] call BIS_fnc_holdActionAdd;
};
#

this one works

jade abyss
#

Solution: Use the one that works.
Problem solved. Next one.

#

check if the Soundpath has a leading \

plucky beacon
#

before or after C:

jade abyss
#

Yes.

plucky beacon
#

okay

rotund cypress
#

@subtle ore well im speaking about attaching like a music to a vehicle or something

jade abyss
#

\Path\file.bla = searching in AddonFile
Path\file.bla = searching in MissionFile

rotund cypress
#

playsound or playmusic is not the same

plucky beacon
#

it's not music?

#

oh nevermind

rotund cypress
#

Anyways, is there any performance advantages with CfgFucntions rather than using preProcessFileLineNumbers?

tough abyss
#

CfgFuntions is just sqf code aswell. Its not internal engine function etc

rotund cypress
#

I know, like a framework for functions, correct?

jade abyss
#

Its basicly the same

plucky beacon
#

and I'm basically insane

#

trying the same thing over and over

#

that's the right file path

#

so

#

what

indigo snow
#

its an external filepath

plucky beacon
#

playsound3d needs it

indigo snow
#

ah whoop youre previewing it?

plucky beacon
#

Ya, just outputting the path to systemchat, works in VR area but not Altis

#

in fact I'm going to make a goddamn log output from the beggining of teh init to the mission file output and then I'll be able to prove if this really is bullshit

plucky beacon
#
|INIT|--!--auto long range radios off"
|INIT|--!--saving disabled"
|INIT|--!--boxBlufor now wass assigned as ammo1"
|INIT|--!--array of intel objects [intel_laptop_1,intel_laptop_2,intel_table_1,intel_table_2,intel_shelf_1,intel_shelf_2]"
|makeIntel|--!--intel_laptop_1 is the object having an action applied to it"
|INIT|--!--making intel object intel_laptop_1"
|makeIntel|--!--intel_laptop_2 is the object having an action applied to it"
|INIT|--!--making intel object intel_laptop_2"
|makeIntel|--!--intel_table_1 is the object having an action applied to it"
|INIT|--!--making intel object intel_table_1"
|makeIntel|--!--intel_table_2 is the object having an action applied to it"
|INIT|--!--making intel object intel_table_2"
|makeIntel|--!--intel_shelf_1 is the object having an action applied to it"
|INIT|--!--making intel object intel_shelf_1"
|makeIntel|--!--intel_shelf_2 is the object having an action applied to it"
|INIT|--!--making intel object intel_shelf_2"

a few moments later using the hold action to search the item
repeating this output on each tick

|searchingSound|--!--intel_laptop_2 is the object, z1 is the player searching"
|searchingSound|--!--C:\Users\[redacted]\Documents\Arma 3 - Other Profiles\D%2eNitro\missions\DN_AltisBomb.Altis\ the sound path trimmed"
|searchingSound|--!--typing5 is the filename"
|searchingSound|--!--C:\Users\[redacted]\Documents\Arma 3 - Other Profiles\D%2eNitro\missions\DN_AltisBomb.Altis\sounds\typing5.ogg the path to the file"
|searchingSound|--!--intel_laptop_2 the object being played on (overruled by position parameter)"
|searchingSound|--!--false the item is NOT inside"
|searchingSound|--!--[4033.74,11702.1,-1.90735e-005] is the position of the object having the sound played to"
|searchingSound|--!--1.03394 is a randomly selected number that will determine the variation in pitch for the sound effect"
|searchingSound|--!--sound should have played but probably didn't because it's a piece of shit command"
#

why....

#

is it being played.... -1.90735e-005 undeground

#

now wait a minute that's negative exponent

#

so that's like ground level

#

ya that's just really miniscule below ground level

#

oh

#

OH

#

OH MY GOD

jade abyss
#

noob.

plucky beacon
#

soundPosition: PositionASL (optional) - position for sound emitter, will override "sound source" position. Default: [0,0,0]

#

return from getpos

Array - format PositionAGLS

jade abyss
#
Dscha - Today at 9:00 PM
noob.```
#

πŸ˜„

plucky beacon
#

no wonder it worked in VR area because the ground level is like 1 meter above sea level

#

Thanks Dad

#

You always know what to say to keep me motivated

#

only took me 2 hours, record time

jade abyss
#

Good.

#

πŸ˜„

tough abyss
#

How would I get this to work? The boxes wont remove from the array { deleteVehicle _x } forEach _objects - ["Box_East_WpsSpecial_F","Box_IND_WpsSpecial_F"];

cerulean whale
#

Anyone know why I am getting this error when I fetch something from SQL, even though all of the arrays close correctly? ```SQF
Error in expression <["",1],["",2]]","[["",1],["",2]]",0,"[["1709486977",1],["1709485439",2]]",[[[],1>
Error position: <1709486977",1],["1709485439",2]]",[[[],1>
Error Missing ]
Error in expression <ult = call compile _queryResult;

#
[[[],1],[[],2]]
#

That is the array that is supposedly having the error

tough abyss
#

Not escaping quotations correctly

plucky beacon
#

I guess because the sqm dictates the lobby

cerulean whale
#

@tough abyss I can't really see where though....

tough abyss
#

Whats the extension?

cerulean whale
#

extDB3

jade abyss
#

@tough abyss
Try:

{ deleteVehicle _x } forEach ( _objects - ["Box_East_WpsSpecial_F","Box_IND_WpsSpecial_F"] );```
#

(untested)

tough abyss
#

Cool will try. Helpful as always Dscha!

#

@cerulean whale nm i was wrong πŸ˜›
Your issue is stuff like this in the db "[["",1],["",2]]". Your are storing an array in string but you aren't escaping the quotations correctly i.e ""

cerulean whale
#

@tough abyss I figured it out a couple mintues ago, thanks a ton for the help though. πŸ˜ƒ

#

Now I am getting something similar again, but it is just odd....

#

@tough abyss Now I am getting this: ```SQF
Error in expression <,[]],["Blufor",[]],2]],"radio_sound"]]]>
Error position: <>
Error Missing ]

tough abyss
#

EIther use diag_log and output to RPT (will get cut off after so many characters). Or use the debug extension (in optional directory)
Look at the logs, grab what the extension is returning
Copy/Paste it into an editor with SQF highlighting and see what is wrong

little eagle
#

missing ]. That's what happens when you work with multiple level nested arrays instead of something easier to work with.

cerulean whale
#

I've put in the debug .dll and will take a look sigh

#

This is coming out really weird xD

#

extDB seems to be placing a ton of [ around the outside of what I am importing

still forum
#

consider maybe using parseSimpleArray or what it's called instead of call compile

tough abyss
#

Use call compile first + then switch to parseSimpleArray when you got it sorted

still forum
#

won't make your arrays more correct tho

tough abyss
#

[1,[row1,row2,row3]] is a rough example of returned string from extDB3 1 =OK then its an array of row results

#

The rows are then an array of the columns etc
Try look at exile/life code etc if you confused etc

polar folio
#

can you guys explain why you don't use profilenamespace setvar for this? too much data?

tough abyss
#

Using an external Database can be easier for admins / backups or setting up external web interfaces

polar folio
#

would ammount of data be a problem though? jsut curious

cerulean whale
#

@polar folio I'm moving from my current working system to one that allows you to have multiple 'characters' if you will, that all have different gear. It's just a pain wrapping it all

still forum
#

every player could manipulate his profileNamespace data. or loose it after an arma update when the profile get's corrupted

polar folio
#

i just really like the idea of being able to do it all in arma since they fixed it on servers.

#

i mean saving on the server dedmen

tough abyss
#

With a DB connector in Arma. You really are only reading it from at server startup + player connects. After that it is normally just update Querys etc
Its really not that much data

cerulean whale
#

May have just found ,my error, let me see if I can sort it out

still forum
#

Well... If i could decide between a self replicating database cluster and.... one file on my non-raid HDD.... If I had dozens of players.. Decision is clear. Plus you can access a database externally

cerulean whale
#

yeah @still forum , I try to use profileNameSpace where I can but it is limiting

polar folio
#

yea makes sense

still forum
#

Plus if you have multiple servers that should use the same data. You really can't do that with profileNamespace

polar folio
#

thx guys. that gave me a clear picture, depends on the case then.

tacit ruin
#

Does anyoen know if there is a public scrip for taking people as hostage, it would be nice if it was like theone Projectlife is using/made.

plucky beacon
#

Is there a name for a process in programming when you make a slight variation of working code and keep making bugs in an attempt to fix that one bug you couldn't figure out and eventually get so far away from what you know works that it's a garbled mess that isn't readable anymore.

jade abyss
#

It's Arma'd

plucky beacon
#

initserver.sqf

startTime = serverTime;
publicVariable "startTime";

init.sqf


sleep 5;

if(isMultiplayer) then {
    null = execVM "timer.sqf";
} else {
    null = execVM "timerSP.sqf";
};

timer.sqf

Timer_Length = 120;
_elapsed_time  = 0;
diag_log format ["|Timer|--!-- %1 is the time limit",Timer_Length];

if (isDedicated) then {
    while {Timer_Length > _elapsed_time} do 
    {
        _elapsed_time = serverTime - startTime;
    };
    if(bombDefused)exitWith{};
    "EveryoneLost" call BIS_fnc_endMissionServer;
};

timer doesn't start until I define startTime locally on a machine. Isn't public variable supposed to transmit it?

#

or maybe it has to do with the load order

#

Also does servertime take in briefing time?

#

why is PublicVariable not transmitting the variable to all machines

#

it's clearly running publicvariable on the logs but it's not being recieved by any machines

#

Does a variable need to be undefined ot be recieved by public variable?

plucky beacon
#

if there is it's probably from 1.68 because I used this all the time before

#

I'll try

vapid frigate
#

could be timing too.. startTime won't exist on the client(s) till it has time to broadcast

#

pretty sure you should have a sleep in that while loop

#

err nvm.. just realised starttime isn't being used on the clients

plucky beacon
#

there is a sleep in the init

vapid frigate
#

i mean in the while loop while it's waiting for the timer

#

only need to check once a second or something, not as fast as it can

plucky beacon
#

I sure do if I wanna display decimal places flying by

vapid frigate
#

that part only runs on the server though

plucky beacon
#

There's more code ya can't see here

#

max 2000characters in discord

vapid frigate
#

when you say 'timer doesn't start', do you mean the one on your screen?

#

(which isn't in that code) ?

plucky beacon
#

Doesn't work on server either

#

put some diags in there and nothing came out

jade abyss
#

Then check, if initServer.sqf is beeing executed at all first.

#

If not -> find out why πŸ˜‰

plucky beacon
#

I didn't know it couldn't be executed

jade abyss
#

Just test it out.

plucky beacon
#

okay

jade abyss
#

Everythings possible πŸ˜„

vapid frigate
#

initServer might be called after init.sqf

jade abyss
#

Single Player

#

init.sqf is executed All βœ” Event Scripts Scheduled

#

Executed at last

vapid frigate
#

i mean the [1]

jade abyss
#

Applies To
Single Player

#

So it doesn't matter.

vapid frigate
#

ah ok, yeah

plucky beacon
#

dafuq

jade abyss
#

initServer, initPlayerLocal and initPlayerServer -> Order is not guaranteed

plucky beacon
#

why isn't timer in missionnamepsace

#

it's just in Namespace

#

that's all it output

jade abyss
#

again: Have you checked, if initServer is beeing executed?

plucky beacon
#

[] spawn {
    while {true} do 
    {
        "respawn_west" setMarkerPos (getpos respawn_marker);
        "respawn_west" setMarkerDir (getDir respawn_marker);
        sleep 0.1;
    };
};

this code is running so I'm pretty sure

jade abyss
#

+why do you use publicVariable instead of SetVariable?

plucky beacon
#

setvariable hass issues

jade abyss
#

wtf?

#

Wich ones? oO

plucky beacon
#

trying to find the thing on the wiki

#

it said somewhere

jade abyss
#

Yep yep, i am waiting.

plucky beacon
#

public (Optional): Boolean - Only available for Object types and (since Arma 3 v1.48) for missionNamespace. If public is true then the value is broadcast to all computers.

jade abyss
#

and?

#

Thats no Issue

#

Thats for JIP

plucky beacon
#

Object setVariable Array ?

jade abyss
#

Yeah, and?

plucky beacon
#

only for objects?

jade abyss
#

No?

plucky beacon
#

JIP is important for this though

jade abyss
#

boy

plucky beacon
#

Show me how to do it Dad

#

I don't get it

jade abyss
#

missionNameSpace setVariable ["StartTime", servertime, true];

plucky beacon
#

I did that

#

earlier

jade abyss
#

with "TRUE" in the end?

plucky beacon
#

ye

jade abyss
#

btw.: Use your Tag on Vars, or i slap you until you bleed your Tag in the floor!

#

*slap*

plucky beacon
jade abyss
#

If you use it (and its beeing executed properly -> It should work. I am using it the whole time. So no excuse, you must have broken something πŸ˜„

plucky beacon
#

this weird shit happened

jade abyss
#

(still have no clue, why you need "serverTime")

plucky beacon
#

synchronized

jade abyss
#

NOTE: serverTime is available to both server and clients and shows the same value when synced. The only time it is not synced is on the server, right after server restart and only for the first 300 seconds. Client side serverTime is synced from the start. serverTime is also different from server time and server diag_tickTime

plucky beacon
#

yes

#

what about it

jade abyss
#

That could explain that number

plucky beacon
#

the first 300 seconds?

#

hm

jade abyss
#

iirc, i always used diag_TickTime for timing stuff

plucky beacon
#

but it's not synced

jade abyss
#

Why do you need it anyway?

plucky beacon
#

to be all dramatic and countdown shit

#

Aaaaye look who was right

#

had to wait 5 mintues for the server

#

thanks dad

jade abyss
#

*slap*

plucky beacon
#

ow

#

I deserved it

jade abyss
#

*slap*

#

*slap*

#

*slap*

#

*slap*

plucky beacon
#

don't forget to remove the evidence of your domestic abuse

jade abyss
#

Not this time.

plucky beacon
#

LOL

jade abyss
#

πŸ˜„

plucky beacon
#

savage

proven crystal
#

:D

digital pulsar
#

how to get a reference to an object namespace variable?

#

I need it to use pushBack

little eagle
#
_object getVariable "my_variable"
digital pulsar
#

thats value

#

i need a reference

indigo snow
#

_object?

little eagle
#

Foley, I don't think you understand how SQF works.

digital pulsar
#

it passes a value

#

meaning if i do something to it, it won't affect the original varaible in object namespace

#

for example pushBack won't work

little eagle
#

Yes it will.

digital pulsar
#

coz i'll be pushing into local var

indigo snow
#

arrays are pointers anyway, so that almost surely works

#

even more so if commy says so

little eagle
#
private _array = [];
private _object = player;

_object setVariable ["my_array", _array];

systemChat str (_object getVariable "my_array"); //[]

(_object getVariable "my_array") pushBack 1;

systemChat str (_object getVariable "my_array"); //[1]
digital pulsar
#

didnt work for me a minute ago

#

must have been a different mistake

little eagle
#

Then you probably copied the array using +, - or maybe select or apply.

#

Or arrayIntersects

digital pulsar
#

ah i see what happened now

#

i didnt define the empty array beforehand

little eagle
#

The default value of getVariable?

digital pulsar
#

so it kindly gave me an empty array to work with as a default

#

yeah exactly

stable wave
#

How do I escape double quotes and square brackets?

little eagle
#

double quotes are already escaped and there is no way or reason to escape [ and ].

stable wave
#

I mean escaping [ and ] in formatText[]

#

I want the output to be ["%1", "%2", 0]

little eagle
#

formatText, so you're working with structured text?

#

[ [

#

] ]

stable wave
#

It doesn't work. The entities are not interpreted in the output

meager granite
#

just post the code

subtle ore
#

Wait a sec, does code.formatting.not.work with mobile?

compact galleon
#

It does. When there is code formatting

stable wave
#
    switch (typeName _this) do {
        case "STRING" : {
            _this = _this + "|" + (uiNamespace getVariable ["__temp", ""]);
            uiNamespace setVariable ["__temp", nil];
            "make_file" callExtension _this;
        };
        case "TEXT" : {
            uiNamespace setVariable [
                "__temp", 
                (uiNamespace getVariable ["__temp", ""]) + str _this + "\n"
            ];
        };
    };
};
{
    _classes = "getText(_x >> 'DLC') == 'RHS_AFRF'" configClasses (configFile >> _x);
    {
        formatText["&#91;&#34;%1&#34;, &#34;%2&#34;, 0&#93;",getText(_x >> "displayName"),configName _x] call _make
    } count _classes;
    _classes = (_x + ".txt") call _make;
    systemChat format[(if(_classes == "OK") then [{'CLASS EXPORT: Successfully exported %1 to "ArmA 3/%1.txt"'},{"CLASS EXPORT: FAILED to export %1 %2"}]),_x,toLower _classes]
} count ["CfgWeapons","CfgVehicles"];```
#

You mean like this?

still forum
#

you can put sqf after the first 3 ``` to have SQF syntax highlighting
like
```sqf
<code>
```

stable wave
#

how do you break lines?

compact galleon
#

enter

#

Γ fter ``` enter will line break automatically. If no ``` you have to use Shift+Enter

stable wave
#
_make = {
    switch (typeName _this) do {
        case "STRING" : {
            _this = _this + "|" + (uiNamespace getVariable ["__temp", ""]);
            uiNamespace setVariable ["__temp", nil];
            "make_file" callExtension _this;
        };
        case "TEXT" : {
            uiNamespace setVariable [
                "__temp", 
                (uiNamespace getVariable ["__temp", ""]) + str _this + "\n"
            ];
        };
    };
};
{
    _classes = "getText(_x >> 'DLC') == 'RHS_AFRF'" configClasses (configFile >> _x);
    {
        formatText["&#91;&#34;%1&#34;, &#34;%2&#34;, 0&#93;",getText(_x >> "displayName"),configName _x] call _make
    } count _classes;
    _classes = (_x + ".txt") call _make;
    systemChat format[(if(_classes == "OK") then [{'CLASS EXPORT: Successfully exported %1 to "ArmA 3/%1.txt"'},{"CLASS EXPORT: FAILED to export %1 %2"}]),_x,toLower _classes]
} count ["CfgWeapons","CfgVehicles"];
compact galleon
#

language must be on the same line as ```

stable wave
#

much better

still forum
#

why are you using formatText anyway? why not use normal format ad then use parseText or whatever it's called to turn it into text

subtle ore
#

@still forum i did add the ``` !?!

#

Test

thin pine
#

@subtle ore it doesn't indeed

subtle ore
#

Hmm

still forum
#

uh what?

subtle ore
#

Code formatting

still forum
#

Was talking to @tropic gulch

thin pine
#

The coloring doesn't work on discord mobile app ( android at least )

subtle ore
#

Interesting, yes i have an android device.

stable wave
#

@still forum The code was not written by me. I just did some modifications to it in order to extract RHS classnames

still forum
#

Well... instead of using formatText just use format and parseText

stable wave
#

OK

turbid thunder
#

Is it possible to somehow disable footsteps? Like, of specific units? I assume there is no specific scripting command for it but mayby there is some sort of workaround to still achieve the same result? Mayby?

plucky beacon
#

I'm trying to preplan a project, making a sequence diagram figuring out where I don't exactly have the solution for how I'm doing to solve parts of it

rotund cypress
#

So I have a question with structuredText, how can I make it adapt to interface size?

#

I got it with normal sizeEx = whatever * safezoneH; but with structuredText that doensn't work.