#arma3_scripting

1 messages · Page 507 of 1

delicate lotus
#

@mint kraken so I just tested the code with player as _source in the debug console watch field... and even though Im holding a pistol, which should be a handgun? it is returning false

mint kraken
#

Any handgun/pistol, shouldnt matter what handgun..

delicate lotus
#

well it apparently does not work with Rifles nor pistols either

mint kraken
#

hmm

delicate lotus
#

Im not sure if "Handgun" is what you need

mint kraken
#

try HandGun

delicate lotus
#

With HandGun you mean Pistols, right?

mint kraken
#

yes

delicate lotus
#

well there is no Handgun Class

#

Pistols inherit from Pistol_Base_F, Pistol, PistolCore and Default

#

so I guess we gotta use Pistol or Pistol_Base_F instead

#

and it works with "Pistol"

mint kraken
#

oh

delicate lotus
#

well I just looked in the ingame config browers at the hguns

#

and its only Parents are the ones I listed

#

though there is a HandGunBase

#

but that one is not inherited so...

#

¯_(ツ)_/¯

mint kraken
#

so What should I use? lol

delicate lotus
#

"Pistol"

#

(currentWeapon _source) isKindOf ["Pistol", configFile >> "CfgWeapons"]

mint kraken
#

Thanks!

delicate lotus
#

^^

mint kraken
#

And also is there a way to disable votekick and voteadmin?

#

I tried allowedVoteCmds[] = {}; in description.ext but one of my admins reported that it didn't work and they could still votekick

delicate lotus
#

hmmm

winter rose
#

@mint kraken shouldn't it be in the server.cfg by all means?

mint kraken
#

Oh yeh

#

thanks!

tough abyss
#

@mint kraken currentWeapon _source == handgunWeapon _source no?

mint kraken
#

I thought about that afterwards, Which one is efficient/fastest though?

grizzled spindle
#

Quick question... If I create a function like anexamplefunc = {}; Can that only be accessed in the file that declares the func or is it global?

tough abyss
#

Erm, test it with code performance button in debug console?

peak plover
#

global

grizzled spindle
#

Thanks

peak plover
#

if you want it to be local to the scope or script or whatever then you can just name it

private _myFnc = {};```
#

variable name starts with _

grizzled spindle
#

Sweet thanks

#

would having multiple functions global affect performance?

tough abyss
#

there are thousands of global functions in Arma 3 framework already adding a few more wont make any difference

grizzled spindle
#

Okay thank you

vernal mural
#

Is there a way to check if the player has the rebreather mask set on his face ? It is automatically set, and I initially thought it was triggered when surfaceIsWater switch to true. But I was wrong : if you stand on an object above water, surfaceIsWater return true whereas the rebreather mask is not visible. And the underwater command is not right either : the mask is visible way before the underwater command says true

delicate lotus
#

Im not sure. But you could do a workaround with checking the z-value of getPosASL (ASL = Above Sea Level).
Check at which value it is visible and then you can just check if the player is at that height or below and then do whatever you wanna do

vernal mural
#

oh you think it is linked to the altitude of the player above water. Good idea, it might be true. Indeed, when you are just above water, let's say standing on a very low bridge, when the wave is low the mask does not appear, whereas when the wave rises, the mask sets itself briefly. So it might be ASLW more than ASL, but definitely related

#

It seems that mask is appearing when Z value of ASLW position is below 0.5. This does not looks like a random value to me !

cold pebble
#

Anyone know if the playableUnits command returns units in a specific way e.g who joined first?

vernal mural
#

If I remember well, the array is in the order of placement in the editor. But do not take this sentence as an eternal truth. I had a similar question a while ago, and I think I ended up with this answer. Worth a check.

tough abyss
#

Hello, I am currently starting the sqf but I have no idea of ​​small script easy to do, you have any idea?

still forum
#

@tough abyss beware of #rules 😉 You just violated rule 9

tough abyss
#

I'm sorry 😃

tough abyss
#

@tough abyss hint "Hello World"; this should get you started

bronze pewter
#

It's fairly easy to pick up, but if you're coming from another language, get ready to be absolutely destroyed by syntaxial differences that look right to you.

#

I may or may not have fought missing a "then" after an if statement for 30 minutes when i first wrote some sqf. Looked right to my C#,CG,java,and js brain

tough abyss
#

It isn't an elegant language, nor a particular expressive one.

tough abyss
#

Can someone teach me how to add scripts to missions/scenarios

#

I'm having alot of trouble trying to get it to work

still forum
#

@tough abyss #rules number 9. Please choose one channel

tough abyss
#

Sorry my bad

#

I've been trying to install an auto-medic mod on a mission but it doesn't seem to be working

still forum
#

does the mod have any explanation on how to isntall it?

#

you probably want to call something in your init.sqf

tough abyss
#

"Installation / Usage:

This line should go to the init field of the medic unit.

_null = [<unit>,<side>,<hq marker(optional)>] execVM "Medic.sqf";
Medic will heal all nearby units:
_null = [This,"All"] execVM "Medic.sqf";
Medic will heal only west side and create a medical outpost marker:
_null = [This,"West","HQ_Marker"] execVM "Medic.sqf";
Remark:
Be gentle with the '_maxSearchUnitDistance' and '_maxSearchVehDistance' variables,
greater then ~1000 is costly for your game performance."

#

That's all it says

still forum
#

Okey. You don't know what init field is?

tough abyss
#

Yes

still forum
#

Double click a unit in 3DEN or go to it's attributes

#

there is a big script text box that should say init script

tough abyss
#

I ended up getting an error

still forum
#

what might that mysterious error be

tough abyss
#

"Generic error in expression"

#

This is breaking my already fragile brain

still forum
#

there is more to that error than that

tough abyss
#

"Invalid number in expression"

still forum
#

what did you copy paste

tough abyss
#

_null = [<unit>,<side>,<hq marker(optional)>] execVM "Medic.sqf";

still forum
#

yeah that's invalid

#

that's telling you "put a unit here" "put a side here"

#

You need to fill it out

tough abyss
#

Oh wow

still forum
#

Or use one of the other examples that are already filled out

tough abyss
#

I can't find an example, so could you give me one? I'm trying to place this on a NATO medic.

still forum
#

You just sent it to me

#

two lines below the lines that you copy-pasted

tough abyss
#

Oh okay

#

@still forum thank you dude my dumbass was struggling with this all afternoon

vapid drift
#

Is there a way to lengthen the amount of time BIS_fnc_typeText is displayed? There's no reference to duration on the wiki page

winter rose
#

Then there is none, unfortunately

vapid drift
#

@winter rose kind of janky but adding blocks of empty text seem to prolong the display. Guess that'll do

winter rose
#

that's the way!

vapid drift
#

lol thanks, I'll take a look

tough abyss
#

Hey so can someone explain to me what's invalid about this line of script

#

dummy = [this, units (group player)] execVM "scripts\automedic.sqf";

still forum
#

the parenthesis are not needed

#

don't see anything wrong

#

the dummy is nonsense but doesn't break it ¯_(ツ)_/¯

stable quest
#

For new years, I want to allow the TOCC to have drone and helmet cam and satellite feeds, how can I do this without using another mod?

#

@vapid drift thats because it reads the text like HTML

lean aurora
#

I wanna how to make the car script or anything

#

any one can teach me..?

astral dawn
#

It depends on whether you have done programming before or not

devout stag
#

@lean aurora could you be more specific?

peak plover
#

ahh yes, the car script

ruby breach
#

You know, the car script, man

shy wharf
#

couldn't you just port it over from the tank script?

mint kraken
#

quick question, should I replace all BIS_fnc_param to param or params? Or it doesn't matter?

peak plover
#

param and params are different

#

Yes you should replace bis_fnc_param

winter rose
#

@mint kraken yes, yes and yes, ditch this func! 😉

mint kraken
#

Will do now, thanks! 😃

twin steppe
#

Hey guys. I'm trying to remove terrain objects from the map with HideObjectGlobal. I'm using helipads to mark where I want them to remove objects. _newObject = createVehicle ['Land_HelipadEmpty_F', [20599.4,20119.5,0.835995], [], 0, 'CAN_COLLIDE']; _newObject setPosWorld [20599.4,20119.5,52.7491]; [_newObject, [[8.89026e-006,1,0], [0,0,1]]] remoteExecCall ["setVectorDirAndUp", 0, _newObject]; _newObject enableSimulationGlobal true; [_newObject, { waitUntil {!isNull _this}; { _x hideObjectGlobal true } foreach (nearestTerrainObjects [_this,["HOUSE","BUILDING","FENCE","WALL","VIEW-TOWER"],50]); }] remoteExec ["spawn", -2];

#

Doesn't seem to work though, what am I doing wrong? Any help would be greatly appreciated.

empty wren
#

Why dont you just use the module in the eden editor? its way easier

mint kraken
#

^^

twin steppe
#

Yeah thing is this cant be made it in the editor, trying to remove it with the console.

#

making it into hideObject instead of HideObjectGlobal seemed to work

#

though that might cause issues later on...

empty wren
#

Anyone knows why the server skips waitUntil? publicLoadout = "empty"; ["DB_loadLoadout",[(getPlayerUID player),(clientOwner),(str playerSide)]] call CBA_fnc_serverEvent; waitUntil { !(publicLoadout isEqualTo "empty") }; the cba function makes the server fetch information from a database, the variable gets sent to the client later, the variable arrives the client my debug console says

#

the code after "waitUntil" gets executed instantly, the system is not waiting until the variable changed

#

the variable contains an array later, thats why i am using "isEqualTo" instead of "=="

winter rose
#

@empty wren why not [] and isEqualTo for example?
Also, you maybe don't need it to be a public variable?

empty wren
#

i already tried publicLoadout=[] and then isEqualTo, but it should work with both string and array

#

the serverside script that gets executed does _clientOwner publicVariableClient "publicLoadout"; so the variable should be public

#

if i type the code into the debug console everything is fine

winter rose
#

any error message?

empty wren
#

something with vehicle empty, wait a minute

#

i think because the variable is still "empty" and not an array, so player setUnitLoadout publicLoadout; doesnt work

winter rose
#

waitUntil isEqualType [] then?

empty wren
#

i can try this, but isEqualTo normally can compare strings and arrays

winter rose
#

yes, so I think the error is from somewhere else. did you activate -showScriptErrors flag?

empty wren
#

of course not

still forum
#

isEqualTo can compare everything

empty wren
#

hmm

#

i got other database scripts that fetch things like e.g. the rank and everythings works fine

#

the scripts work the same way

#

@winter rose 'Bad vehicle type empty' was the message

#

if i type publicLoadout into the debug console, the current value is [["SMG_05_F","","","",["30Rnd_9x21_Mag_SMG_02",30],[],""],[],["hgun_Pistol_01_F","","","",["10Rnd_9x21_Mag",10],[],""],["U_B_GEN_Commander_F",[["30Rnd_9x21_Mag_SMG_02",3,30]]],["V_TacVest_gen_F",[["ACE_fieldDressing",3],["ACE_packingBandage",3],["ACE_morphine",3],["ACE_tourniquet",3],["30Rnd_9x21_Mag_SMG_02",7,30],["10Rnd_9x21_Mag",1,10]]],[],"H_Beret_gen_F","G_Aviator",["Binocular","","","",[],[],""],["ItemMap","ItemGPS","tf_anprc152_2","ItemCompass","ItemWatch",""]]

#

so the client tries to apply the loadout which is still the "empty"-string , and after that the server gets the information from the database

#

i even added globalChat / remoteExec globalChat after every command too see what gets executed, first the whole client script gets executed, then the severside script gets executed, or the remoteExec has a delay

winter rose
#

try to systemChat before the set loadout , and if it works then the issue is somewhere else

empty wren
#

sleep 2; doesnt work too btw

#

added systemChat not globalChat

still forum
#

'Bad vehicle type empty' was the message
Did you try to createVehicle that?

#

your variable is missing it's tag

#

all global variables should have tags. Otherwise you randomly overwrite the variables from other retards who also don't have a tag

#

marcel_publicLoadout or something like that

empty wren
#

the server has publicVariable and overrides the variable on my client but not on every client (_clientOwner publicVariableClient "publicLoadout")

#

its not necessary

still forum
#

And you are 100% sure your client will never run badly written scripts?

empty wren
#

the other scripts work perfectly

still forum
#

I don't see the difference tbh. Still broken. One client vs all clients isn't that much of a difference

empty wren
#

i dont understand what you mean, the variable on the server has the value of the last query, the the variable gets send to my client, and if another player uses the DB, the server gets the equipment from the database and send it to the other player

#

and the variable DB_arbeitet (database is currently working) makes that i dont get you gear if the both trigger the query at the same time

still forum
#

another mod or script might use the same variable name

#

"publicLoadout"

#

and you are breaking it

#

And 'Bad vehicle type empty' tells me that might be happening

empty wren
#

the variable is only used for that one DB equipment script

#

you mean that i just should rename that variable

#

?

still forum
#

yes

#

And yes I know that YOU only use it for that

#

but you cannot know about ALL other scripts or mods that anyone might use

#

That's why every global variable needs to have a tag

empty wren
#

DB_publicLoadout = "asdf"; then that happened bad vehicle type asdf

still forum
#

what are you doing with that variable?

empty wren
#

giving it a random value, that is not important, could also say DB_publicLoadout = 0;

#

waitUntil { DB_publicLoadout isEqualType [] }; still doesnt work

#

it just skips waitUntil thats the only problem

#

the script get executed via scroll menu (addAction)

tough abyss
#

Are you fetching loadout array from database and then sending it to client? Don’t do this, equip player from the server

empty wren
#

@tough abyss why? i want that you can save your customized gear normally there is no problem with that

tough abyss
#

Because sending arrays over network is not good

empty wren
#

the loadout array is saved in the variable that works perfectly but the system doesnt wait with player setUnitLoadout publicLoadout; until the string is an array

tough abyss
#

Then ppl complain why there is desync

still forum
#

it just skips waitUntil thats the only problem unscheduled?

empty wren
#

yes

still forum
#

you can't suspend in unscheduled

#

your RPT should be telling you that

#

or showScriptErrors too

tough abyss
#

RPT? What is that 😂

still forum
#

You can use CBA. Or a public variable eventhandler instead

empty wren
#

so i just use []execVM instead of []exec so it should work?

still forum
#

exec ?

#

wat

languid tundra
#

lol

still forum
#

exec is for SQS scripts

empty wren
#

wut? i always execute scripts like []execVM "someFile.sqf";

still forum
#

yeah. execVM is correct

#

unless you use that to execute the same script multiple times

#

then you should use CfgFunctions. To not load,preprocess,compile the script file before every execution

empty wren
#

yeah i currently see that in the wiki

tough abyss
#

Some part of that process is cached @still forum

still forum
#

the compiling yes

#

doesn't really matter tho

#

you are constantly redoing stuff. Even though you could just do it once and store it

#

Caching in the engine doesn't make that less dumb

#

@empty wren so did you use execVM here or exec?

#

execVM is scheduled

tough abyss
#

I wonder if it caches based on the file name

still forum
#

no

#

it caches on the hash of the text post preprocessing

empty wren
#

i tried execVM again, I changed to exec after it didnt worked

still forum
#

And for all CBA based mods. preproc takes way longer than compile. But with a CBA based mod you are using proper PREP or CfgFunctions anyway.

empty wren
#

but now everything is working, thank you all

tough abyss
#

Exec is for sqs code

empty wren
#

yeah it works perfectly like it should, thank you

winter rose
#

👍

tough abyss
#

Sqs doesn’t have waitUntil

winter rose
#

it has @ , hehe, "old times"

tough abyss
#

@still forum does it use the whole file content to make a hash or only part of it?

still forum
#

whole

#

only using a part is impossible

#

as you wouldn't detect changes in the other part, causing wrong results

tough abyss
#

True but this means big files will take longer too look up?

still forum
#

yeah

#

depends on CPU cache and ram speed. Shouldn't make that much of a difference if it fits into cache, and windows doesn't suspend the thread (which it probably does unless you have priority set to realtime and a exclusive cpu core for main thread)

tough abyss
#

So basically if you need to load file it better contains only a few lines calling compiled function

still forum
#

optimally you'd only load any file once and use CfgFunctions

tough abyss
#

Yeah but some shit like particle scripts you have no choice

still forum
#

Or something very fancy like "load and compile on first call, and then store in variable after that"

fleet hazel
#

Hi guys. How can I make my camera look at the player a little to the right?

young current
#

like over the shoulder?

#

reliably you cant

fleet hazel
#

In view mode from 3rd shift the camera to the right

young current
#

there is an addon that does it I think but what I remember it did not work in all situations

#

on thread was on BIforums

#

no "easyway" to do it though

fleet hazel
#

And you do not remember the name of the addon?

young current
#

no, just remember reading there was one

#

on the addons discussion section

fleet hazel
#

@young current Thanks

drifting island
#

got something simple here

#

can AI access virtual arsenal

prime horizon
#

Hello guys i making an admin menu and i need help i do not know how to make the lbAdd can any one helps me please this my RscListbox

            {
               idc = 1500;
                x = -0.2;
                y = 0.22;
                w = 0.3375;
                h = 0.64;
            };```
still forum
#

@drifting island yes

#

but they cannot open the UI, or click buttons

#

so...

drifting island
#

how do u do it

still forum
#

You can make them use the action I guess

#

but it's useless

drifting island
#

i did that but is there a way to make it eaiser

still forum
#

can execute the script from the action directly

#

though.. not sure if that even works

#

what are you trying to do?

drifting island
#

iam trying to have an option to customize npc loadouts

still forum
#

you can just open Arsenal for yourself and change the center I think

#

Not trivial though

drifting island
#

so how do you change the center

#

i am iffy with editing

still forum
#

It's some variable in the arsenal script

#

Don't have the script handy right now

prime horizon
#

Hello guys i making an admin menu and i need help i do not know how to make the lbAdd can any one helps me please this my RscListbox
class Rsc_list: RscListbox { idc = 1500; x = -0.2; y = 0.22; w = 0.3375; h = 0.64; };

still forum
#

@prime horizon what is that spam supposed to help?

#

Just made me want to help you less now.

tough abyss
#

@prime horizon add onLoad EH and populate from there

prime horizon
#
            {
               idc = 1500;
                x = -0.2;
                y = 0.22;
                w = 0.3375;
                h = 0.64;
               onLoad  = 
            };```
#

you mean like this ?

#

@tough abyss

prime horizon
#

its god now?

tough abyss
#

onLoad = "_this spawn David_David";

#

its god now?I doubt

prime horizon
#

can you talk to me in private message

tough abyss
#

PM disabled sorry

prime horizon
#

i make this step then what i want to add the text's in the list

#

?

tough abyss
#

whatever you want

prime horizon
#

i want to add lbAdd

#

on the list

tough abyss
#

then add. Sorry gotta go

prime horizon
#

k

#

thanks

#

any one can help please ?

#

?

young current
#

Dont be needy. If someone knows how to help you they see your questions already and will answer when they are online.

prime horizon
#

@young current and why you are sad?

#

because i put only 1 letter

young current
#

Just an advice how to behave on this server.

still forum
#

For example. I could help now. But I simply won't because of the spam and pushing.
You're not making friends with that behaviour.

prime horizon
#

this when i write that i need help but you was writing with your friend so my request been up then you say spam

still forum
#

because spamming a screenshot of a copy-pasted text is better than copy-pasting the text again 🤦

prime horizon
#

do you want to cry because i write my request again ?

fleet hazel
#

I can't find a way to make the camera shift to the right when the 3rd is active.

young current
#

it is not possible by default @fleet hazel . only way is to script a second custom camera like the mod I told you about earlier

tough abyss
#

guys can someone tell me the status of a sqf file?

#

please

winter rose
#

it's fine, it weighs 3 kilo, you are now the happy father of a healthy sqf file!

tough abyss
#

it's because I do not know how to send sqf files here

winter rose
#

normal, you can't

#

copy-paste it on some website and put the link here

tough abyss
#

ok

young current
#

pastebin for example

still forum
#

look at how while is to be used

#

also = set's a variable

#

also you cannot define a variable with the same name as a command. Like you are trying to do with sleep there

winter rose
#

wait, you can !wiki -command-?

still forum
#

Yes. I can. You can't

winter rose
#

muh :' (

still forum
#

Secret sauce 😄

winter rose
#

something baaaaaad

#

@tough abyss

while { map > 20 } do
{
   (…)
};
#

and use Allman's indentation, medammit

tough abyss
#

ok

winter rose
#

also, then { (…) } , not parenthesis

tough abyss
#

ok, now that the command line work

peak plover
#

🤢

tough abyss
#

how do I execute this loop, if I have nothing to be > 20

winter rose
#

…do you have any idea about what you want to achieve?

peak plover
#

This does not work

#

nononononoooo

tough abyss
#

give map to ai units

peak plover
#

use cba

lost copper
#

@tough abyss Do you want to add only 20 maps for units?

tough abyss
#

no

#

at least to a army of 40 tanks

#

with 3 crewman

#

in each

#

120 times

peak plover
#

You only want this to happen once?

tough abyss
#

no

lost copper
#

so you have 120 ai units. What you want to do with them?

winter rose
#

wait , stop. Konoha, say precisely and in one sentence what you want to do.

sturdy sage
#

I send him over here, he has a little trouble explaining in english. What he wants to do is edit units that are dynamically spawned in (via module of the arma commander mod) so that they always have maps after they spawned.

tough abyss
#

^^^^

lost copper
#

Do you use a script, that spawns units for you? Or you mean units, that spawned by Zeus?

sturdy sage
#

It's a module of a mod that is kind of a mission framework. You pretty much just place down a few modules to make it work. If what you want do is edit the script that spawns them in, i don't think that is possible without changing files of the arma commander mod itself. So he probably has to do it after spawning the units.

peak plover
#

@sturdy sage using CBA?

sturdy sage
#

Nope

#

But i guess he could use CBA if it makes it easier.

tough abyss
#

ok. how do I use CBA for this. And what does it do?

still forum
#
["CAManBase", "Init", {
    _this addItem "ItemMap";
    _this assignItem "ItemMap"
}, true, [], true] call CBA_fnc_addClassEventHandler;
peak plover
#

easy as that ☝🏻

still forum
#

Don't know what your "while" and "map=" were supposed to be doing

tough abyss
#

so where do I write it?

still forum
#

init.sqf I guess?

tough abyss
#

ok

#

i got a black&white error text

#

Is something before it?

still forum
#

Ah.

#

the famous "error"

#

aka (tell me the actual error or I cannot help you at all because just guessing one of the dozens of possible errors isn't useful)

tough abyss
#

I'll upload a screenshot on imgur

waxen tendon
#

how to set target for destroy wp?

tough abyss
still forum
#

I was looking at that command a week ago. Gimme a minute to find it

waxen tendon
#

Thanks!

peak plover
#

isn't _this an array? 🤔

still forum
#

oops sorry
Apparently it is

["CAManBase", "Init", {
    params ["_unit"];
    _unit addItem "ItemMap";
    _unit assignItem "ItemMap"
}, true, [], true] call CBA_fnc_addClassEventHandler;
#

The cba wiki page could use a little more clearness on what is actually _this

peak plover
#

yea

tough abyss
#

IT WORKS

#

THANK YOU SO MUCH,

#

omg I've been looking to a way to fix it

#

and there it is

#

I'll put your names on my mission

sturdy sage
#

I should really start learning arma 3 scripting, i always just edit scripts a bit to make them fit my needs or trial and error. It would probably be easier to just learn things myself and stop wasting time like that. And i could help people with this kind of stuff.

young current
#

it does open up new possibilites to do stuff in Arma

tough abyss
#

A bit too late to start now when the game is on its last leg, no?

sturdy sage
#

How is it on its last leg?

tough abyss
#

Look at the change logs, used to be every day, now almost once a month, what does it tell you?

still forum
#

dev branch builds only every second week. Development has been turned down alot. Most devs moved to other projects.
Declared end of life phase.

young current
#

pff

languid tundra
#

Don't expect Arma 4 too soon 😄

delicate lotus
#

The game is basically done, thats why many people of the dev team have been moved

#

done = all DLC's made by BI done

still forum
#

But if you don't know programming at all. Then do it. It will help you learn other languages. Or learn other languages first, and then SQF

delicate lotus
#

Now is one of the best times to start scripting since most stuff wont change I guess

tough abyss
#

That’s a good point

sturdy sage
#

I know the basics. I can read and understand most scripts (which is why i can edit them to fit my needs).

#

I played arma 2 back in the day, before dayZ and back then the game was still alive and active even though it wasn't a "blockbuster" title.

#

And as long as i see the community active, making stuff and playing the game the game is very much alive for me.

waxen tendon
#

hey its me again

#

19:26, 7 November 2018‎ killzone_kid (talk | contribs)‎ . . (2,642 bytes) (+10)‎ . . (attaches vehicle to waypoint not other way round)

#

waypointAttachVehicle attaches the vehicle to the waypoint

#

not the waypoint to the vehicle

#

i need to set the target for the waypoint

still forum
#

yes...

#

exactly.

#

Attach vehicle to waypoint.
sets waypoints target to vehicle

#

you want to attach the vehicle to the waypoint

waxen tendon
#

i.e wp1 waypointAttachVehicle target; should work

still forum
#

ye

#

that's how it works for GET IN too

waxen tendon
#

thanks so much

prime horizon
#

@tough abyss can you help me please ?

tough abyss
#

@prime horizon Put this in debug console and execute ```sqf
_ctrl = finddisplay 46 ctrlCreate ["RscListBox", -2]; _ctrl lbAdd "Line 1"; _ctrl lbAdd "Line 2"; _ctrl lbAdd "Line 3";

or if you want to put this in David_David:

```sqf
David_David = {disableSerialization; params ["_ctrl"]; _ctrl lbAdd "Line 1"; _ctrl lbAdd "Line 2"; _ctrl lbAdd "Line 3";};
#

Or just add this onLoad to your control

onLoad = "_this select 0 lbAdd ""Line 1""; _this select 0 lbAdd ""Line 2""; _this select 0 lbAdd ""Line 3""";
#

Also try to find yourself a GUI tutorial as you seem to be lacking quite a lot of basics

grizzled spindle
#

Bit of a weird question here but here goes... (probably stupid question) If I spawn a function and then inside that function i make a call will the call be in a scheduled or unscheduled environment?

tough abyss
#

Scheduled

grizzled spindle
#

Okay very instesting, Meaning I can sleep etc inside of this call?

tough abyss
#

You can always check if you can use sleep with canSuspend command

#

But yes you will be able to sleep in that call

grizzled spindle
#

Awesome, thank you very much. Its basically so i can make a kinda callback from mission to server

sly gorge
#

does anyone have a script for resetting the ai when it gets stuck? I know dynamic recon ops has one, it resets the ai and teleports them 10 metres away

mortal nacelle
#

how would i display how many vehicles that got counted within 'nearestObjects'

#

because i think im doing it wrong

#
    _count = nearestObjects [player, ["Car"], 10];
    if (_count >= 1) then {
        hint ["Vehicle found!"];
    } else {
        hint ["No vehicles found"];
    };
};
#

am i ment to use count nearestObjects there?

#

Okay, I fixed it. Nevermind..

#
private["_count"];
    _count = count nearestObjects [player, ["Car"], 10];
    if (_count >= 1) then {
        hint format["Vehicle found! %1",_count];
    } else {
        hint format["No vehicles found! %1",_count];
    };
};

call LJ_Garage;```
leaden summit
#

Ok what stupid mistake am I making? I have the following in my baseGuard init

this setCombatMode "BLUE";
this addeventhandler ["FiredNear", {(_this select 0) execVM "scripts\baseGuards.sqf"}];```
and the the script is simply 
```sqf
private["_unit", "_enemy"];

_unit = _this select 0;
_enemy = _this select 1;

if (_unit = _enemy) exitwith {};

_unit setCombatMode "RED";
_unit suppressFor 5;
sleep 2;

_unit setCombatMode "BLUE";```

But my guard never fires
#

I'm basically trying to make it so my base guards only ever return fire, never instigate combat

spice axle
leaden summit
#

Doesn't work

#

As soon as they see the enemy they let rip

spice axle
leaden summit
spice axle
#

no, 'cause suppressive fire only works if the unit is at the moment in cover. A guard (maybe sitting outside) is probably not in cover

leaden summit
#

The wiki link you posted says they should fire when ordered

spice axle
#

read the sentence i wrote

#

Can you try this one pls
params ["_unit", "_enemy"];
_unit fireAtTarget [_enemy, currentWeapon _unit];

leaden summit
#

Yeah it says when ordered OR when current unit poosition is suitable

spice axle
#

ah delete that

#

try this one

params ["_unit", "_enemy"];
_unit doFire _enemy;
leaden summit
#

Even if I comment out that suppression line and just setCombatMode "RED" the guard just tracks the enemy but never fires

spice axle
#

did you try my code?

leaden summit
#

Yeah, no different. I'm just going to test with the guard out in the open rather than this bunker

spice axle
#

i tried this and it worked for me

leaden summit
#

I think I know what I hadn't even stopped to think about

#

The guard is in a turret so technically in a vehicle

#

the eventhandler wasn't even triggering

spice axle
#

...

#

then do the thing that i wrote before

#
params ["_unit", "_enemy"];
private _vehicle = vehicle _unit;
_vehicle fireAtTarget [_enemy, currentWeapon _vehicle];
leaden summit
#

Thanks, I think I've got it sorted now, stupid mistakes 🤦

spice axle
#

It worked for me

leaden summit
#

Yeah thanks, like I say, just the dumb mistake of not remembering turrets = vehicles

spice axle
#

just a question. Why do you go for a execVM. You can set the script as a function or even write the script in the eventhandler.

leaden summit
#

Honestly just bad habit, I will probably just add it to the EH

spice axle
#
this addEventHandler ["FiredNear", {
    params ["_unit", "", "", "", "", "", "", "_gunner"];
    if (_unit isEqualTo _gunner) exitwith {};
    private _vehicle = vehicle _unit;
    _vehicle fireAtTarget [_gunner, currentWeapon _vehicle];
}];
#

Using the gunner would be more useful^^

leaden summit
#

Yeah I do want them to go back to combatmode blue after as well so they don't engage on their own. Thanks you've put me on the right path now 😃

tough abyss
#

if (_unit = _enemy)... dude, assignment = is not comparison ==

still forum
#

How can I fire a "submit" event on a RscEdit text box?
Will a onKeyUp eventhandler fire on Enter key? Is there a easier way?

tough abyss
#

Why key up and not key down?

still forum
#

because I want the action to happen when the human completed his undertaking

tough abyss
#

Are you talking about ctrlActivate?

#

As non human undertaking?

still forum
#

nope just want to apply when pressing enter. no care bout human

tough abyss
#

Not familiar with TFAR but still wondering why key up is a human thing to do and key down isn’t

still forum
#

both are things humans do

#

but when they press down. they are starting a action. When the key goes back up, they finished that action

#

I want things to happen when they completed an action (pressing a button) not when they are about to do it

tough abyss
#

Well there is a reason why click activates on mouse up but console enter normally activates on key down, not sure where you go with that, can you activate it on key up instead? Honestly never tried

still forum
#

I wanna be special okey?!

#

I wanted to try out if keyUp works.. But turns out Arma is too dumb to load the config. And I apparently broke armake.. soo.. I'm fixing that now first. See ya in an hour

still forum
#

I mixed up two variables. I hate dis. I want cookies. Someone gimme cookies.

radiant needle
#

Why am I still getting results like 37.2 when using toFixed 2?

#

Shouldn't it make it 37.20

tough abyss
#

Do you have example?

still forum
#

_number toFixed 2
or
toFixed 2
str _number
?

radiant needle
#

parseNumber(_Number toFixed 2)

#

is the parseNumber truncating it?

tough abyss
#

Oh dear

still forum
#

parse number parses a number and returns a number

#

it will be a number

#

numbers don't have useless 0's.. cuz.. that's how numbers work

#

don't know how to really explain that

tough abyss
#

You want string representation to have 0 yet you convert it back to number? Numbers don’t care about trailing 0s in fractional part it makes no difference to the math

radiant needle
#

Yeah I just had an if condition that required _number but then I have a hint which displays the number

#

I just moved the parseNumber to the if condition itself, and kept it as a string for the hint

still forum
#

if you want to display the number with a specific number of conditionals.. use toFixed

#

that's what it's for

#

decimals* not conditionals

tough abyss
#

So really the question was why do I get 37.2 when I use parseNumber on "37.20"

radiant needle
#

Yeah it makes sense that it drops the 0, I just had to move the toFixed to the hint itself

tough abyss
#

A well formed question contains 99% of the answer

still forum
#

And here I am packing addons in debug mode and it takes ages. I just want to test that onKeyUp stuff

tough abyss
#

Why do you need to pack addon if you can just do it in debug console in 30 seconds?

still forum
#

cuz config EH stuff

#

I need it to work that way so I test that way right away

tough abyss
#

So what’s the verdict?

still forum
#

still waiting on it

radiant needle
#

When you benchmark the speed of a script, is the result the total time for all 10,000 iterations combined, or time per each

still forum
#

each

radiant needle
#

What's the best way to have a script only run every half second performance wise?

still forum
#

sleep

radiant needle
#

Just a while(true) with a sleep?

still forum
#

ye

#

just use scheduled with sleep

#

there are many other methods. Some might be better.. But you really should not jump into advanced stuff when you don't know what you are really doing

astral dawn
#

Depends on what you need to calculate, what's the nature of it. You might put it into an on each frame handler (not directly, but through one of CBA functions). Or you can do as Dedmen said but then your calculation can be torn apart by scheduler. Only you can tell how much it is important for you 🤷

exotic tinsel
#

i could use some help with my addaction condition. I have this in the condition attribute but its not working.

lifeState _target == ""INCAPACITATED""
astral dawn
#

Depends on how you define performance. Does higher performance mean less latency, or more throughput, or less impact on the game itself by your heavy load?

exotic tinsel
#

@chrome fiber "lifeState _target == 'INCAPACITATED'"??

still forum
#

You might put it into an on each frame handler That's the stuff I meant when I said "But you really should not jump into advanced stuff when you don't know what you are really doing"

tough abyss
#

For 0.5 sec execution I would use a trigger

radiant needle
#

Basically this is my script

[Beacon01,44.6] spawn {
params ["_Target", "_TargetFrequency"];
while {(currentWeapon player) == "ACE_VMM3"} do {
    If ((alive player) && (call TFAR_fnc_haveLRRadio)) then 
    {
        private _headingDifference = 180 - abs(180 - (player getRelDir _Target));
        private _distance = player distance _target;
        private _activeLRRadio = (call TFAR_fnc_activeLrRadio);
        private _sourceChannel = _activeLRRadio call TFAR_fnc_getLrChannel;
        private _sourceAltChannel = _activeLRRadio call TFAR_fnc_getAdditionalLrChannel;
        private _sourceSettings = _activeLRRadio call TFAR_fnc_getLrSettings;
        private _sourceChannelSettings = (_sourceSettings select 2);
        private _sourceFreq = parseNumber (_sourceChannelSettings select _sourceChannel);
        private _sourceAltFreq = if (_sourceAltChannel == -1) then {_sourceFreq} else {parseNumber (_sourceChannelSettings select _sourceAltChannel)};
        private _SourceAltFreq = If (_SourceAltChannel == -1) then {_SourceFreq} else {parseNumber ((_SourceSettings select 2) select _SourceAltChannel);};
            If (_targetFrequency in [_sourceFreq, _sourceAltFreq]) then 
            {
                _HeadingCoef = (0.75^(_HeadingDifference));
                _DistanceCoef = ((((log 20) * _Distance) + ((log 20) * 31.8)) / 200);
                _CombinedCoef = _DistanceCoef / _HeadingCoef;
                _Jitter = 1 - ((Random 200) - 100) / 16000;
                _SignalLevel = (37 - _CombinedCoef) * _Jitter;
                _SignalLevelPercent = ((_SignalLevel + 96.6) / 133.6) * 100;
                    If ((_SignalLevelPercent >= 1)) then 
                    {
                        hint format["Signal Strength: %1%2",(_SignalLevelPercent toFixed 2),"%"]
                    } 
                    else {hint "Signal Strength: 0.00%"};
            } 
            else {};
    };
Sleep 0.5;
};
};

*Edited to include your suggestions

#

I think the while do should suffice

still forum
#

I remember seeing that exact script before

#

and I also remember making a alot more optimized version of that and posting it here

#

that's not it

radiant needle
#

I think the one I posted before was just a small chunk of it, I've been tweaking it a bit interface wise

#

I think it was you who said something about the _HeadingDifference = 180 - abs(180 - abs(_SourceDir - _SourceDirTo)); though

still forum
open vigil
#

Hacked source code, EULA violations , Goodbye @chrome fiber

radiant needle
#

My direction thing actually gets the difference in direction, getRelDir gets the direction relative to the model. So if the target is 10 degrees anti-clockwise, my thing will return 10, getrelDir will return 350

tough abyss
#

You can just negate the result of reldir and be done with it. 350 will become -350 which is the same as 10

radiant needle
#

so just (player getRelDir _Target) * -1?

#

I don't think that'd work though

#

Because I raise a number to the power of the _headingdifference

#

If I was using it to later set a direction then I believe -350 would work fine

tough abyss
#

No just -(player getRelDir _target)

#

And I don’t understand raising number to the power bit, what you do _number ^ reldir?

#

For what purpose?

radiant needle
#

To simulate a highly directional antenna

#

The code is a few comments above

still forum
#

Fixed it! I can finally try out the onKeyUp

astral dawn
still forum
#

Just 3 hours or so.. Because a config entry that starts with a number cannot be a string right?
x = 0.5 * safezoneW; that's a number right? Totally not a string :U

radiant needle
#

@astral dawn I originally had it in dBm but apparently players found it too confusing

Although maybe if I tell them that 37dBm = Full strength and -96 dBm = barely any signal it'd help.

tough abyss
#

@still forum what happened?

still forum
#

So that thing is a unquoted string. in config. As you can see.
Armake has a check to prevent numbers being detected as unquoted string.

Such that x = 0.5; don't get stringified and throw a warning.

So the check sees 0.5 * safezoneW and says! Yeah! that's totally a number! it has some crap characters at the end, but I don't care. I can see the number, that's all I care about.
And armake like "yeah, dis a number. Okey, let's continue parsing this"
* safezoneW wat? WTF is dis? There should be a semicolon here..

#

Well Arma crashed when trying to grab the radio. Sooo.. That's a thing

delicate lotus
#

is it possible to use the BIS Revive system somehow with AI?

west venture
#

There's an option in a unit's attributes to enable this, yes.

#

The AI themselves will not revive anyone, however. They will just be revivable.

astral dawn
#

@radiant needle I'd convert your power to signal-to-noise ratio (in decibels) and display that... 🤔

#

What are you doing actually? Some jammer?

radiant needle
#

With that FRIIS formula, how does that work if the receiving antenna gain is 0?

astral dawn
#

How can gain be 0? Or do you mean zero decibels?

radiant needle
#

0 dbi

#

In that calculator you linked I put in 23w, 2, 0, 6.8, 1 and got the result of 40 dBm

#

but in my script where I tried to implement that, I'm just getting 0

#

this is my formula

_SignalLevel = (23 * 2 * 0 * (6.8^2)) / ((4 * 3.14159 * 1)^2);
astral dawn
#

Antenna gain has no dimension, IIRC it's a ratio of how much it's better than a omnidirectional antenna. So 0 dB means it's an omnidirectional antenna(no gain).

radiant needle
#

Yes, but why am I getting different result between my calculation, and the webiste

astral dawn
#

If you are doing your calculations in decibels entirely, you just sum them up

#

Let me have a look...

radiant needle
#

The formula they show, I assumed it was multiplication

astral dawn
#

Yes but you can convert everything to decibels and replace multiplications with sums

radiant needle
#

What units is their calculator using though

astral dawn
#

so... they use decibels for antenna gain

#

but you can't directly put db into the formula, you have to convert it into non-decibels first

#

and in the end you will get... not decibels as well, but just power (Watts)

radiant needle
#

Okay well here's the question then. Pt = 44dBm, Gt = 3 dBi, Gr = 8 dBi, λ = 6.8m, R = 1m

#

According to their calculator that should equal 49.67 dBm

astral dawn
#

Yes that's what it gives. You can't replicate it?

radiant needle
#

No

astral dawn
#

Wait a moment... let me unpack my matlab

#
>> Pt_dbm=44;
// Convert transmitted power from decibell-milliwatts to Watts
>> Pt_W=10^(Pt_dbm/10)/1000

Pt_W =

   25.1189

>> Gt_dB=3;
>> Gr_dB=8;
// Convert antenna gains from dB to plain ratios
>> Gt=10^(Gt_dB/10); // Returned 1.99
>> Gr=10^(Gr_dB/10); // Returned 6.3
>> Lambda_m=6.8;
>> R_m=1;

// Calculate received power in Watts
>> Pr=Pt_W*Gt*Gr*(Lambda_m^2)/((4*pi*R_m)^2)

Pr =
   92.5973

// Convert watts to dBm:
>> Pr_dbm = 10*log10(Pr)+30

Pr_dbm =

   49.6660
radiant needle
#

So what's that as a formula

astral dawn
#

... gives the power received by an antenna from another antenna that is transmitting a known amount of power at a distance under ideal conditions.
That's what it gives. And what do you need to simulate?

radiant needle
#

k, so

SignalLevel = 10 * (log (25*10^(3/10)*10^(8/10)*(6.8^2)/((4*3.14159*1)^2))) + 30;

seems to work

#

I'm basically trying to kind of simulate direction finding of a radio beacon

astral dawn
#

That's pretty cool. I guess you could omit the signal loss due to distance then? Or is it also important?

#

Having your radio 'beep' when you point it at the beacon would be enough I mean?

radiant needle
#

I think it's important, gives players a rough estimate of how far away a target is

#

Basically in this mission the foxhunters are dedicated roles, so figure add some "skill" of interpreting raw dBm values

astral dawn
#

Oh yeah then it is important 👍

radiant needle
#

Well this seems to be working

[44.6] spawn {
params ["_targetFrequency"];
while {true} do {
    If ((currentWeapon player) == "ACE_VMM3") then {
        If ((alive player) && (call TFAR_fnc_haveLRRadio)) then 
        {
            private _Target = Beacon01;
            private _headingDifference = 180 - abs(180 - (player getRelDir _Target));
            private _distance = player distance _target;
            private _activeLRRadio = (call TFAR_fnc_activeLrRadio);
            private _sourceChannel = _activeLRRadio call TFAR_fnc_getLrChannel;
            private _sourceAltChannel = _activeLRRadio call TFAR_fnc_getAdditionalLrChannel;
            private _sourceSettings = _activeLRRadio call TFAR_fnc_getLrSettings;
            private _sourceChannelSettings = (_sourceSettings select 2);
            private _sourceFreq = parseNumber (_sourceChannelSettings select _sourceChannel);
            private _sourceAltFreq = if (_sourceAltChannel == -1) then {_sourceFreq} else {parseNumber (_sourceChannelSettings select _sourceAltChannel)};
                If (_targetFrequency in [_sourceFreq, _sourceAltFreq]) then 
                {
                    _HeadingDifference = 180 - abs(180 - abs(player getRelDir _Target));
                    _Gain = 7 - _HeadingDifference;
                    _Jitter = 1 - ((Random 200) - 100) / 24000;
                    _SignalLevel = (10 * (log (25*10^(0/10)*10^(_Gain/10)*(6.8^2)/((4*3.14159*_Distance)^2))) + 30) * _Jitter;
                        If ((_SignalLevel >= -44)) then 
                        {
                            hint format["Signal Strength: %1 dBm",(_SignalLevel toFixed 2)];
                        } 
                        else {hint "Signal Strength: No Signal"};
                } 
                else {};
        };
    };
Sleep 0.5;
};
};
#

Added some of Dedmens tweaks

still forum
#

you got _SourceAltFreq duplicated

radiant needle
#

Fixed

tame axle
#

Hi This is my first post noon dischord, so please be patient. i have the following code which runs fine, '''....................{
_vehicles = ["Vehicle1","Vehicle2","Vehicle3","Vehicle4"];
{vehicle1 setpos [_a+((_foreachindex+1)*5+5),_b+((_foreachindex+1)*5+5),_c];}foreach _vehicles;
}....................'''

still forum
#

that runs fine?

#

it only moves a single vehicle.. 4 times

#

Doesn't seem logical to me.

tame axle
#

but this one does not

....................{
_vehicles = ["Vehicle1","Vehicle2","Vehicle3","Vehicle4"];
{_x setpos [_a+((_foreachindex+1)*5+5),_b+((_foreachindex+1)*5+5),_c];}foreach _vehicles;
}....................

I noticed that when i diag_log(_x) i get the elements with "" around them. Is this the issue?

#

yep, just used the first one to debug.

still forum
#

Yeah

#

you can't setpos a string

#

you probably want the object

#

aka take away the quotes

#

also you can use
```sqf
```
for proper syntax highlight replacing the dots thing you did there

tame axle
#

cheers for the quick response. This is great. (can't even do a CR here yet!).... So should i parse the qoutes out to get the object, or is there an easier way?

astral dawn
#

Are Vehicle1, Vehicle2, etc the names you have assigned in the editor?

still forum
#

or is there an easier way just.. not write down the quotes?

tame axle
#

they are the variable names I assigned to the objects in the mission editor..

astral dawn
#

Then you should do as Dedmen said

velvet merlin
#

is there some reliable way to check if an unit is on bridge?
or just some combination of surfaceIsWater, getPos-getPosATL-getPosASL relations or check for nearby model

tame axle
#

yeah the wood for the trees...... .

#

too used to coding with other languages. and strings.

astral dawn
#

You could do missionNamespace getVariable "Vehicle1" as well but there is no use for it because Vehicle1, Vehicle2, ... are already assigned when you create the array.

tame axle
#

cheers all, just going to try remove the qoutes from the array.

#

done and working. thanks

#
        ....................{
    _vehicles = [vehicle1,vehicle2,vehicle3,vehicle4];
    {_x setpos [_a+((_foreachindex+1)*5+5),_b+((_foreachindex+1)*5+5),_c];}foreach _vehicles;
    }....................
    ```
lost copper
#

@velvet merlin Is this question actual for you? (Maybe you try use lineIntersectsSurfaces)

lost iris
#

I have a server side function running every 5 mins to relocate an objective, this function changes a publicvariable that is then used by the client. Can I use addPublicVariableEventHandler client side to detect when the variable value changes and execute some code on the client side? not sure if i understand addPublicVariableEventHandler correctly

velvet merlin
#

@lost copper would still need some model whitelist, right?

lost copper
#

Yep. Bad variant for you, @velvet merlin ?

astral dawn
#

Could try something like this:
Get the road segment's position, _roadPos
Make a line going straight down from _roadPos
Check which objects it intersects with something like https://community.bistudio.com/wiki/lineIntersectsObjs
If there is anything besides the original road segment, it must be a bridge
Could do some more filtering by checking the types of found objects to exclude snakes, rabbits, long range radios lying on the road, humans, etc

cold pebble
#

@lost iris thats correct

velvet merlin
#

@lost copper something to avoid for compatibility reasons and such

mortal nacelle
#

How would I find what vehicle the player is choosing from the list to spawn it?

#
LJ_fnc_Adminvics = {
private["_control","_display","_selected"];
disableSerialization;
    createDialog "Dialog_AdminVeh";
    _display = findDisplay 69;
    _control = lbAdd [1500,"C_Offroad_01_repair_F"];
    _selected = lbCurSel _control;
    (_display displayCtrl 1600) buttonSetAction "_veh = _selected createVehicle position player;[_veh, true, true, true] call bis_fnc_initVehicle;";
};

[] call LJ_fnc_Adminvics```
copper raven
#

use format with lbText

mortal nacelle
#

I re-wrote it as it didn't make much sense, but its winging about how the _class is undefined

#

_class = configName _entry;

#

(_display displayCtrl 1600) buttonSetAction "_class createVehicle _pos";

tough abyss
#

ButtonSetAction creates a new scope which does not inherit anything from current scope, so yeah it will be undefined

mortal nacelle
#

_vehicle = lbText format[_class];

#

I'm doing this wrong

#

i dont quite understand how it works

tough abyss
#

_pos will be undefined too

mortal nacelle
#

So I have to define everything i want to use after button set action?

tough abyss
#

You can embed those values in the string you pass to buttonSetAction

#

...buttonSetAction format ["%1 createVehicle %2", str _class, _pos]...

#

Also the code it expects is SQS

mortal nacelle
#

Oh wow, that works perfectly. Thank you! It's somewhat working now, it only spawns one class though

#

is there another way for buttonsetaction?

#

I saw that on the wiki

tough abyss
#

So why not use onclick event handler instead

mortal nacelle
#

can you direct me in the way of the wiki for that? never seen it

#

Nevermind I found it

tough abyss
#

Don’t forget to drop "on" prefix when adding EH from script

forest ore
#

Case:
a trigger is "monitoring" sector owner changes and when the owner of the sector changes a marker gets 'placed' on the map only for the players on the side that captured the sector.

Currently I'm creating the needed markers for every player via initPlayerLocal.sqf and setting every marker's alpha to 0 to make them invisible at the mission start.
The trigger that does the sector monitoring turns eligible marker(s) visible only to the side that captured the sector via the trigger's On Activation field.
This works well enough but (who guessed it) not for JIP players.

Any suggestions how to make markers show up for JIP players with what I have now? Or some other way to achieve JIP compatible markers with this trigger that monitors sector owner changes?

tough abyss
#

@still forum Just checked, x = 0.5 * safezoneW; is definitely treated as a string by Arma parser

#

if the property has special meaning to the engine like if the x is part of control position, the expression will be converted to float otherwise it will be left as a string

astral tendon
#

Is there a way to get the current terraim map Cfg texture?

tough abyss
#

what do you mean?

astral tendon
#

Get the CFG of the map on current terrain im playing,.

tough abyss
#

Still not sure, you want ```sqf
configFile >> "CfgWorlds" >> worldName

astral tendon
#

the MAP like the one we press M to see

tough abyss
#

it is drawn as you open it, there is no texture. You can export it into the image though separately

winter rose
#

Type Shift + minus then TOPOGRAPHY to have a tiff created in the game's directory iirc

#

@astral tendon ?

astral tendon
#

Well, not atually what I need, nevermind.

winter rose
#

Well it's a control, not a texture

mortal nacelle
#

@tough abyss Could you help me out with this? I don't understand AddEventHandlers at all..

#

_vehClass = this addEventHandler ["ButtonClick",["%1 createVehicle %2", str _class,_pos]];

winter rose
#

@mortal nacelle second part should be code ({ }), not array ([ ])

mortal nacelle
#

Like this? _vehClass = this addEventHandler ["ButtonClick",{"%1 createVehicle %2", str _class,_pos}];

winter rose
#

Yes, but the inside code wouldn't work.

mortal nacelle
#

Yeah I figured that 😦

winter rose
#

Try { call compile format [(…)] }

#

No wait

#

(on mobile, so hard to type and to think properly)

mortal nacelle
#

It's okay

#

Take ur time

tough abyss
#

@mortal nacelle you forgot format

_vehClass = this ctrlAddEventHandler ["ButtonClick", format ["%1 createVehicle %2", str _class,_pos]];
#

but this wont work

#

it has to be assigned to control

#

unless this is control it will error

#

I am guessing you are putting it in init field

mortal nacelle
#

ok

#

one second

tough abyss
#

also you need ctrlAddEventHandler

#

not just addEventHandler

mortal nacelle
#

no its a function im just running in debug

#

its opening up a list box with all the vehicle class names

#

and im trying to spawn it by selecting one and then pressing the button

languid tundra
#

@forest ore
One way would be to only make the markers invisible that belong to deactivated triggers in the initPlayerLocal.sqf. Considering it's scheduled, you should probably put the code inside isNil {} to make it unscheduled to prevent a race condition between your check for a trigger's state and a change of a trigger's state.

worthy lintel
#

what coding language does arma use for scripting? (sorry for scrub question)

cosmic lichen
#

sqf

worthy lintel
#

is that related to c/c++?

cosmic lichen
#

It related to everything. It's a big mixture

worthy lintel
#

ah okay, thank you R3vo 😃

languid tundra
#

It does not have c/c++ static typed nature, so it's gonna be different.

cosmic lichen
#

I believe it uses syntax from java and c+ and also other languages. Probably depends on what the programmer preferred

young current
#

there are resources in Bi Wiki that explain how SQF works

cosmic lichen
#

Doesn anyone know a better tool than Tabler for working with stringtable.xml files?

languid tundra
#

RHS also provides a tool, but dunno how it compares.

cosmic lichen
#

It's nice, but it doesn't support chinese language

delicate lotus
#

Hey, how can I find out how big one of those grid squares on the map is?

#

I once saw that Insurgents has like red grid markers for every grid an insurgent is in

winter rose
#

@cosmic lichen I tried to make many, but I have yet to find a good UI actually 😕

cosmic lichen
#

You failed at the Ui?

languid tundra
#

@delicate lotus
Not sure what you want to get. The grids are clearly defined like 100m, 1km, ...

sly gorge
#

Anyone have a reset ai script?

delicate lotus
#

@languid tundra oh... well thats good

winter rose
#

@cosmic lichen I don't really know yet how to have a proper UI, should I have language side by side to remember what the original text is, or just a plain text box with two listboxes for entry / language, etc

#

I planned to go back to it but forgot and let it sleep in a corner of my drive

cosmic lichen
#

Do you have a working prototype?

#

It would be fine if it looks like an excel sheet.

#

But it should be sortable, and searchable. Grouping keys into containers would be nice too.

winter rose
#

I can still restart from scratch hahaha
Excel sheet, I wouldn't go this way as it would make many languages side by side

languid tundra
#

I recently had a look at Intercept. Its implementation is an incredible piece of art and shows yet again how powerful extensions can be.
However, I'm now wondering where does BI EULA draw the line when it comes to playing around with engine stuff with extensions?

cosmic lichen
#

If nothing is written there, there is probably no line to draw. Except for malicious stuff of course.

languid tundra
#

Yeah, malicious stuff and possible instability are about the only things that are warned about there.

#

Still the page discusses about the original intended way to use extensions only. Taking an approach like Intercept is a totally different entry point.

cosmic lichen
#

Maybe you should talk to @still forum he contributed to Intercept. He can probably tell you alot more about extensions and what you can and cannot do.

languid tundra
#

True

forest ore
#

@languid tundra
Thanks for the suggestion. A bit before your reply I was able to get the markers to show up and turn invisible when needed, also for JIP players. No idea how my "implementation" will work with more players than three but I guess that remains to be seen

queen cargo
#

fuck sake @cosmic lichen @winter rose
that Tabler tool looks and feels horrible Oo

#

just downloaded it quickly to give it a try

#

you have to create a bloody stringtable.xml first to make it work annoyed me already

winter rose
#

what? which one x)

languid tundra
#

At least someone put an effort to write such a tool^^

queen cargo
#

Tabler

cosmic lichen
#

It's probabably fine for a stringtable.xml with 3 entries, but for 4000 it's slow as fuck

queen cargo
#

pff @languid tundra
created like a shitton of tools already

winter rose
#

gimme UI , I have the whole backoffice ready

queen cargo
#

gimme few mins

#

literally

winter rose
#

ok, actually ^^

cosmic lichen
#

Please do it. I want a proper stringtable tool

#

And please make it remember and reopen the last edited one 😂

queen cargo
#

should be done in roughly 2 hours

#

if somebody provides me with the languages, i even can add a full selection of languages to it

winter rose
still forum
young current
#

you havent done anything naughty with it yet 😜

still forum
#

that's not that true

#

😄

languid tundra
#

How does it look on BE side? I somehow doubt you could ever get them to whitelist DLLs for a client side add-on that is using intercept.

winter rose
#

@still forum I dare, watching you in the eyes 👀

still forum
#

Didn't ask them yet

#

but the BE auto whitelisting should just let it through automatically if enough people try launching Arma with it

languid tundra
#

Didn't know there is such a thing.

still forum
#

They once auto whitelisted my debugger.. That was fun

queen cargo
#

haha ... no @still forum

#

it was not 😄

delicate lotus
#

Did I just read: stringtable.xml generator?

queen cargo
#

already kinda finished it

#

lacks a lil bit of polish

#

and features though

#

but only 2 hours of work

delicate lotus
#

looks nice

#

do you use an XML API or just string magic?

queen cargo
exotic tinsel
#

hey all im having an issue with a drag animation .

_player playActionNow "grabdrag";

works fine. but when i want to stop the animation this doenst work and the player stays stuck in drag animation.

_player playActionNow "stopdrag";
tough abyss
#

Is there an action called stopdrag?

languid tundra
#

try _player playMove "amovpknlmstpsraswrfldnon"

#

Btw. this reminds me that you should use forceWalk true when you use "grabdrag" for players. Otherwise they can't walk in certain cases.

exotic tinsel
#

thx @languid tundra

bronze pewter
#

@tough abyss there are no bipod animations listed so yea it's incomplete

tough abyss
#

Those are actions not animations though. What is missing?

bronze pewter
#

I know very little of what arma has so just disregard me i guess

winter rose
#

@bronze pewter

#

freshly baked

still forum
#

Btw that keyUp stuff turned out working exactly like I imagined.
Just took me like 4 hours of work yesterday and 8 hours today to get armake fixed so I could pack it and test it ¯_(ツ)_/¯

shadow sapphire
#

Would anyone know of a relatively simple way that I could have units dropped in by Zeus be re-geared with a gear function once they are dropped in?

digital hollow
#

Get the loadout export and modify it to work on curatorSelected # 0 # 0 @shadow sapphire

slim oyster
#

Can you return a module from inside a UI eventhandler from within its attributes >> controls?

#

I am trying to query a config value of another attribute inside the UI handler onLBSelChanged

#

can you query config values from a ctrlParentControlsGroup ctrlParentControlsGroup (_returnedCtrlCombo) group or do you need to use configfile >> 'cfgVehicles' >> _moduleName >> 'Attributes'?

vapid drift
#

Is there something I'm missing here? The conditional statement doesn't seem to be running properly. I wasn't sure if you could use format in that way or not.

        [_terminal,
            [
                "Enter Code",
                {
                    ["toggleDevice", [(_this select 3)]] execVM "activateNuke.sqf";
                    hint "You don't know the code to activate this device";
                    [(_this select 0),0] call BIS_fnc_dataTerminalAnimate;
                    sleep 8;
                    hint "";
                }, 
                _device,
                1.5,
                false,
                false,
                "",
                format["%1 && TFR_receivedCodes", _self]
            ]
        ] remoteExec ["addAction", 0, true];```
#

_self is defined previously

pale sundial
#

Hello, chaps. I wonder if any of you can help me with this? I'm trying to script an AI squad to get inside a helo when the player decides. It's more for my own practice than anything.

The AI squad is called "Splashdown" and the helo is called "chariot_Helo".

Now a normal get in waypoint placed in the editor makes the squad get into the helicopter, but I really want to try scripting this.

#

My current script is being run from a trigger, activated from Radio Alpha.

#

Inside the script is the following:

_waypoint0 = splashdown addWaypoint [getPos chariot_helo, 0];
_waypoint0 setWaypointType "GETIN NEAREST";

shadow sapphire
#

@digital hollow, thanks! Will try.

pale sundial
#

Now playing from the AI squad leader's position shows a GET IN NEAREST waypoint created for a split second and then nothing. Playing it from the helicopter pilot's position shows that the squad runs to a point some 10 meters away from the helicopter without getting in.

#

Any thoughts, gents?

high marsh
#

moveTo + waitUntil + moveInCargo

pale sundial
#

I'll give that a try now then. Cheers.

high marsh
#

🤔

pale sundial
#

"Generic error is expression." It's flagging it before "group splashdown;};"

#

There's got to be something obvious that I'm missing.

high marsh
#

splashdown is group leader

#

group returns group reference

#

units returns an array of units belonging to that group

pale sundial
#

So if I was to change it to "forEach group splashdown"...?

#

Nope...

#

Is there any reason that the "setWaypointType "GETIN"" method didn't work?

#

Or at least, any reason we can fathom?

#

Perhaps I should give some more background to the scenario I've created for myself:

I'm trying to do this via waypoints so I can apply them as required in the future.
The idea is that the player gets into the helo and then radios for a squad to get in as well. This allows me to have a foundation to script extactions with.
Once the player gets to a suitable location over water, they can release a sling loaded boat, Splashdown will then jump out of the helo, swim to the boat, and proceed on their own little mission.

#

So in an ideal situation, my solution would involve learning more about scripting waypoints.

tough abyss
#

Wouldn’t the waypoint with index 0 be default waypoint for a group? Don’t think overwriting it does any good

pale sundial
#

So you're suggesting I change it to _waypoint1 and refernce it as "[splashdown,WP1] setWaypointType "GETIN""?

tough abyss
pale sundial
#

Understood. I never realised that. I'll give that a shot now.

tough abyss
#

If editor placed wp works for you why not to look up its properties with script?

pale sundial
#

How would I go about that? I've not done that before.

tough abyss
#

With waypoint commands that get you waypoint properties?

pale sundial
#

Ok, so I've found "_wPosArray = waypoints splashdown" but how would I actually get that information?

tough abyss
#

Hint str waypoints splashdown;

pale sundial
#

I've only ever put information INTO the game via scripting, never got anything OUT of it.

#

roger. Give me 2 moments.

tough abyss
#

You never used debug console?

pale sundial
#

Honestly, no. That's why I'm trying to do a bit of scripting now to get my eye in.

tough abyss
#

Even just executing waypoints splashdown should show resulting array where you can see all waypoints for the group

pale sundial
#

So the return I get is "[[B splashdown,0],[B splashdown,1]]"

#

I apologise that I'm very novice at this. It's really very kind of you to give me a hand with all this.

tough abyss
#

Yeah so the waypoint you are after has index 1

pale sundial
#

Got it. So that's the one to edit.

#

Give me some time to try and figure some things out and see if I can fix this myself with what little knowledge I have and I'll let you know what I try and how it goes.

tough abyss
#

Then make scripted waypoint of the same type and index

pale sundial
#

Ok, frustratingly, index 1 is indeed a GETIN waypoint. I just can't fathom why the squad doesn't...

#

So creating another waypoint in the chain improves things, but doesn't fix them.

splashdown addWaypoint [getPos chariot_helo,1];
[splashdown,1] setWaypointType "MOVE";

splashdown addWaypoint [getPos chariot_helo,2];
[splashdown,2] setWaypointType "GETIN";

This gets the squad to run 10 meters away, and then back towards the helo. Still, however, they don't get in...

young current
#

is the helo assigned as their vehicle?

pale sundial
#

Assigned as their vehicle? I'm not sure what you mean. The player and his squad of pilots are in the helo - variable "chariot_Helo", group variable "chariot". The AI squad is variable "splashdown" and they're separate to the helo.

pale sundial
#

How would I use that in conjunction with scripted waypoints? Would you mind spelling it out for me? I'm still rather rusty with this stuff.

young current
#

im not even sure if its needed. But since the vehicle is "owned" by other group already it might be

#

not exactly sure how you would use it with waypoints though

pale sundial
#

Ok, well I'll give it a try. Nothing ventured, and all that. The odd thing in that if I manually place a waypoint in the EDEN editor for splashdown to get in then they do.

#

It's just if I try scripting it that it all goes to pot...

tough abyss
#

Try this:

splashdown addWaypoint [getPos chariot_helo,1]; 
[splashdown,1] setWaypointType "MOVE"; 
_wp = splashdown addWaypoint [getPos chariot_helo,2]; 
[splashdown,2] setWaypointType "GETIN";
_wp waypointAttachVehicle chariot_helo;
#

though you dont need extra move waypoint in between unless you want to have some sort of deviation in the approach

pale sundial
#

They got in! Fantastic! Cheers mate! My guess is that the script I was using was only creating a waypoint at the vehicle's position, rather than it being attached to the vehicle like in the editor. That little line of code has been bugging me for far too long.

#

In the unlikely event that we meet,I owe you a beer.

pseudo swift
#

I'm trying to make a trigger which requires the presence of all players in a scenario before it activates, can anyone help me out with that?

#

I've only just started learning to use the editor at all and have never done any scripting

drifting copper
#

You are looking for sychronised & groups of synchronised objects I think. Not 100% sure. But will have to sync the units to the trigger that you want it to activate

pseudo swift
#

hmmm

#

so if I set the trigger to activate on player presence

#

and then sync it to each player?

#

that will make it activate only when they're all there?

tough abyss
#

What do you mean by all players present, present in area?

pseudo swift
#

yes

#

like the area designated by the trigger

#

This probably isn't super necessary for what I'm trying to do. I'm really just trying to put together a good work-around for the issues with AI helicopters unloading human, or partly-human groups.

#

As long as the team leader gets off when it lands, any AI team members should dismount automatically.

#

But if somebody decides they want to play as one of the team members with an AI team instead of as the team leader (which would be stupid, but I'm positive somebody will try), then they'll get off and then the helicopter will take off with the rest of their team still on it.

tough abyss
#

So by all players you mean all human players or all units including AIs?

pseudo swift
#

Or if just one human player isn't paying attention they'll still be on the helicopter and it will just take off with them, and then they'll have no way to get off.

#

I mean all playable characters, whether they're controlled by humans at the time or not.

#

So four specific characters, in this case.

#

What I was going to do is set the helicopter to land with a waypoint, then tell the players via a task to regroup nearby, and doing that would complete the land waypoint, sending the helicopter on its way. This way the helicopter would be prevented from leaving with anyone still aboard.

tough abyss
#

You can just check that no playable unit is inside the helicopter

pseudo swift
#

how do I do that?

#

I mean that's basically what I'm trying to do, it sounds like you just have a more direct way of doing it

#

which I would appreciate

tough abyss
#

if (playableUnits findIf {_x in _heli} < 0) then {...can takeoff...}

pseudo swift
#

shouldn't that be = 0? or < 1? not < 0?

tough abyss
#

So if no playable unit is inside helicopter the expression will return -1

slim oyster
#

!(playableUnits findIf {_x in _heli} isEqualto -1) in a waypoint condition should work

#

You could also do it the other way, searching whether any of the crew units of the vehicle are in playableunits.

pseudo swift
#

okay great

#

thanks

#

I'm confused at why it would be -1 and not 0 but I'll trust you that's right

tough abyss
#

Find if returns index in array or -1 if not found

pseudo swift
#

oh okay

#

so would that go in the land waypoint to make it complete, or the move waypoint after it?

tough abyss
#

Try which works the best

pseudo swift
#

okay

rancid ruin
#

is commy still around?

#

why are there no good tutorials?

still forum
#

yeah he is

#

because no one made good tutorials yet

#

"why are there no good tutorials?" is like asking "why did noone rebuild the great pyramids out of clay"

#

because noone did it yet. Is the answer

rancid ruin
#

do you think that's because people are lazy, or because SQF is so bad that nobody wants to stick their neck out and say "this is how to do it"

still forum
#

The professionals either don't care because they already know, or know that they would be bad at explaining/teaching

rancid ruin
#

apparently BI don't even teach SQF internally to their employees

#

according to someone on glassdoor

still forum
#

SQF isn't really that hard..

frozen knoll
#

its true tho... trial and error is a great way to learn

still forum
#

If you know programming and have a good brain, it's quick to get into

rancid ruin
#

is it? i bet none of you would agree on the correct way to do X

#

that's why this channel is/was so funny

slim oyster
#

SQF is not difficult, just some weird proprietary things. And that is true for many languages

still forum
#

yeah.. That's because there are probably multiple correct ways to do things

#

some are easier to read, some are faster, some are just utterly retarded.

slim oyster
#

Can you imagine if SQF had whitespace interpretation

still forum
#

🤢

rancid ruin
#

yeah no doubt there's a correct way

#

i would love to see 5 of you agree on what it is though :D

slim oyster
#

ask a simple question on stackoverflow and you have the same problem

#

typically many ways to accomplish something

frozen knoll
#

theres only 1 way to sqf 😉

rancid ruin
#

RECKLESSLY

languid tundra
#

Yeah, with good old goto 😂

slim oyster
#

with arma it is even more open ended because you are rarely looking for compatibility with other functions/components... script accomplishes thing in game? success! Doesn't? failure!

rancid ruin
#

i just find it interesting how much disagreement there is over SQF

#

even BI's built in functions and modules - people say they're shit but they say that about everyone's SQF generally, bar the ACE team

slim oyster
#

Unless you are talking about people with little experience, most of the disagreement is over ignorance of newly added commands or useful functions

still forum
#

simple example. Get the position of the player
abc = getPos player
Make it readable you idiot
playerPosition = getPos player
Use tags on global variables you idiot
tag_playerPosition = getPos player
Why do you even need a global variable you idiot

slim oyster
#

heh

#

why aren't you saving player position in profilenamespace

rancid ruin
#

true, i guess there's only so much you can do

still forum
#

ACE code is also not perfect. Mostly the 3+ years old stuff.

rancid ruin
#

but then general things like "your game runs badly because you have too many bad scripts" get said

slim oyster
#

Many scripts are way too intensive. It doesn't help that the engine is old and inefficient with a cpu cycle

#

badly made scripts can be the difference between 40fps and 12fps

rancid ruin
#

surely it also doesn't help that there's no good tutorials :D

still forum
#

Well why don't you make some then? 😄

rancid ruin
#

i would love to but real life fucked me and i'm rusty with SQF and was never great when i wasn't rusty

slim oyster
#

again arma scripting is always written with an objective in mind, say making AI do this, or giving an action to do this. So most of the "tutorials" follow this structure

#

do enough of these small tasks and you start to understand the language as a whole

still forum
#

I started the SQF blog thing so we can have open-source'd collaboratively made tutorials. That way we can get the same crowd-sourced quality as ACE has

#

but noone really cared soo ¯_(ツ)_/¯

rancid ruin
#

yeah that's sad, i want to get involved, and hopefully will one day, just real life

#

arma's dev community is simultaneously really good and helpful, but also elitist and kind of impenetrable

#

imagine being a total SQF noob and someone saying "there are no good tutorials"

#

it probably took everyone in this channel 2 years to get to grips with it

still forum
#

not really

#

There are people in here that need things explained dozens of times and still don't understand anything. They are pulling down the average

slim oyster
#

maybe if you never learned a language before

still forum
#

Also people come here to ask for help because they don't know what to do

rancid ruin
#

true, enjoying games is very different from being good at scripting

still forum
#

So of course there are mostly beginners/noobs here 😄

rancid ruin
#

you'd think BI would've written a guide 10 years ago

#

they seem to just rely on the community to brute-force it and then apply for a job

still forum
#

Which.. business wise is a good idea

#

already filters out the idiots

#

You only get the diligent self learners who have already prooved that they are worth it

rancid ruin
#

yeah it would make sense, like if you want to learn C++ you can buy a bjarne stroustrup book and get going right away

#

if you want to learn SQF you are on your own lol

still forum
#

everyone can read a book. In a programming job you don't want someone who once read a book and can reproduce the stuff that was explained in said book

#

you want someone who can quickly come up with his own solutions, and can figure out things on his own

rancid ruin
#

true, but you need reference material

still forum
#

Because in the end.. That's how programming works

rancid ruin
#

a community wiki with contradictions in the comments section isn't a great reference

slim oyster
#

I totally agree with the references and wiki

surreal peak
#

Personally my experiance before sqf was about a year of python... ive spent weeks searching through forums to find nothing..

slim oyster
#

the wiki is a mess for many commands and BI functions

surreal peak
#

Then asked 1 question here for it to be explained

#

I like it when noobs ask qurstoons

#

Because they can learn

rancid ruin
#

the explanation depends on who's online when you ask the question though

surreal peak
#

Like i did

still forum
#

It's a community wiki. If it's bad, feel free to make it better

surreal peak
#

Fair enough, luckily we have people like dedmen who is on consistently

#

Its like a live version of stackoverflow

still forum
#

There is stackoverflow SQF btw. But not many SQF professionals frequent that

rancid ruin
#

yeah it would be practically useless if the community hadn't done what they have so far

surreal peak
#

Wait, really?

slim oyster
#

haha what I never heard of sqf stackoverflow

surreal peak
#

Do u have a link?

slim oyster
#

it must be a real swell place

still forum
rancid ruin
#

SQF professionals basically == BISIM contractors and VBS users though right?

surreal peak
#

Aaaand bookmarked

rancid ruin
#

and they never seem to be as forthcoming with help or reliable as arma community members

still forum
#

SQF professionals such as ACE/CBA devs

rancid ruin
#

imagine if BI wrote an SQF book mmmm

surreal peak
#

Could also mean devs

#

Like joko who is amazing at scripting

rancid ruin
#

actually the book would probably be buggy wouldn't it

surreal peak
#

It would also needed to be constantly updated

#

Because shit breaks

slim oyster
still forum
#

shouldn't matter. it creates it's own display

slim oyster
#

all i get is an 3den unable to display message box error, no rpt on it

still forum
#

means it's createDisplay failed 🤔

#

AH!

#

parameter 4 4: DISPLAY - parent display

slim oyster
#

perfect finddisplay (313) worked.

chilly wigeon
#

Anyone know of a way to script changing firemode for players? Making a silly arcade game mode where I want to start players on full auto

#

Tried glancing around the "actions" wiki page, SwitchWeapon seems like it could work, but it doesn't

#

No matter what I change the muzzle index value to, it seems to select primary weapon, semi-auto

frozen knoll
#

@chilly wigeon

still forum
#

Firing a weapon != changing firemode

#

Ah

#

topmost comment on that page

frozen knoll
#

😉

chilly wigeon
#

ooo, that'll work great, thanks @frozen knoll

velvet merlin
#

anyone one for the challenge to find an algorithm how to place clutter around the player and fade in and out while he is moving
or has some ideas how to approach that

tough abyss
#

@rancid ruin #community_wiki if you see any contradictions or things that shouldn’t be on wiki, no point whining about lack of maintenance of community run resource if you don’t contribute

tough abyss
#

@velvet merlin how you figure this should work, createSimpleObject? It will make one big mess in MP as everyone will be creating own global grass around them. You will need createVehicleLocal and proper class config, but then everyone will have own local grass around them, dunno how useful that is.

velvet merlin
#

@tough abyss its for a clutter tweaking tool - not for playing

tough abyss
#

Then I misunderstood what you meant by fading it in out

#

Assumed you wanted dynamic creation and deletion around player

#

Ignore me then

velvet merlin
#

yes

#

to replicate the later actual behavior

frigid raven
#

@tough abyss can I ignore you as well?

lost iris
#

any chance i can speak to a BI dev, urgently regarding a big exploit within the game

still forum
#

@lost iris #arma3_feedback_tracker go to the feedback tracker site and create a security ticket. They are hidden to the public and only readable by devs

tough abyss
#

@frigid raven as well? I am not ignoring you...Oh I see, yeh go ahead

lost iris
#

When was the last patch @tough abyss i tested last night and it worked so

still forum
#

A month ago or so

lost iris
#

which link is it?

still forum
#

channel description

lost iris
#

added, hope they patch it quick

#

thanks @still forum

#

@still forum There is no option to create an arma 3 security ticket?

still forum
#

It's called "Arma 3 private bug report"

lost iris
#

ok, thats the one i did. Wasnt sure if only the devs could see it

frigid raven
#

@tough abyss done ignoring

marble pasture
#

o7 duders. I've got a question involving Ace3 (maybe?) that someone might be able to answer. Not super new to arma, but pretty new to arma scripting and its a good chance that I just missed something super obvious.

digital hollow
#

Ask and someone will have an answer.

marble pasture
#

thanks! So, context. I've got a toxic barrel that I've used ace to make both able to be picked up and cargo, and a vehicle to hold it. So you pick up a toxic barrel and load it onto a truck. easy enough. Now, Im trying to make a trigger that activates when its loaded into the truck. Im coming into a pretty basick issue of trigger not activating when cargo is loaded. I've used an !alive check on the trigger but thats not working and Im trying to figure out if thats due to the barrel not being deleted/functioning differently becuase its an Ace command. I've considerend trying an Event Handler but I though I'd ask people much smarter than I about it first.

digital hollow
marble pasture
#

aighty, that'll be the next attempt. I was banging my head against a wall for a while trying to get something that seemed simple to work, lol. Still learning the syntax and interatcions between things has been...something. thanks for giving me a direction to go in.

digital hollow
#

Good luck!

vapid drift
#

Alright... what am I missing here?

        [_terminal,
            [
                "Enter Code",
                {
                    ["toggleDevice", [(_this select 3)]] execVM "activateNuke.sqf";
                    hint "You don't know the code to activate this device";
                    [(_this select 0),0] call BIS_fnc_dataTerminalAnimate;
                    sleep 8;
                    hint "";
                }, 
                _device,
                1.5,
                false,
                false,
                "",
                format["%1 && !TFR_receivedCodes", _self]
            ]
        ] remoteExec ["addAction", 0, true];```
The exact error I'm getting:

' |#|&& !TFR_receivedCodes'
Error Invalid number in expression```
I get the same thing if I swap out !TFR_receivedCodes with TFR_receivedCodes == false

#

I assume it's something with the ampersands? I'm at a standstill until I can figure this one out. It's breaking everything

frigid raven
#

format["%1 && !TFR_receivedCodes", _self] I do not understand why you create a boolean expression as a string here by format? Never saw this before

I would assume you want to have something like _self && !TFR_receivedCodes ?

#

Or is it because it expects code as STRING for this parameter position?

vapid drift
#

@frigid raven Yeah, it requires code as String

tough abyss
#

What is _self and where it is defined?

vapid drift
#

@tough abyss disregard, I figured it out. It was _self that was the issue. An object reference instead of a string was being passed at one part in the code

cosmic lichen
#
{
    if (_forEachindex < count _attributeValues - 1) then
    {
        _export = _export + str _x + "," + endl;
    }
    else
    {
        _export = _export + str _x;
    };
} forEach _attributeValues;



copyToClipboard  _export;///str _attributeValues;```
#

Guys, is there a more efficient way to remove the comma and linebreak at the end when export an array to the clipboard?

digital jacinth
#

could someone explain me file patching? I alreadyhave set it up so it loads unpacked files, but only when i restart arma. Is there a way to reload the files during run time?