#arma3_scripting

1 messages · Page 361 of 1

subtle ore
#

Oneoh, share your godlike powers and ascend us all

rancid ruin
#

i shared them on the wiki but someone reverted it sorry

little eagle
#

They're too dumb for irony.

rancid ruin
#

it's sarcasm not irony

#

dummy

peak plover
little eagle
#

🆗

subtle ore
#

Nooo! We've been defeated by the anti-SQFGod.

waxen tide
#

last time i made a joke i got banned.

rancid ruin
#

#rekt

peak plover
#

@waxen tide Did it involve racially / sexually profiling scripting commands? Because if it did, then you did deserve it

little eagle
#

😂

#

"sexualy", what?

waxen tide
#

no it didn't. i don't believe in such concepts.

subtle ore
#

🍿

little eagle
#

currentWeaponMode is supposed to return a string. For nul objects it reports 0, a number.
currentWeaponMode is a female scripting command.

waxen tide
#

does that mean every second scripting command i use must be currentWeaponMode otherwise my code is sexist?

#

i can already see it ... equal opportunities scripts that don't discriminate commands for their gender or race

subtle ore
#

@little eagle What happends when it returns 1? currentMagazine ? 😉

little eagle
#

setPosASL2 never works. It's a black scripting command.

waxen tide
#

setPosASL2 was an april fools joke

little eagle
#

It never does, Midnight.

waxen tide
#

someone came across the page explaining the 9001 parallel existing coordinate systems in arma and found it funny to add another one

#

recently someone asked me "ehh arma scripting can't be that bad, now can it?" and i linked him that page and the discussion was over.

subtle ore
#

Ahhh mannn...

still forum
#

wow...

little eagle
#

I liked the old one more.

waxen tide
#

lets change it.

subtle ore
#

Old one is better

still forum
#

🔨

little eagle
#

At least remove the `"appears to be"

waxen tide
#

🖼

little eagle
#

If something appears to be broken, then it probably is.

waxen tide
#

i actually remember trying to use setPosASL2 and despite always considering me making a mistake i immediately suspected its broken.

#

i dont remember that warning being there

little eagle
#

setPosWorld is the working version of it.

frail zephyr
#

Description.ext, Functions, is it possible to have subfolders? If I remember right, when I tried it errored out unable to find the functions. Figured somebody here probably knows.

#

I have categories, I'm looking for subcategories.

little eagle
#

You can only have categories, but you can have two of them that do stuff in different sub folders of a common folder.

tough abyss
#

Does anyone know why it won't work?
[rpHmmwv] call ace_medical_fnc_isMedicalVehicle;

frail zephyr
#

If I'm understanding you right, I would have my main categories in the base folder, then another description.ext in a sub folder? Or am I misinterpreting?

little eagle
#

No, you can only have one description.ext.

#

And you can only have categories in the config.

frail zephyr
#

Got it, you just mean making more categories. Which I already did. Thank you though.

little eagle
#

But the folders you can change to whatever you want.

frail zephyr
#

Yeah I figured that much out, I've got things divided but I wanted to subdivide them if possible. It seems the only way to do that would be to specify the function file exactly.

#

And that's not worth the hassle.

tough abyss
#

Anyone using ACE3 that knows why this command won't work?
[rpHmmwv] call ace_medical_fnc_isMedicalVehicle;

indigo snow
#

thats perfect syntax, so the error is somewhere else

#

rpHmmwv is not nil / objNull?

#

the line is actually executing?

#

ace3 is loaded?

little eagle
#

What even is the error?

tough abyss
#

No error

#

it just won't work

indigo snow
#

did you put it in a watch field in the debug console while previewing the mission?

little eagle
#

What do you think it's supposed to do?

tough abyss
#

Make a vehicle a medical vehicle

little eagle
#

No.

indigo snow
#

oh dear lol

#

check the name of the function*

little eagle
#
  • Check if vehicle is a medical vehicle
waxen tide
#

does remoteexec behave as expected in eden MP mode?

little eagle
#

You might be a pioneer on that subject.

waxen tide
#

looks at commy2 over his glasses

#

but thats something EVERYONE must be doing all the time?

#

i would test it on my dedicated server but my last attempt to get a script to fetch workshop mods properly left me scared with PTSD so i'm in somewhat of a recovery period.

little eagle
#

Try it locally hosted first. You don't need a server for that.

waxen tide
#

well its kinda easier for me to do it remotely, believe it or not.

#

sigh.

tame portal
#

I dont think remoteexec will behave unexpectedly in eden

little eagle
#

Doubt it.

#

I never even used 3den MP. You can have multiple machines edit the same mission?

waxen tide
#

well first you can't expect arma servers on windows & linux to behave the same. so i would have to set up a VM with linux first. have you ever tried to set up VM network with windows host?

little eagle
#

asdfghj, you can open multiple instances of the game and just alt tab between them.

waxen tide
#

i know.

#

i still don't want to test on a windows based server

austere granite
#

Anyone aware of UI types that do handle onMouseEnter but you can't just click them (Which pulls it on top of other controls and seeing arma doesnt have decent z-order shit gets fucked up)?

#

using ctrlEnable false will also disable onMouseEnter

waxen tide
#

my remote execution isn't being executed. no error output. i run the following code in a script which was started by initserver:

#
_zone remoteExec ["deploy\carrier_cutscene.sqf",-2,true];
#

if i interpreted it right, remoteexec from the server -> client doesn't require whitelisting?

little eagle
#

Does it work with filepaths? I don't think so.

waxen tide
#

oh.

little eagle
#
[_zone, "deploy\carrier_cutscene.sqf"] remoteExec ["execVM",-2,true];
waxen tide
#

😳 thanks commy

#

wait, whats that magic.

#
// <params1> someScriptCommand <params2>;
[<params1>, <params2>] remoteExec ["someScriptCommand", targets, JIP];
#

?

#

that strikes me as unintiuitive

little eagle
#

How else would you've done it?

#

It's a bit clunky for unary commands with an array on the right side, but otherwise...

waxen tide
#

hell i have no clue.

#

still doesn't remote execute my script :/

little eagle
#
titleText ["Test Message", "PLAIN", 1];
#
[["Test Message", "PLAIN", 1]] remoteExec ["titleText"];
#

[[ ]]

waxen tide
#

yeah that dawned on me, i guess 2 params is all you need and then it starts making sense

little eagle
#

Yeah. Commands can only have up to two arguments. One on the left and one on the right.

waxen tide
#

but the wiki says

#

params: Anything

#

and then i read param1

#

param2

#

and i think what if i add a param3 ?

#

confusion.

little eagle
#

I wish it would be more consistent and just call the arguments the same everywhere.

#

Better avoid param, because it could be confused with param(s).

#

args

#

arg1 arg2

waxen tide
#

eezzzz just write a replace script and throw it at the wiki.

little eagle
#

*revert*

waxen tide
#

so anything else i'm missing out on with remoteexec?

#

(first line in the script is a systemchat so i'm kinda thinking the script isn't executed at all)

little eagle
#

Tried with systemChat ?

waxen tide
#
[_zone, "remoteExec test"] remoteExec ["systemchat",-2,true];
[_zone, "remoteExec test"] remoteExec ["systemchat",0,true];
#

nope.

little eagle
#
"remoteExec test" remoteExec ["systemchat",0,true];
#

systemchat is only one arg

waxen tide
#

well now that worked

little eagle
#

Therefore, remoteExec works fine.

waxen tide
#

shouldn't 0 execute it everywhere

#

and -2 only on clients?

little eagle
#

0 Yes. -2 on all clients except the server

waxen tide
#

it only send one chat message.

tame portal
#

@little eagle Is this correct?

remoteExec ["command"]; // no parameter command
[] remoteExec ["command"]; // no parameter command
rightParameter remoteExec ["command"]; // unary command
[leftParameter, rightParameter] remoteExec ["command"]; // binary command```
#

I've never used remoteExec yet to remotely execute commands directly

little eagle
#

I don't think B works, but not sure.

#

no parameter command
nullary

tame portal
#

Right

little eagle
#

also

#
[rightParameter] remoteExec ["command"]; // unary command with array parameter
tame portal
#

Okay I didn't specify that because going from the logic "binary" I assumed an array on one side of the command is treated as one parameter

little eagle
#

It is, but it needs this special syntax.

runic surge
#

@robust hollow @GeekGuy884#0311 @tough abyss sorry I didn't respond last night I fell asleep lol. Anyway the object it self is created by the server via init.sqf after the clients stop executing (using if (!isServer) exitWith {}; to stop them). The solution @robust hollow provided works with the action being added but the amount doesn't work with the way I have it set up. That is because of me experimenting with other potential solutions earlier, so that is fixed just fine, and I just tested it and everything appears to work as expected. Anyway, thanks for all your patience and help. Locality truly is a bitch

tame portal
#

So [[1,2,3,4,5], [1,3]] remoteExec ["select"]; would theoretically return [2,3,4]

#

binary select with one array on each side

#
[1,2,3,4] remoteExec ["count"]; // == 4

myArray = [];
[myArray, 1] remoteExec ["pushBack"];
brazen sparrow
#

doesnt remoteexec return a jip code if anything?

tame portal
#

Was just an example, I know it doesn't return anything that is connected to the actual operation thats being done

#

Hm well I think it's just my opinion then, would have found the bottom two examples more logical

#
"hello" remoteExec ["hint"]; // unary
[array, 5] remoteExec ["pushBack"]; // binary

["hello"] remoteExec ["hint"]; // unary
[array, 5] remoteExec ["pushBack"]; // binary
#

Or am I missing something here?

#

Oh well yeah overloads would be an issue

little eagle
#

@tame portal remoteExec probably doesn't support pushBack and select, because those don't make sense when used with it.

tame portal
#

Was just examples because I couldnt come up with other example parameters

little eagle
#

Those commands have no effects.

#

Yes, pushBack is a binary command.

#

I think good examples are
systemChat (unary)
globalChat (binary)

#

Can't think of a nullary command : (

tame portal
#

Why does this work? oO

#
["test2"] remoteExec ["hint", clientOwner]
#

I thought this is the syntax for it ```sqf
"test1" remoteExec ["hint", clientOwner]

little eagle
#

One arg in the array. It just assumes it's a unary command, which is right.

scarlet spoke
#

I guess this is because of the same reason ["hello"] call function and "hello" call function are equal

little eagle
#

Yeah. Under the condition that the function uses a version of param(s).

scarlet spoke
#

Afaik _this in the function will always be ["hello"] doesn't it?

little eagle
#

With the function version of remoteExec, _this is whatever was on the left side of remoteExec.

scarlet spoke
#

I was referring to the simple call

little eagle
#

If you use

"hello" call function

then _this will be "hello".

#

No arrays.

scarlet spoke
#

Ah okay... So params is actually being smart when being used ^^

tame portal
#

Can you come up with a unary command that takes a parameter real quick? 😛

little eagle
#

systemChat

#

hint

#

call

tame portal
#

Oh

little eagle
tame portal
#

No urgh my head

#

I meant array

#

that takes an array

little eagle
#

titleText

tame portal
#

Right

little eagle
#

remoteExec ^^

#

diag_log

tame portal
#

It kind of upsets me that ["text"] and "text" both work fine for remoteExec >_>

little eagle
#

Why?

#

As long as it's unambiguous you should be happy that it's not rigid.

tame portal
#

I think that works better for someone wanting to use remoteExec because when you see ["test"] and you kind of assume that [player, "test"] is how the usage of a binary command looks like then

little eagle
#

Charts for slow thinkers?^^

grand berry
#

*Charts for visual learners.

tame portal
#

from "hint" to [player, "test"] it just feels like a crack in style for me

peak plover
#

I'm part of the visual learner and you can use the term visual retard

grand berry
#

😂

tame portal
#

while [oneparameter] to [oneparameter, twoparameters] looks more logical to me

#

From now on I shall only speak in charts I guess

peak plover
#

So many times I've had to draw shit out for myself to understand math or positions / vector

grand berry
#

If it helps, why not?

peak plover
#

Yeah, I can't understand without it. I'm like a caveman writing on a wall to understand the world

little eagle
#

😂

tame portal
#

Here is my next chart masterpiece

#

I'd like you to know that I despise you all (from now on) 😄

subtle ore
#

Paint or snipping OPTiX?

little eagle
#

I don't get it.

peak plover
#

hahaha

tame portal
#

Noone insults my highly accurate and well fleshed out charts

peak plover
#

Must be a physical/audio learner then commy

little eagle
#

No one*

tame portal
#

@subtle ore Paint, I am no amateur

little eagle
#

Just steal Photoshop like everyone else.

runic surge
#

I get it

subtle ore
#

@tame portal i see you are among the elite 🆒

runic surge
#

you belong in a cup

#

so funny

little eagle
#

But that's a glass and not a cup.

tame portal
#

@little eagle Corrects me when I say noone instead of no one, then tells me to download Photoshop for free

#

cough

subtle ore
#

Commy, you belong in there either way

tame portal
#

cough

#

cough

grand berry
#

Took you long enough OPTiX

runic surge
#

I think he belongs in the chalace of semantics

tame portal
#

If you google trashbin, it's one of the first results to come up

subtle ore
#

Hey kids, want some free cc keys?

runic surge
#

Not that I would know, but

tame portal
#

Okay nevermind, google Mülleimer, then you'll find it 😄

runic surge
#

there are certain methods out there of disabling trial limitations for all Adobe softwares

tough abyss
#

Is there an easy way to work on a PBO that contains scripts without closing the game, changing the script, relaunching, etc etc?

runic surge
#

that's what I have heard, anyway

little eagle
#

I can't believe they didn't make a :trashbin: emoji.

grand berry
#

With diag_mergeConfigFile

tame portal
#

You know I'd bombard you with :trashbin: then

#

🍆

subtle ore
#

👁👃👁
👄

grand berry
#

😂 wtf is that

runic surge
#

no

little eagle
#

🥃

runic surge
#

jesus christ when you fixed the mouth it looked like it started smiling at me

tough abyss
#

So if I load the pbo using the diag executable, I can take the un-pbo'd version and merge it in every time I make a change using diag_mergeConfigFile ["PathToConfigOnDrive"]?

subtle ore
#

😂

grand berry
#

Yea but it doesn't do deleting config values only changing and updating.

tame portal
#

🐄💨

#

What

tough abyss
#

What about scripts inside the pbo?

tame portal
#

This way

tough abyss
#

Should I just get them working as mission scripts and then repack them alter?

#

later?

little eagle
#

farting cow

subtle ore
#

@tame portal 😂 Ow, my sides. They hurt

tame portal
#

@little eagle I am a creative member of this society, stop the harassment please

subtle ore
#

You guys going to take it to HR?

astral tendon
#

guys what the hell is this?

runic surge
#

poor @tough abyss trying to be relevant to the channel

astral tendon
#

that just broke a important trigger

tough abyss
#

The farting cow is probably more important 😃

grand berry
#

@tough abyss no I'd just call those from outside the addon whilst testing ie mission? Or maybe use filpatching not 100% sure.

runic surge
#

@astral tendon that would be an image that I can't see

tough abyss
#

Sweet. I'll check it out. I hate sqf :/

little eagle
#

Can't load it either.

runic surge
#

make sure it is public

subtle ore
#

It is public

astral tendon
#

imgur is being a bitch

subtle ore
#

I can see it

little eagle
#

We all love SQF here.

astral tendon
runic surge
#

link directly to the .png or whatever it is

astral tendon
runic surge
#

there

#

works

subtle ore
#

I thought you posted a cat initially 🤔

tough abyss
#

I just come from python, so when I see class inside of class inside of class with if if if if if, I feel dirty 😦

tame portal
little eagle
#

I had this bug too three days ago. For some reason you can't select all the things in the edit trigger ui.

subtle ore
#

@tame portal bookmrk'd

tame portal
#

👍

tough abyss
#

Also, is it like, taboo to ask questions in here about extending a script in someone else's mod?

little eagle
tame portal
#

You and your priviliges.

subtle ore
#

@tough abyss You mean patching a mod essentially? Yeah

tame portal
#

I hate you.

astral tendon
#

how do i fix that?

little eagle
#

Delete the trigger and place a new one.

#

It seems to be a bug.

tough abyss
#

@subtle ore - Yeah there's a mod that I would like to adjust the functionality of. But it doesn't have any docs or params. So my goal was to make my own mod or scripts that alters its functionality.

astral tendon
#

is there a way to know if other triggers got effected?

tough abyss
#

To be clear, I don't mean models, textures, sounds... I mean mechanics. Essentially just keeping the player from dying.

subtle ore
#

Make a mod that inherits the values of the other mod

tough abyss
#

That's my goal

subtle ore
#

Keeping the player from dying could be done in script

little eagle
#

The player can always drown.

#

oxygenRemaining == 0 && underwater
x_x

subtle ore
#

Hah

tough abyss
#

Problem is, they control the unconscious state with the HandleDamage EH. So I would have to remove theirs to use mine.

little eagle
#

No, why?

tough abyss
#

I read in the BI docs that if there are two HandleDamage EH that alter the players damage, only the last one gets used.

little eagle
#

Yes. Make yours the last one.

tough abyss
#

Essentially, here is what I'm trying to do. Veteran mod has a whole medical system that controls damage. I want to implement a "prevent instant death". But even when I attach a handledamage EH directly to the player, their mod seems to set the value.

#

It seems like if I do get my EH to work, their entire system for handling that goes unused.

#

I'm just trying to keep the players total damage below 1.

little eagle
#

That's a problem then.

tough abyss
#

Exactly

little eagle
#

But there is no easy fix.

tough abyss
#

So I have two options that I know of right now. Don't do any of this and just come up with a different respawn mechanic for my group. Or modify the script in their PBO. Which seemed like I good idea, until I remembered this was arma. Not my day job 😃

#

Everything we use is open source. And the arma mod community seems kinda indifferent. I guess I can look at the license of that mod.

#

Which is something I should have done before I opened my fat mouth. But I'm kinda spitballing here 😃

#

They don't specify a license. So does that mean it automatically inherits a default license from BI or something?

little eagle
#
player addEventHandler ["HandleDamage", {
    params ["", "", "_damage"];

    if (_damage >= 0.9) then {false};
}];

tried this?

runic surge
#

is it possible to get a dead unit's side using typeOf?

tough abyss
#

I've tried similar stuff. I don't think my syntax was wrong. I just think that specific mod is taking priority over mine.

#

@little eagle Will that work from the init box of a unit or do I need to fire it from a script?

little eagle
#

You have to ensure that your is added later than theirs.

#

Also, idk if false or true work in handleDamage. Might also try:

#
player addEventHandler ["HandleDamage", {
    params ["", "", "_damage"];

    if (_damage >= 0.9) then {0.89};
}];
#

damn #logic

#

init box might run before their script.

tough abyss
#

They use exitWith{0} a lot

#

So it seems like that EH likes that

subtle ore
#

@runic surge what do you mean? Why not just get the side before death?

little eagle
#

It doesn't like it actually

#

Try mine, added via debug console.

tough abyss
#

k

little eagle
#

Better try with 0.89. Can't remember if 0.9 head kills you or not

tough abyss
#

Thanks

#

Yeah .89 seems like the max before death for some parts

runic surge
#

It is an event handler for a local unit so those values don't pass properly to everyone

little eagle
#

= .9

astral tendon
#

wait

#

savegame do that bug i have?

#

thats the only thing related to it

tough abyss
#

Crap. I would need another player to shoot me I think. Can I change player to all units instead of ai?

little eagle
#

Step on your nade.

tough abyss
#

Smart man

subtle ore
#

I have a fnc at hand to nuke me from orbit to test that kind of stuff

little eagle
#

I miss the scud launcher : (

subtle ore
#

Lol, yeah.

little eagle
#

One of my favourite units in CCG.

tough abyss
#

Instantly killed :/

runic surge
#

Is there any way to get a unit's side after death?

little eagle
#

"Shall I push the button?"

runic surge
#

getText maybe

tough abyss
#

I am assuming veteran runs their medical system in a loop. That's the only way I can think of that won't let me override from the debug console

little eagle
#

Or maybe their script just kills you with setDamage or something like that.

tough abyss
#

Oh yeah, it actually does. I see it in there all over the place. _unit setDammage 1; With two m's 😃

little eagle
#

Yeah, setDamage 1 == dead. No matter if you allowDamage false or have a million other handleDamage events.

#

x_x

tough abyss
#

So that means I would have to modify their script. Which is a no no I guess?

#

I still can't find a license for it.

little eagle
#

Do they store the eventhandler id? You could just removeEventHandler it and replace it with a copy paste that is adjusted for your purposes.

tough abyss
#

I'll check

little eagle
#

Otherwise you could guess the id. It's probably 1 or 2. 0 is for BI damage feedback pp effects and piss filters.

#

Shoud be the same every time...

tough abyss
#

Again though, if I remove theirs, then I imagine I lose their entire system. So I'd have to re-implement it in mine.

little eagle
#

Yep.

#

and replace it with a copy paste that is adjusted for your purposes.

tough abyss
#

Cool. Well I guess I'll get to work. Thanks for your help man. Their script is huge so I'll have to figure it all out.

little eagle
#

First step is to copy paste it all and get the stuff around it to work.

tough abyss
#

Yep. I was hoping for a quick spot to plop in if (_damage >= 0.9) then {0.89};

#

They've got like 8 sqf files that handle everything

subtle ore
#

The 0.89 would be the damage return btw

tough abyss
#

Yep. Seems like .89 is just under the threshold to keep people from dying.

subtle ore
#

Well technically 0.99999 is too.

tough abyss
#

I'm still not clear on the total damage vs part damage thing

little eagle
#

Pretty sure 0.91 in HitHead kills you.

#

Maybe even 0.9

tough abyss
#

Like a part can be 1. But you can still be alive because your total damage is .6 or whatever?

little eagle
#

Same for HitBody

#

total damage must be below 0.9 too

tough abyss
#

So each part has a threshold for death?

subtle ore
#

Left leg?

tough abyss
#

And somehow contribute to the total damage? Or is the total damage just the sum of all the parts damage?

little eagle
#

No, HitHead, HitBody and structural damage (total) have.

tough abyss
#

Like if one leg is .5 and the other is .5, I'm dead because the total is 1

little eagle
#

No.

subtle ore
#

🤔

little eagle
#

Limbs can be 1 and you don't die.

#

In fact, they are either 0 or 1 most of the time anyway.

#

Very low armor.

tough abyss
#

So in the hit part index, -1 is total, 0 is face_hub, 1, is neck

#

Is there a list anywhere for that?

little eagle
#

total is not the sum. It's the received limb damage times a passThrough multiplyer.

tough abyss
#

Because I see they have a lot of if statements `if (_index in [0,1,2])

little eagle
#

Don't try to make sense of it. It's a horrible system.

tough abyss
#

I'm just going to do a find replace of these scripts. Everywhere where it says setDammage 1 I'm going to make it setDammage .88. But then I still would have to make the vitals not an insta-kill

#

Jeeze. Might be easier just to have people respawn back at base and have a delay before they can get back in the fight. All I'm trying to do is implement a perma-death system. Where if you die, you are done for the night. But to make that kinda fair, I want to give them a chance to get revived.

#

As unrealistic as that sounds.

astral tendon
#

can i put miliseconds in sleep?

#

like sleep 29,50;

little eagle
#

They use decimal dots in English and programming.

#

29.50

#

Because anglos are weird.

astral tendon
#

scripting is weird

rose hatch
#

Are multi / signle line comments included in the character / element cap of arrays?
like, if I have

myArray = [
/* Lots of commented stuff
blah blah blah
*/
actualArrayStuff, moree stuff, stuff
];

will the comments count towards the cap?

little eagle
#

That should work.

#

why tho

rose hatch
#

Just wondering whether omiting comments in arrays is a good practice. Might have to make a really big array for something...

little eagle
#
_source = "#particlesource" createVehicleLocal getPos (_this select 0);
_source setParticleParams
/*Sprite*/        [["\ca\characters2\OTHER\FLY.p3d",1,0,1,0],"",// File,Ntieth,Index,Count,Loop(Bool)
/*Type*/            "spaceObject",
/*TimmerPer*/        1,
/*Lifetime*/        4,
/*Position*/        [0,0,0],
/*MoveVelocity*/    [0,0,0.5],
/*Simulation*/        1,1.30,1,0,//rotationVel,weight,volume,rubbing
/*Scale*/        [0.03,0.03,0.03,0],
/*Color*/        [[1,1,1,1],[1,1,1,1]],
....
drowsy axle
#

So, X & Y equal your position on the map, correct? What does getPos return as, in the terms of an array?

little eagle
#

x, y and z?

drowsy axle
#

Z is your ASL though.

little eagle
#

No.

drowsy axle
#

AGL?

little eagle
#

No.

drowsy axle
#

??

rose hatch
#

lol

little eagle
#

AGLS

drowsy axle
#

.... 😐

little eagle
#

It's different from AGL

rose hatch
#

That's the z value used in the editor, right?

little eagle
#

setPos uses AGL
getPos reports AGLS
This is why

player setPos getPos player

Moves you on the ground when standing on a roof or in a watch tower.

drowsy axle
#

So if I was to, have sqf player getPos; select 2; // this would be Z?

little eagle
#

What z do you want?

drowsy axle
#

coords not height. However. I do want to then create an object with a height.

little eagle
#

Let me rephrase.

#

Where should z be 0?

#

The terrain?

#

Sea level?

#

Waves?

#

The roof below you?

drowsy axle
#

Sea level

little eagle
#

getPosASL _object select 2

#

above sea level

simple solstice
peak plover
#

ASL != age sex location??

drowsy axle
#

Thanks @simple solstice

#

So, I want to have a script that finds the Pos of the player. then uses that information to make another Pos based from the player, but with a minor difference of a few 100m's. At that Pos, there will be a helicopter spawned (with an attached (sling loaded) box, which (for now) has the asrenal on the scroll option. Which then a waypoint is made (assigned) from the helicopter, to the players location. The object would be unloaded from the helicopter and then a new waypoint created for a "dismissed" point then the deleteVehicle command being called.

little eagle
#
_unit getPos [100, random 360] vectorAdd [0,0,200]

Something like this?

drowsy axle
#

Looks like it.

#

Can I define the _unit via sqf _unit = B_Heli_1_F;

simple solstice
#

uhm

little eagle
#

No.

simple solstice
#

not really

#

if its spawned via createVehicle

#

then just add _unit =

little eagle
#

Also, _unit is that player avatar

simple solstice
#

before it

drowsy axle
#

It would already know

simple solstice
#

B_Heli_1_F is an already defined global variable?

#

by you?

drowsy axle
#

No

#

Just an example

#

well classname

simple solstice
#

no

drowsy axle
#

Idk if it right

simple solstice
#

it doesnt work like that

#

an object

#

isnt a classname

drowsy axle
#

I know that

little eagle
drowsy axle
#

Yeah. So with this: sqf _unit getPos [100, random 360] vectorAdd [0,0,200]

little eagle
#

That's a position to spawn the helicopter.

drowsy axle
#
//in one line? 
_heli = "B_Heli_Transport_03_F" createVehicle position player [getPos [100, random 360] vectorAdd [0,0,200]];```
little eagle
#

```sqf
code
```

drowsy axle
#

I knew. Just had a space after sqf

little eagle
#

Jeep is no classname in A3.

drowsy axle
#

It's an example.

little eagle
#

Also, position is wrong here. You already have getPos.

drowsy axle
#

I know a classname

little eagle
#

And you'd need parenthesis. And this binary syntax of create vehicle ignores the z / height, so the heli would just sit there on the ground.

#

Parenthesis are the round brackets.

#

And position is still wrong.

#

^^

#

You're just guessing.

rose hatch
#

0_0

drowsy axle
#
player getPos; // How do I turn this into a variable?
_heli = "B_Heli_Transport_F" createVehicle position playerPos1;
rose hatch
#

So like

_thing = "classname" createVehicle _unit getPos [100, random 360] vectorAdd [0,0,200];

?

indigo snow
#

no

#

type createVehicle position

drowsy axle
#

Why is _ x and _unit different?

little eagle
#
private _positionATL = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _positionATL, [], 0, "FLY"];
drowsy axle
#
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _playerPos1 , [], 0, "FLY"];```
#

Oh wait no

#

Silly me

little eagle
#

I like the ATL for non-ASL coordinates, but personal preference.

rose hatch
#

Oh yeah... I guess the special param is needed to have it flying isn't it.

little eagle
#

Yup.

#

Otherwise they're glued to the ground.

rose hatch
#

Or spawned falling :/

little eagle
#

Something like that

#

That's why you need the unary version of createVehicle and not the binary one.

drowsy axle
#
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _playerPos1 , [], 0, "FLY"];```
little eagle
#

Random radius around that position.

rose hatch
#

createVehicle [type, position, markers, placement, special

#

Ninja'd

drowsy axle
#

hmm

#

what the [] for?

little eagle
#

Array of markers where the vehicle should spawn in or something. I never used it.

#

Not everything has to make sense or be useful.

drowsy axle
#

Oh okay. Thanks guys.

#
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _heli = createVehicle ["B_Heli_Transport_03_F", _playerPos1 , ["Miller"], 0, "FLY"];```
little eagle
#

Just don't^^

#

"player pos" is a bit misleading, isn't it? it's a position a hundred meters away from the player and 200 meters above the ground.

drowsy axle
#
private _playerPos1 = player getPos [100, random 360] vectorAdd [0,0,200];
private _millerPos1 = createMarker ["Miller", position _playerPos1];
private _heli = createVehicle ["B_Heli_Transport_03_F", _millerPos1 , [], 0, "FLY"];```
little eagle
#

createMarker reports the marker and not the position.

#

So this will error.

#

expected ARRAY encountered STRING or something like that.

rose hatch
#

Unrelated,
Is there a reference list somewhere of all pylon weapon classnames? Wiki maybe?
I don't feel like picking through the entirety of cfgMagazines...

drowsy axle
#

pylon?

little eagle
#

Aren't they all tagged with "pylon"?

drowsy axle
#

Never heard of it? What gun/weapon?

rose hatch
#

Some are tagged w/ PylonRack_x but others arent

little eagle
#

Can't you put any mag as pylon in theory?

#

That was my understanding.

rose hatch
#

Probably, but I was looking for an easy list of actual pylon compatible weapons 😛

#

I guess I could do this getCompatiblePylonMagazines ""

#

and copy the returning array down

ivory vector
#

@little eagle know the dialog animations I was working on the otherday ?

rose hatch
#

Oooo pretty

little eagle
#
'isText (_x >> "pylonWeapon")' configClasses (configfile >> "CfgMagazines") apply {configName _x}
rose hatch
#

Huh?

little eagle
#

Isn't this what you talked about?

rose hatch
#

Just parsing...
so

_list = 'isText (_x >> "pylonWeapon")' configClasses (configfile >> "CfgMagazines") apply {configName _x};
copyToClipboard _list;

?

little eagle
#

Yes.

rose hatch
#

Error Generic error in expression D:

#

Same error for

_list = "B_Plane_Fighter_01_F" getCompatiblePylonMagazines 0;
copyToClipboard _list;
little eagle
#

copyToClipboard str _list;

#

string!

#

copyToClipboard is picky.

rose hatch
#

Ahh, all good

ivory vector
#

Im over complicating things now xD

#

Remaking BIS_fnc_guiMessage to match the tablet xD

slender halo
#

is there a way to get the absolute path of the script you are in ?

robust hollow
slender halo
#

not bad, but it's relative to arma :/

robust hollow
#

what do u mean?

slender halo
#

to mod hierarchy

robust hollow
#

i still dont understand 😕

slender halo
#

"x\surface_painter\addons\sp_mode_surface_painter\events\fn_surfacePainter_init.sqf"

ivory vector
#

you could split the string

#

remove the Arma part of the filepath.

slender halo
#

i try to programmatically find out where my mod is located

#

D:\zgmrvn\Arma\mods\built\@surface_painter\addons

#

something like that

robust hollow
#

i see.

ivory vector
#

split the string at \addons\

robust hollow
#

he wants a full filepath from the drive to the script, not the one that starts at the arma directory?

slender halo
#

right, full path

ivory vector
#

hmm

tough abyss
#

i guess you would need to do that within the dll

ivory vector
#

Or define the path from hdd to arma in a config. then use File.

rose hatch
#

I don't think there's a way to find system filepaths within arma scripting... All the file paths are relative to mission / mod / A3 root directory

astral tendon
#

while {true} do {
testguy2 domove (getPos testguy);
sleep 5;
};

#

what is the generic error?

robust hollow
#

is the script scheduled?

subtle ore
#

Sleep in unscheduled

astral tendon
#

how i do it?

robust hollow
#

spawn instead of calling the script that loop is in

astral tendon
#

_null = [] spawn {
while {true} do {
testguy2 domove (getPos testguy);
sleep 5;
};
};

#

this one works

tough abyss
#

So a quick question what does modelToWorld actually do?

#

Or why would you use it?

robust hollow
#

i use it to place objects relative to another. it takes into direction too so its better than getpos obj vectoradd [0,5,0] in that regard.

slender halo
#

let's say your object is in [1000, 1000, 0] and facing north

_object modelToWorld [-100, 0, 0]; // [900, 1000, 0]
robust hollow
#
getpos obj vectoradd [0,5,0] // 5 meters north of obj
obj modeltoworld [0,5,0] // 5 meters infront of obj```
slender halo
#

👍

tough abyss
#

so modelToWorld displaces the positions of the object with respect to the objects position in worldSpace??

slender halo
#

no, it just returns the relative position without moving object

cloud thunder
#

refferences or defines position relative to center of an object

tough abyss
#
_attachVehTo setPosATL (_spawnPosition modelToWorld [0,0,200]); 
cloud thunder
#

object modeltoworld [x,y,z]

#

_spawnPosition probably not an object?

tough abyss
#

ah

#

Does waitUntil {} have to be executed in the scheduled environment?

cloud thunder
#

yes

thick sage
#

when I createUnit on the server passing a group owned by a client, does the client becomes the unit owner?

cloud thunder
#

yes

thick sage
#

thanks Jigsor

tough abyss
#

Arma 3 doesn't like non explicit commands when it comes to spawning parachute objects

#

"B_Parachute_02_F" createVehicle pos;

#

doesn't play nice with parachutes

#

"Cannot create non-ai vehicle"

tough abyss
#
test_fnc = { 
 params ["_paraType","_vehType","_spawnPos","_zHeight","_attachVehTo"]; 
 private _paraObj = createVehicle [_paraType ,[(_spawnPos select 0),(_spawnPos select 1),((_spawnPos select 2) + _zHeight)],[],0,"CAN_COLLIDE"]; 
 
 
_vehToAttach = createVehicle [_vehType,[0,0,0],[],0,"CAN_COLLIDE"]; 
 
_vehToAttach attachTo [_paraObj,[0,0,0.01]]; 
_attachAtPos = getPosATL _vehToAttach; 
_paraObj spawn { 
 
    waitUntil { 
      diag_log _this;
      diag_log (getposATL(_this) select 2);
      (getposATL(_this) select 2) < 3; 
      detach _this; 
      }; 
  }; 
}; 
 
["B_Parachute_02_F","C_Offroad_02_unarmed_F",getPosATL(player),200,cursorTarget] call test_fnc;
#

Any reason why the waitUntil isn't working?

#

It also ends up going into the ground geometry

#

This makes no sense.

#

@cloud thunder

#

Vehicles glitching into the ground?

#

After they reach the ground?

#

On Tanoa

#

Thats some serious screwer BIS

#
(_this select 1) setPos [position (_this select 0) select 0, position (_this select 0) select 1, 0]
#

From your own code.

#

Obviously shit was glitching into the ground for them too

robust hollow
#

ur detaching the parachute inside the waituntil?

tough abyss
#

Now my code is doing some weird stuff

#

Like making vehicles fly within the waituntil

#

Not even sure why.

#
test_fnc = {
 params ["_paraType","_vehType","_spawnPos","_zHeight","_attachVehTo"];
 private _paraObj = createVehicle [_paraType ,[(_spawnPos select 0),(_spawnPos select 1),_zHeight],[],0,"FLY"];


_vehToAttach = createVehicle [_vehType,[0,0,0],[],0,"NONE"];

_vehToAttach attachTo [_paraObj,[0,0,0.01]];
_attachAtPos = getPosATL _vehToAttach;
[_paraObj,_vehToAttach] spawn {

    waitUntil {
      ((getposATL(_this select 0) select 2) < 3 || isNull (_this select 0));
      detach (_this select 0);
      (_this select 1) setPos [(getPos(_this select 1) select 0),(getPos(_this select 1) select 1),0];

      };
  };
};

["B_Parachute_02_F","C_Offroad_02_unarmed_F",getPosATL(player),200,cursorTarget] call test_fnc;
#

The vehicle is shuddering rapidly.

robust hollow
#
    waitUntil {
      ((getposATL(_this select 0) select 2) < 3 || isNull (_this select 0));

      };
      detach (_this select 0);
      (_this select 1) setPos [(getPos(_this select 1) select 0),(getPos(_this select 1) select 1),0];
#

waituntil the condition is true then proceed

#

waituntil runs on almost each frame (or something like that)

tough abyss
#

oh...

robust hollow
#

it must return true or it wont exit

tough abyss
#

Right it's inside the waitUntil

#

it should be outside it.

#

facepalm

#

Nope still glitching into the ground...

#

Literally falls through the map

#

@robust hollow

robust hollow
#

setposatl instead?

tough abyss
#

Nope

#

Stiil glitches into the map

#
test_fnc = {
 params ["_paraType","_vehType","_spawnPos","_zHeight","_attachVehTo"];
 private _paraObj = createVehicle [_paraType ,[(_spawnPos select 0),(_spawnPos select 1),_zHeight],[],0,"FLY"];


_vehToAttach = createVehicle [_vehType,[0,0,0],[],0,"NONE"];

_vehToAttach attachTo [_paraObj,[0,0,0.01]];
_attachAtPos = getPosATL _vehToAttach;
[_paraObj,_vehToAttach] spawn {

    waitUntil {
      ((getposATL(_this select 1) select 2) < 3 || isNull (_this select 0))
      
      };
      detach (_this select 0);
      (_this select 1) setPosATL [(getPos(_this select 1) select 0),(getPos(_this select 1) select 1),0];
  };
};

["B_Parachute_02_F","C_Offroad_02_unarmed_F",getPosATL(player),200,cursorTarget] call test_fnc;
#

Look wrong?

#

God damn headache...

robust hollow
#

i see what u mean, give me a sec

#

ur detaching the parachute not the car

#

?

tough abyss
#

Yes

#

_paraObj is the chute

robust hollow
#

and the car is attached to the chute

#

so detach the car?

#

yea tried it, works fine

#

the chute isnt attached to anything

#

the car is

tough abyss
#

Alright I'll try again.

#

k now it works

#

Appreciate it.

rose hatch
#

Hrm... So I'm using (bigArray select _forEachIndex) select 0; to get an element from a rather large array... It seems to work when there are no comments within the array, but as soon as I add either a single-line or multi-line comment to the array I start getting missing ; errors...

astral tendon
#

were is the keyboard configuration in Eden?

rose hatch
#

Top menu > Settings > Controls... > Editor Camera

#

I think those are the only editor controls that can be changed...

sick drum
#

Hey I want to get into voice acting my scenarios but I don't know how to do that So how do I make it on the bottom right-hand corner the hq talking to you?

#

Like "HQ to Paladin We need you on point A through Z now"

robust hollow
#

in the chat?

sick drum
#

Yes

robust hollow
#

depends what channel u want it in. look at sideChat command (i think its called) and it should link the other chats versions of it.

sick drum
#

I wanted to be like when you activate a trigger it tells the player what to do next type of a thing

robust hollow
#

yea, this should do that

sick drum
#

Okay I'll look into it

robust hollow
#

if not ill have a look when im back home.

astral tendon
#

sound[] = {"dub\unknowguy.ogg", 1, 1};

#

what is that "1, 1}"

robust hollow
#

volume and pitch or something

#

should say on the wiki

runic surge
#

Why does the GUI editor break text size

sick drum
#

How Does time triggers work again, like what if your first objective is Defend a base for 5 minutes How would that work?

loud python
#

I've been getting this bug every now and then, where vehicles get bugged and once a player gets in, no other players can

#

I believe this might have to do with the command to add editable objects to a zeus

#

can anybody confirm that, or has anybody experienced a similar behavior?

ivory vector
#

is there a way to stop people tabbing through dialogs, I ran into an issue.

robust hollow
#

try blocking tab with keydown evh?
display displayaddeventhandler [“keydown”,{(_this select 1) == tabKey}];

#

or isthat not what umean

little oxide
#

Yes you need to return true with the eventhandler keydown, so this will override the key

runic surge
#

Why do I get Error: Member already defined for my dialog on a line that is just };

#

just the end bracket of something

halcyon crypt
#

it means that you have too many (or too few I guess) braces in the config

runic surge
#

but I don't

halcyon crypt
#

the number of { should match the number of }

runic surge
#

I do

#

the brackets are entirely valid

halcyon crypt
#

well show us the config then ^^

runic surge
#

no missing ; either

halcyon crypt
#

what's the span stuff at the top?

runic surge
#

pastebin does that for whatever reason

#

if the first line isn't blank or commented

halcyon crypt
#

ah weird

#

it's probably the colorBackground in BTH_RTS_Group_Options_Formation_Dialog

#

don't think they can be strings

robust hollow
#

yes they can be

halcyon crypt
#

alright 😃

runic surge
#

copied right from the default

halcyon crypt
#

I can't spot anything else

robust hollow
#

what line does it say the error is on?

runic surge
#

second to last

#

line 208

robust hollow
#

could u screenshot it plz, it fine for me but i cant check with the inherited classes

runic surge
#

yeah one sec

#

it works now so I guess not

#

I didn't change anything

#

I am very much confused

#

It loads into the GUI editor just fine as well

#

I must have done something without fully reloading the description.ext
That is the only thing I can think of

robust hollow
#

cant say im a fan of the gui editor.

runic surge
#

It is unusable on it's own

#

also it fucks up random bits of code for seemingly no reason whatsoever

compact maple
#

Hello, just a quick question guys
if i do :
_potatoes = player;

if (isNull _potatoes) then { hint "this is null";};

i dont know what the isNull function is testing, the variable _potatoes or the "player" ?

indigo snow
#

The value of the variable

still forum
#

🌮

little eagle
#

B-both?!

astral tendon
#

do you guys know a good scricpt to loap a music and can be stoped? the one i have here does not work that well...

inner swallow
sick drum
#

Well yeah I'm pretty sure, I mean it sounds like they would be scripting to it

real tartan
#

Is there a way to disable "fire action" on fireplace object? But I want to add custom action to it with addAction command.

still forum
real tartan
#

hmm, so no way without mod, like with some script commands. I wonder what removeAllActions will do.

still forum
drowsy axle
#

Where can I find the dialog options for the hint box (NOT: hint / hintc)

#

Where you press H to bring it up or down.

rotund cypress
#

This is a small thing, but does anyone think BIS would add in a ++ operator in sqf to increment a variable?

#

Also =+ and --

sleek mural
#

if only

inner swallow
#

#arma4goals

rotund cypress
#

By the looks of it, ArmA 3 has a long future ahead

inner swallow
#

i'm kidding 😛

rotund cypress
#

In all their dev diaries they have said ArmA 3 will stay for many years to come

inner swallow
#

I would indeed like it too

rotund cypress
#

And I don't think we will see ArmA 4 in the coming 5 years

#

Afterall, they need a new idea for A4 and what would that be ya know?

inner swallow
#

A3's last major update will be Tanks though, so post Q2 2018 I don't expect all that much except bugfixes

#

But yeah, i do hope stuff like ++, --, =+ etc are supported day one in Enfusion

rotund cypress
#

Yeah, I guess after Q2 2018 A3 will slowly start dying

still forum
#

@rotund cypress That's not as easy as you think it might be

inner swallow
#

dunno how easy it is with RV4/SQF though

still forum
#
_v1 = 1.0;
_v2 = _v1;

_v1++;

That would also increment _v2 sadly

#

which you probably don't want

#

-- the same.. += should be doable.. I guess

tough abyss
#

@rotund cypress Not sure what dev blog you were reading. They are pulling devs off arma so they can work on dayz engine.
I wouldn't start asking for sqf commands we don't really need

rotund cypress
#

Link? Did not see this one.

#

Sad that they're working on a dead game.

tough abyss
#

https://dev.arma3.com/post/sitrep-00202

"This is simply because, even though we still support Arma 3 with a dedicated team of developers, we also need to steer some of our efforts into the direction of developing key new technologies, such as the Enfusion engine."

Not really news though

peak plover
#

What's the in-engine screenshot command

inner swallow
#

hardly a "dead" game though

#

nigel - i think it's just screenshot

rotund cypress
#

screenshot @peak plover

peak plover
#

thx

#

I've made this too complicated to myself

rotund cypress
#

I haven't seen a community like this big for DayZ, so I am not sure why they're prioritizing DayZ over ArmA 3

still forum
#

They are not

inner swallow
#

they're not, they're working on the DayZ engine

#

i.e. Enfusion

#

Which will probably end up powering the next Arma game

#

because RV4 and SQF is really old and creaky

rotund cypress
#

It is, and yes enfusion and this new language will be nice for ArmA

#

But I don't see this happening in the next 5 years

#

More like, DayZ will stay shit for another 4 years

#

ArmA 3 will keep all its bugs, cause all developers are working on Enfusion

#

/ DayZ

#

And it will just be a blatant mess

inner swallow
#

Well, not really - DayZ devs will keep doing whatever they've been doing

#

Some A3 devs will continue to support A3 until the end of 2018 at the very least

#

While the other folks continue to work on Enfusion/Next Arma Game

rotund cypress
#

But enfusion is intended for DayZ at first

inner swallow
#

Not necessarily

#

It's basically UE4/CryEngine equivalent for BIS

#

Just like Argo was made on RV4 while A3 continued doing its stuff

#

And things that benefitted both were cross ported between both games

#

should be the same with DayZ and Next Arma Game

#

I mean BIS probably know how to manage multiple projects at the same time 😛

simple solstice
#
[
    _myLaptop,
    "Hack Laptop", 
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa",
    "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", 
    "_this distance _target < 3", 
    "_caller distance _target < 3",
    {}, 
    {}, 
    {_this call MY_fnc_hackingCompleted},
    {},
    [], 
    12, 
    0, 
    true,
    false
] remoteExec ["BIS_fnc_holdActionAdd",-2,_myLaptop];

How can I retrieve the Action ID from this, so I can BIS_fnc_holdActionRemove?

#

On all clients

still forum
#

from this? you can't.

simple solstice
#

So I would have to write a function

still forum
#

doesn't hackingCompleted func also get the actionID in a variable?

simple solstice
#

Code executed on completion; arguments [target, caller, ID, arguments]

#

So i guess the third one is the action ID?

rotund cypress
#

Well, true @inner swallow but I still think it's gonna hurt the ArmA community a lot

#

Then again, I am very butthurt cause ArmA is dying, since my love for the game is undescribable

simple solstice
#

The problem is this is going to be used for a revive scripts.

#

script.

#

So I need to delete the action, when player respawns

#

I could use a condition to it so it only shows up when a player is dead I guess

astral tendon
#

i changed the idea on the music loop, how about a looping trigger that i can also stop with another?

#

you guys know any good setup?

lavish hamlet
#
if (lifeState player == ("DEAD","DEAD-RESPAWN","INCAPACITATED")) then {
    player addaction ["Collect Gear", "fn_take_gear.sqf"];
    };

would this be valid or do i have to go about the lifestats diffenterly ?

astral tendon
#

music = true;
nul = [] execVM "music.sqf";

#

this setup works and me music loop

#

but when i use music = false

#

it does not stop the music immediately

#

it waits until the music finish

#

reason for that is because i have a long music

#

any ideas how i make it stop immediately?

inner swallow
#

i think you'll have to playMusic "" to get it to stop

astral tendon
#

nice!, i did not know that you could let that empty

still forum
astral tendon
#

funny that also does not broke the music that plays in the same trigger

peak plover
#

So erm

#

I had something commented

#

And it ran???

#

Was this a cosmic ray hitting my computer or is there a chance the comment escaped?

grand sleet
#

cosmic ray

astral tendon
#

my_music_handle = [] spawn
{
while {true} do
{
playMusic "loop_22";
sleep 77
}
};

#

this music is not looping

#

it have 1:27 length

#

so i put sleep 77

#

but over 30 it does not loop

rotund cypress
#

Guys, do you know if it's possible to make an picture ctrl start shaking?

#

I guess I can create a somwhat good thing by changing the positioning and shadow myself, but that seems like a bad way

onyx geode
#

Hi guys, how do i reset the set target of a camera when i use camSetTarget ?

rotund cypress
#

@onyx geode you cannot.

#

You have to set a new target or go back to old one

#

Create the camera again or store the last one in a variable and use that

onyx geode
rotund cypress
#

Hmm, what a coincidence, I just used ctrlSetAngle myself a few minutes ago, I will try that, cheers!

astral tendon
#

now i see the problem, the game for some reason dont wanna play the music full

#

it only plays half of it and cuts

#

how i fix that?

inner swallow
#

why spawn it?

#

nvm i guess you're putting this in an init box or calling it from the debug console

indigo snow
#

What file format is it?

#

.ogg?

tame portal
#

@little eagle Spam

frail zephyr
#

Is there a way to play the gunshot sound that is attached to a weapon without firing the weapon? I was looking at CfgWeapons and see sounds attached but am unsure on how to use them.

still forum
#

@frail zephyr playSound should be able to do it just fine

frail zephyr
#

I guess the better question is, how do I properly retrieve the sound from there? Haven't done much with the Cfg files other than functions.

little eagle
#

getText / getArray

#

You can't fully emulate gun shots anymore though. All those environmental effects and sound filters are not supported by any SQF command.

#

They'll always sound a bit different.

frail zephyr
#

Im just making a "Do Not Enter" area, and inure the player when they enter; wanted to add some effect to it.

little eagle
#

Use the ricochet sound. Really really loud.

frail zephyr
#

I'll try to find it, ty

subtle ore
#

POP POP YIKES!

rotund cypress
#

Hey guys, does anyone else here ever got a problem with BIS_fnc_initListNBoxSorting function? I get a error zero divisor error.

unique pollen
#

i need some help finding a random position to spawn an enemy group in an area, but making sure its x meters away from all players in said area

#

ideas?

#

thinking SHK_pos

peak plover
#

cba in area

unique pollen
#

erm, additional ingo @peak plover ?

chilly hull
#

So, has anyone ever had the case where if you print the value of a variable it doesn't come out as "true" or "false" but "bool"?

indigo snow
#

thats probably the boolean Null-type

#

or youre accidentally logging the typename but lets not assume that

chilly hull
#

I see.

#

I'm trying to switch our missions from using a homebrew revive system (SWS) to BI's revive system. I have discovered that if 2 players die next to each other one of them gets a script error every 0.05 seconds.

#

13:43:28 Error position: <_canUseMedikit]; if (!_canUseMedikit && > 13:43:28 Error Undefined variable in expression: _canusemedikit 13:43:28 File a3\functions_f_mp_mark\revive\fn_reviveAllowed.sqf [BIS_fnc_reviveAllowed], line 316

polar folio
#

does anyone here know their way around the arsenal function? i was wondering i one could trick it into loading the stuff of two units instead of one. like when you make it open with only what you carry yourself

sage flume
#

I looked "everywhere'. can anyone confirm the proper classname changing from "Male05GRE" to "Male01ENGA". I want american English is that properly written?

robust hollow
#

depends what kind of american english ur after. 05GRE translates to 05ENG but there are 12 or so american english voices to choose from what i can see.

sage flume
#

ok so what I need to confirm is teh extension,.....GRE or ENG and so on. I need the american english ectension and thought Iread somewhere that it might be ENGA

#

are you saying that it is just ENG and not ENGA ?

queen cargo
subtle ore
#

Error

spring lodge
#

no i dont think, but if it is passed a group that hasnt been created it will error

queen cargo
#

@subtle ore you tested? or you just remember?

subtle ore
#

Yes I tested

spring lodge
#

hmm, midnight ive tried it with an empty and it didnt error

queen cargo
#

can you send me the err msg?

subtle ore
#

it is either created like this (createGroup west) createUnit [];

#

or it has to exist beforehand

#

Check rpt

queen cargo
#

nah ... mean the group as positional parameter

subtle ore
#

Positional param? It doesn't use groups as a form of retrieving positions even in the alt syntax

#

group: Group - Existing group new unit will join

queen cargo
#
_grp = createGroup west;
_unit = _grp createUnit ["B_Soldier_F", _grp, [], 0, "FORM"]```
#

position: Position, Position2D, Object or Group - Location unit is created at. In case of Group position of the group leader is used

subtle ore
#

I see

#

Well, I would say yes

#

wouldn't see wy not

#

Haven't tested that in particular

queen cargo
#

lol ... says the same msg as when one passes empty array

subtle ore
#

gotcha

#

that's kind of odd though

#

I think I brought up the confusion regarding this in the wiki channel the other day

robust hollow
sage flume
#

thank a lot !

warped fractal
#

Does anyone know how I can lock/disable a sector then unlock/enable it later? I have multiple sectors that I want to be taken one by one instead of all being available. I've tried
enablesimulationglobal false
which in turn does lock the sector from being taken, but using
enablesimulationglobal true
won't re-enable the sector to be taken.

I tried toying around with Unlock and Lock logics but to no avail

little eagle
#

Sector?

warped fractal
#

Control Sectors

little eagle
#

Don't think you can use enablesimulationglobal on them and achieve much. Modules are just tools to execute a script and those don't care about the simulation of a game logic.

peak plover
#

You can create modules using scripts 'tho

#

So create it later?/

warped fractal
#

That might be a possibility, I'll see what I can do

subtle ore
#

Pretty sure there is a fnc for sector creation

little eagle
#

tracked apcs are class Tank.

#

Best thing is to check if they have cargo space for soldiers.

#

Would list the Not-Merkava as APC, but it technically is...

tough abyss
#

The namer?

little eagle
#

Slammer

tough abyss
#

Ah.

little eagle
#

An APC with a machine cannon and grenade launchers is arguably more dangerous than a MBT with machine guns for infantry.

#

I remember my first mission in a Leopard in A2 shooting down a Hind with the main gun. 👌

#

simulation

#

They both have TrackedX

#

TrackX ?

#

Something like that.

#

TankX!

#

It's TankX for all tracket physx vehicles.

#

There is BIS_fnc_itemType where BI decides arbitrarily what a machine gun is and what a sniper rifle is etc. Maybe they have the same for vehicles?

#

nameSound is the entry that decides how AI calls a vehicle.

#

veh_vehicle_APC_s

little eagle
#

Btw, that parachute problem... How fast does the parachute move compared to the wind?

#

And how fast does it drop?

#

If you can figure that out then the solution should be:
P(-vx/vd*h, -vy/vd*h, h)
vd is the velocity of a dropping parachute. Should be constant in Arma, but idk the value.
vf is parachutes horizontal speed

This assumes that the plane isn't too fast (or the box carries over no momentum from the plane) and the wind isn't too fast, so the acceleration phase of the chute in wind direction is quick.

#

I'm working on a complete solution (assuming airfriction works for parachutes correctly), but it's a dumb differential equation with e.

#

It is for real life, but Arma physics is demotivating.

#

I'm going with P(-vx/vd*h, -vy/vd*h, h) for now, but I'll test how much horizontal speed the chute picks up from the wind.

#

drop speed of the parachute.

#

It should be constant.

#

vertical speed

#

how fast it falls : P

little oxide
#

Anyone know if it's possible to see how Eden work for the movement of object

#

I can't achieve something smooth when moving object with cam like Eden

#

I think it's hardcoded in the engine, but if anyone have a solution , i'm open

tough abyss
#

Is there any way to reference scripts in the config.bin that are outside of the pbo?

#

That way I can work on the script without replacing them inside the pbo?

still forum
#

yes. If you mean outside of any PBO then you need to enable filePatching

tough abyss
#

So like, I can have a pbo with config.bin inside it. But the scripts are outside of the pbo just in the addons folder?

#

Because I see they are all referenced like /functions/whatever

#

/ seems to mean the root inside the pbo. Can I reference them outside of the pbo?

#

Oh wait, I might understand this filepatching thing. So basically with filepatching enabled, I can make a folder in my arma 3 directory like mod_namespace/functions/whatever.swf and it will override the script inside the pbo on mission start?

still forum
#

yes

#

/ is also Arma directory if file is not in pbo

#

so /myfile/file.sqf
would be either inside your pbo. Or Arma 3\myfile\file.sqf

#

yes

tough abyss
#

Amazing. So enable file patching and reference the files outside the pbo and I should be able to make a script change, restart the mission and see the changes.

#

That should save tons of time having to restart arma over and over.

#

Is the namespace inside of the %prefix% file?

still forum
#

maybe.. Don't know where you got the word "namespace" from and what that's supposed to mean

tough abyss
#

An addon has a prefix or a "namespace" from what I understand that is registered in the $PREFIX$ file

#

At least from my understanding

#

That way mod1 doesn't use the same namespace as mod2

#

Yeah inside the prefix file is the same name as the pbo I'm messing with

still forum
#

that's called pboprefix

tough abyss
#

namespace pboprefix tomato tomäto

still forum
#

It just is a path prefix to your file.
so if you have file.sqf in your pbo it will be <pboname>\file.sqf because if you don't have a prefix it will use the pboname by default.

#

if your prefix is z\ace and then your file.sqf will be at z\ace\file.sqf

tough abyss
#

Sweet

#

And does it only look in the arma root if it's not in the pbo? Or does it do it anyway if filepatching is enabled?

still forum
#

with filePatching enabled afaik it first checks outside

tough abyss
#

Dude, seriously thanks.

#

That's going to help me so much.

simple solstice
#

does isPlayer return false for null objects?

cyan pewter
#

Has anyone used the rhs scud missile script? Mine goes out with a rather underwhelming puff of smoke

midnight idol
#

Hello all sory for the noob question

i want to move players into a plane with a flag pole i tried everyting (noob mission maker)
now i know i have to use addaction
i named the plane cargo_1 and the flage pole pole_1

tough abyss
#

how do I quickly resolve the following rpt spam in basic.cfg?? 14:38:54 NetServer: trying to send too large non-guaranteed message (1360 bytes long, max 1348 allowed) 14:38:54 Message not sent - error 0, message ID = ffffffff, to 405059591 (Capt J. "Night" Howlett)

inner swallow
midnight idol
#

ty

rotund cypress
#

Hey guys, do you know if theres any possibility to open a link, like you could do with href in a structured text control, but just with a regular button?

#

That would be using a CT_StructuredText

#

Which I do not want to do

#

Of course it would work, it would use the control I am avoiding to use.

#

However, there wouldn't be any reason to use ctrlActivate

#

Well, sure that would work, but I want to avoid using CT_STRUCTUREDTEXT

#

No

#

Maybe that is what I have to do in the end, but i'd rather use a native way

agile pumice
#

can someone give me a hand with a sound script? I read that if I delete the object that a sound is attached to, the sound will stop playing, but that doesn't seem to be working for me: https://pastebin.com/raw/a4aPFDqN

#

when I play 4 sounds in a row, there's only 1 attached object, but all of the sounds are playing (so they're not deleting?)

real tartan
#

when you DELETE sound source (object) sound (your track) will stop

agile pumice
#

its detached and deleted

#

or supposed to be

peak plover
#

you can try moving it to [0,0,0] before deleting

agile pumice
#

nope, still not stopping the sound

peak plover
#

How did you create the sound? Try a different method

agile pumice
#
_soundObj setpos (position _vehicle);
_soundObj attachTo [_vehicle];```
#

just added the setpos

#

when I try the full parms for the playsound3d, I don't hear anything

#

playSound3D [_track, _soundObj, false, getpos _soundObj, 1, 1, 5];

real tartan
#

_soundObj ="Land_HelipadEmpty_F" createVehicle (position _vehicle); rewrite

#

_soundObj ="Land_HelipadEmpty_F" createVehicle [0,0,0];

#

_soundObject setPos (position _vehicle);

#

it is actually quicker to create object on [0,0,0] and setPos after than creating at exact position

agile pumice
#

alright, I'll try and remember that in the future

#

still no sound thugh

#

well I'd like to be in audio range of it

#

so I'd like it to follow the vehicle

#

the sound plays with just the [_track,_soundObj] parameters

#

but not the full paramters

inner swallow
#

playSound3D needs the full path to the file

#

did you try say3D?

#

You can also have a emply sound file and just play that

agile pumice
#

nvm I experimented witht he parameters

#

playSound3D ["ed4\ed4_sounds_a3\data\audio\radio\Track_1.wav", player, false, getpos player, 10, 1, 20];
worked

#

I know it needs the full path, my script accounts for that

inner swallow
#

okay

agile pumice
#

for some reason, 5m as the max distance didn't want to work

#

well, back to the original issue lol

#

movng it to [0,0,0] after detach doesn't seem to work

#

alright, so I'm doing this:
_radio = vehicle player getvariable "CurrentRadio"; deleteVehicle _radio; and its showing that the object becomes null, but the sound still plays

indigo snow
#

playSound3D is not linked to the alive state of the object at all

#

its wont even move along with the object, it just uses its' position

agile pumice
#

well that would explain the issue

indigo snow
#

according to killzonekids note, that is

agile pumice
#

what's the solution?

indigo snow
#

say3D?

agile pumice
#

thats probably it, thanks

#

I'll let you know how it works out

#

alright, it works

#

just kind of strange how low volume it is at 1 (with .wav extension)

#

does anyone know if .wav or .ogg makes a difference for volume values?

#

alright, I've got good parameters now, thanks for all the help!

rose hatch
#

What's an easy way to test if a player is the pilot / driver of a vehicle?

#

if (player == driver vehicle player) ... ?

little eagle
#

Boring question. Ask yourself what the most complicated one is.

daring pawn
#

I think a hilarious thing would be for bohemia to host a competition to do something really simple in the most complex way possible

little eagle
#

There never is a most complex thing without further restrictions.

daring pawn
#

I mean sure, with some rules like length doesn't necesarilly mean its more complex

digital hollow
#

It's probably possible to include every operator/function/command in making any given calculation.

cobalt ridge
#

Hey there im trying to make a hold convoy, then move when a trigger is activated by im having some difculties. any suugestionsÉ

peak plover
#

Hm

#

I just made that

cobalt ridge
#

i figured it out

peak plover
#

Ohh okay

cobalt ridge
#

i was over tinking it

peak plover
#

setconvoyseparation and limitspeed are cool for convoy

runic surge
#

One thing I figured out how to do for making convoys stay more uniform is have the vehicle in front of the very back one go 1km/hr less than it, and the one in front of that 1 less, and so on until you get to the front

#

using limitspeed

peak plover
#

Hmm

#

Cool workaround

#

I made the lead 2 vehciles separate group

#

And rest use (leader group_protect) doMove _pos;

#

This way, the lead vics have autocomboat disabled and keep going, and the transport will dismount and attack back when under fire

runic surge
#

you could also make the drivers be a separate group that is in careless mode until other friendly units detect a threat

#

though I don't know if that helps

#

I have never managed to get a convoy working 100% of the time