#arma3_scripting

1 messages ยท Page 543 of 1

winter rose
#

(T key, or manually via page up / page down)

real tartan
#

yes, with ranging page-up/down

#

to slow down VTOL you need like 2 minutes for AI to level plane to that speed ( 15 km/h )

tough abyss
#

any way thanks for the help guys got the insert done so im off to bed

winter rose
#

@tough abyss np! g'night then.

#

@astral tendon so far, from what I see in the BIS_fnc_garage function you can't choose the vehicles to be loaded

outer fjord
#

Question, if I wanted to make a object just magically motion tween to another location. Like having a VR cube move left to right. What script functions would I be looking for to accomplish this?

dull drum
#

Guys, is it possible to make unit always run with weapon ready? I can't find any good commands for this.

#

And not just animated as if it was ready but really ready ๐Ÿ˜ƒ

#

@chilly scarab have you tried just replacing a playAction with the same playMove?

chilly scarab
#

Yes, playMove didn't work, probably beacuse the animation I'm trying to play is an Action and not Movement.

dull drum
#

Well, playMove sometimes has nothing in common with movement ๐Ÿ˜ƒ

chilly scarab
#

Alright, well didn't work :I

dull drum
#

["ActsPercMstpSnonWnonDnon_DancingZOZO", "reden", "playMoveNow", "Dance 4 (uninterruptable)", 2, ""],

#

String #24

outer fjord
#

@dull drum I thought that just magically warps the item to the position?

#

Isn't there framework now that allows you to mimic smooth transitions?

dull drum
#

I didn't see that yet. But when I'm going with my scalpel to the Ryan's Zombies mode if I'm not mistaking the jumps and throws there are set with setPos. Could be mistaken.

outer fjord
#

mmm

#

I'm more worried I would need to call it like 3000 times to mimic a smooth transition

dull drum
#

let me get a really quick glance there

#

_dir = _zombie getDir _target; _zombie setDir _dir;

outer fjord
dull drum
#

Seems legit

#

Yes, RZ also uses setVelocity

#

fnc_RyanZombies_Velocity = compileFinal "if(local (_this select 0)) then {_this select 0 setvelocity (_this select 1)}";

pallid gorge
#

someone can help me how i make ai turn global mobilisation searchlight on ?

dull drum
#

@pallid gorge with a trigger activated on AI presence?

pallid gorge
#

what command i use

#

to to turn on

dull drum
#

Does the searchlight editor object have some attribute to switch it on and off?

pallid gorge
#

no

dull drum
#

Then it probably can't be switched on by scripting?

hallow mortar
#

IIRC the GM searchlights have a special weapon you can make the AI use

#

try sqf _searchLightGuy action ["SearchLightOn", _searchLightTurret];
(replace _searchLightGuy and _searchLightTurret with whatever you've called the AI and the searchlight)

#

I think you also need to use sqf _searchLight addWeaponTurret ["fakeweapon", [0]];
to make the AI actually track targets with the light

pallid gorge
#

worked thanks

topaz forum
#

Can someone help me out with the r3f advance logistics the mod breaks when alive is with it, once i pick up a box it cant be dropped

earnest goblet
#

hey, i can't play custom sounds on the trigger;

On activation i have : playMusic "ogg";

in my description.ext i have :

class cfgMusic
{
sound[] = {ogg};

class ogg{
    name="ogg";
    sound[]={\sound\ogg.ogg,1,1.0};
    titles[] = {   };
};

};

i get no errors, i just don't hear the sound at all, anyone got a solution?

crisp cairn
#

Hey guys, I am trying to make an addon for Zeus. At the moment I am having an unsure on how to execute code on a placed game object. Can someone help me? Thanks

hallow mortar
#

@earnest goblet first, save, close, and reopen the mission. CfgMusic changes don't always go through properly without reloading the mission.
Second, my standard cfgMusic (which I know works) has tracks[]= instead of the first sound[]= in yours. Try that.

Edit: also, try adding a hint or something to the trigger so you know it's firing properly.

earnest goblet
#

@hallow mortar restarted the mission a bunch of times but didn't try the tracks[]= yet, I'll have to leave that for tomorrow and hope it'll work, thanks :)

plain urchin
#

@crisp cairn do you mean executing code on an object immediately after it was placed? if so, then use CuratorObjectPlaced eventhandler

still forum
#

Dedmen: Do exactly this to fix waitUntil
7 days later
BI: Tweaked: waitUntil will now continue looping when incorrectly returning something instead of true / false, and show a warning. We strongly recommend fixing scripts, because we intend to force exiting the loop again in 1.96.

hollow thistle
#

But they want to "break" it again after 1.96

#

OId unmaintaned missions will care about the warning

#

sure

crisp cairn
#

Anyone understand how to use the BIS_fnc_curatorObjectPlaced?

spark turret
#

what would be the best way to check if a unit is under fire?

winter rose
earnest goblet
#

can i make a player dismount the vehicle when he enters the trigger zone?

winter rose
#

yes

earnest goblet
#

sweet, what's the command for that?

winter rose
#

do you want to "eject" him or make him get out?

#

let's say he's driving @ 50km/h

earnest goblet
#

either is fine because the vehicle gets destroyed and it's not moving

winter rose
#

so how can he enter the trigger zone?

earnest goblet
#

the car gets destroyed on trigger

#

car setdamage 0.80;
;car setHit ["wheel_1_1_steering", 1];
car setHit ["wheel_2_1_steering", 1];

winter rose
#

@earnest goblet

earnest goblet
#

sorry had to go to the store real quick

#

i'll check this stuff out big thanks :D

winter rose
#

no worries, glhf ๐Ÿ‘

earnest goblet
#

soldierOne action ["Eject", vehicle soldierOne];

i did this, changed soldierOne to the name of the character, changed vehicle to the name of the car, and got an:
Error missing ]

still forum
#

"vehicle" is not a name

#

it's a command

earnest goblet
#

a yes just changed it and it's okay now

#

ty

harsh spoke
#

Hello all. I'm seeing if I could get some help with trying to get UAV feed to show up on a Rugged Monitor or any general Monitor in game. Thus far I have the (showUAVFeed true; )(_bool = shownUAVFeed; )(_UAVFeedDisplay = uiNamespace getVariable "RscAvCamera";) inserted where I believe it should go, but nothing happens.

Anyway I could get some tips or help on getting this to work?

Thanks

obsidian violet
#

hey guys, trying to get some help here. I need to run this sqf either globally or on the player with variable name doghandler only...
I tried using this

[ [], {
[dogHandler] execvm "scripts\kltdog.sqf";
}] remoteExec ["BIS_fnc_spawn", 0, false];

but it didnt work..
if im running only the [dogHandler] execvm "scripts/kltdog.sqf"; globally or locally within the debug console it works.
any clues why? am I using the remotexec correctly?

Thanks.

plush oriole
#

seems like a few too many layers

#

ah you can't just give remoteexec a script path

#

i forgot

hallow mortar
#
["scripts\kltdog.sqf"] remoteExec ["execVM",dogHandler];``` perhaps? I don't see why you need bis_fnc_spawn involved at all
obsidian violet
#

oh thanks. but now the doghandler is set to targets witch is good however dogHandler is also a param within the script. how can I put that in aswell?

#

so it runs like [doghandler] execvm "blablabla.sqf";

hollow thistle
#
[<leftArg>, <rightArg>] remoteExec ["binaryCommand", <target>];
obsidian violet
#

["scripts\kltdog.sqf",dogHandler ] remoteExec ["execVM",dogHandler]; so something like that

winter rose
#

The opposite, but yeah

#

LEFTarg, RIGHTarg

hollow thistle
#

just reverse the execVM,
MVcexe

astral tendon
#

The vehicle respawn module is returning the new vehicle a null object, how to fix that?

spark turret
#

help i tildet the camera in singleplayer camera mode and now my editor is 10ยฐ sideways tilted:(

still forum
#

!issuewarning @umbral mason crossposting

#

:u

lyric schoonerBOT
#

Done.

tough abyss
#

will the bot obey anyone?

still forum
#

wanna try?

tough abyss
#

yeah

#

OK GOOGLE

#

HI ALEXA

#

HEY SIRI

#

??

#

doesnt work

winter rose
#

!purgeban 100y Dedmen moderating

#

nope

#

doesn't work ๐Ÿ˜„

still forum
#

๐Ÿ˜…

winter rose
#

(hopefully I must say; I don't know how to unban and you never know, a bug or something ๐Ÿ˜… )

still forum
#

I also don't know how to unban with the bot

#

I always do it manually

#

the bot is supposed to be able to do that, but it refuses to work anytime a user is not on the discord anymore

tender fossil
#

I'm using Arma Dialog Creator to make GUIs. How can I add a clickable button with centered text? ShortCutButton doesn't support centered text

winter rose
#

โ€ฆwould you mind to rephrase the issue please?

autumn stone
#

nope

#

can somebody help i have a prb the prb is when randoms or no admins trying to join on my Server thy get kicket because(Groupicons[true/false] can somebody tell me why and how i can fix it .

still forum
#

if you don't want to rephrase that then I doubt anyone will understand

#

besides "they get kicked" there is no really useful info in there

autumn stone
#

soooo when Players try to connect on my Server they get kicket from the Server

#

becauseBattleEye .... (Groupicons[true/false])

still forum
#

so battleye says that

#

does it say anything else?

autumn stone
#

i can send you a picture (private)

still forum
#

would be gud

restive leaf
#

Or post the message in the BattlEye log file for the kick... removing user sensitive information. Cause if you are just posting the pic of the kick message in game in ARMA it is almost worthless for adding to a filter

still forum
#

That is definitely not battleye, and it is something server/script specific

#

need to ask whoever wrote your scripts

restive leaf
#

Oh yeah... that's not a BE dialog

still forum
#

I guess that's just a debug message, unrelated to the kick

autumn stone
#

yeah but when you look in the console there is Kicket by battleye๐Ÿ˜…

still forum
#

there is some other reason then

autumn stone
#

it could be the mp_mission

still forum
#

does the console say nothing else?

autumn stone
#

wait

restive leaf
#

For every BattlEye filter type there is a txt file with the filters and possibly a log file with the actual kicks that gives enough info to add a filter to stop the kick happening. Without the log file entry for the kick in the log file it is almost impossible to advise

autumn stone
#

does anybody know about kp_liberation ?

#

its my mission

#

it could be that if its to old

still forum
#

yes

#

one of the devs is here

#

offline tho

tender fossil
#

Can I make GUI buttons with static controls and adding eg. an "onMouseClick" event to them?

#

Or rather, what's the preferred way

still forum
#

I think onMouseClick depends on type

#

so might not work for non-buttons

#

never tried tho

tender fossil
#

How do you make buttons @still forum? The default ones are pretty odd

still forum
#

what you mean by odd?

autumn stone
#

Do you know a current version of the mission (Dynmaic_Universal_War_Mission

#

)

still forum
#

just simulation type button. I don't know that UI maker tool that you use. And also never really made UI's ๐Ÿ˜„

tender fossil
#

They have this 3D animation effect and shortcut buttons don't support centered text apparently

still forum
#

ah yes, that might be :/

#

maybe you can make a invisible button without text, ontop of your background text?

#

that should work, tfar does that too

#

never heard of dynamic universal war

tender fossil
#

I see

#

Thanks for the tip

autumn stone
#

๐Ÿ˜‚

#

shit

#

you fight
against bots like in Milsim

restive leaf
#

Has not been updated on Steam since 2014... so probably does not work well anymore

autumn stone
#

i think thats right

#

but when i give perople adim they can join without any prb

#

people

restive leaf
autumn stone
#

do you know kp_liberation ?

restive leaf
#

I know of it... seems like a good mod. Not my thing though... Epoch and ALiVE are my things

autumn stone
#

yeah i got this on my server

#

and its not so old

#

everything is working perfekt only that thing

restive leaf
#

I said what you need to post to have someone work out how to amend your filters

#

But I'm getting on the subway now so someone else will have to help... sorry!

autumn stone
#

np but thx

sturdy cape
#

anyone having a good countdown timer script they would share? i need to show a countdown timer for an anti-combat-logging script i am trying to execute

winter rose
#

would the Firerange timer suit you?

sturdy cape
#

dont know how it looks so,no idea^^

silk carbon
#

Is there a way to make a script so that, upon a unit being hit, they receive a message saying they've been hit?

young current
#

using eventhandlers shoudl work for that.

silk carbon
#

Could you tell me how I could do it?

hearty plover
#

I am getting a fnc/Zen_OccupyHouse.sqf not found error.

#

Not sure why.. or what I am doing wrong here... D:

still forum
#

what are you packing your pbo with?

hearty plover
#

No PBO

still forum
#

maybe files are not included in packed pbo

hearty plover
#

Not serializing the mission yet

still forum
#

well use pbo then

hearty plover
#

Just loading from editor.

#

Better yet, how can I return the root dir for my mission

#

So I don't need too use a pbo

#

Because I don't want to pack a pbo while editing in eden.

still forum
#

just try if pbo works

#

maybe use CfgFunctions

hearty plover
#

can I just add CfgFunctions into my descption.ext right

#

Do I still ned a CfgPatches

#

??

still forum
#

CfgPatches is a mod thing

#

you don't have that in missions

winter rose
silk carbon
#

Is there a way to make a script so that, upon a unit being hit, they receive a message saying they've been hit?

Anybody know??

winter rose
#

yes

still forum
#

for hit, you are looking for "Hit" probably

silk carbon
#

Yeah trying to make an airsoft style thing

#

So _EHkilledIdx = player addEventHandler ["killed", {_this exec "playerKilled.sqs"}]

#

would work?

still forum
#

that would fire when killed.

#

Right as it says

hearty plover
#

It's not a PBO issue.

still forum
#

so in pbo it broken too?

hearty plover
#

So, I had a sub-folder for all my unit missions Iw as working on.

still forum
#

symlink?

hearty plover
#

Something like mpmission/mysubfolder/mission.map

#

Like that

#

Right

#

What this does is mess up the root for the mission

#

Because root STARTS at mpmissions.

#

so my path was mpmissions/sub/mission/fnc/script.sqf

#

Which is gross, and will break when I move it to a pbo / onto server.

#

so, subfolders are bad.

#

D:

still forum
#

learning smth new every day

silk carbon
#

@still forum I'm looking for a way to make it fire when hit, and be enabled if the unit has allowDamage set to false

still forum
#

if you want hit

#

then you should try the "Hit" eventhandler maybe

silk carbon
#

Says it won't work with allowDamage set to false

sturdy cape
#

@winter rose thanks!

still forum
#

you can use damage eventhandler, to disable damage even without allowdamage

hearty plover
#

Shout out to KK blogs for helping me figure that one out.

silk carbon
#

I'm confused though, I've never scripted

#

Is there anybody who could write the code out for me?

tender fossil
#

I wonder what's wrong in my code. This is part of my dialog.hpp:

class Inventory_moneyOnBankAccount
        {
            type = 0;
            idc = 2310;
            x = safeZoneX + safeZoneW * 0.24739584;
            y = safeZoneY + safeZoneH * 0.80740741;
            w = safeZoneW * 0.2375;
            h = safeZoneH * 0.02407408;
            style = 0;
            text = "You should not see this text";
            colorBackground[] = {0.6,0.2549,0.5333,0};
            colorText[] = {1,1,1,1};
            font = "PuristaMedium";
            sizeEx = (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1);
            onLoad = "_this call REV_FNC_bankAccountStatus; REV_VAR_doInventoryBankLoop = true;";
            onUnLoad = "REV_VAR_doInventoryBankLoop = false;";
            
        };

And the function:

REV_FNC_bankAccountStatus =
{
    _monitorBankAccount = [] spawn
    {

    while {REV_VAR_doInventoryBankLoop} do {
        ((_this select 0) displayCtrl 2310) ctrlSetText format ["Money on bank account: %1 %2", REV_VAR_moneyOnBankAccount, REV_CONST_currency];
        REV_VAR_moneyOnBankAccount = REV_VAR_moneyOnBankAccount + 250;
        sleep 1;
    };

    };

};
#

The issue is that the function doesn't run. All I see is that "You should not see this text".

still forum
#

use CfgFunctions

#

it expects the function in uiNamespace

#

you probably only set missionNamespace

silk carbon
#

@still forum

#

Can you write the code out?

still forum
#

I could

hearty plover
#

Anyone uses Zen Occupy House script?

still forum
#

but I'm already in bed so. no

#

๐Ÿ‘€

tender fossil
#

Ffs lol

#

@still forum I'll check it out, thanks!

#

Btw, is it okay to use global variables like that (eg. "REV_VAR_moneyOnBankAccount")? Or is it bad code design in SQF?

#

In other words, is it okay to name global vars like that and then access them from here and there

#

Or do I need to put more thought into the architecture

still forum
#

well you should plan out your tag design

#

but whatever works for you

#

think the _VAR is kinda useless though, as clearly that variable is a variable so why write that the variable is a variable

#

unless theres some deeper meaning to the var

#

ace for example does
ACE_modulename_variablename

tender fossil
#

I thought it would be good to explicitly state that it's a pure variable and not a function

#

Or a constant

still forum
#

functions usually have _fnc

tender fossil
#

Yeah, that's what I use

still forum
#

constant. yeah maybe.

#

But I'd say, add special naming to the things that rarely appear

#

if you add _VAR to every single variable you'll write that hundreds if not thousands of times

tender fossil
#

Well yeah lol

still forum
#

if you add _CONST to constants, you'll write that a couple dozen times

#

Or just use a macro which generates names for you, and then just make it GVAR(myVariable) and everything else happens automagically

tender fossil
#

๐Ÿ‘

austere silo
young current
#

it would probably need bunch of animate commands to work like that

#

for that platform

#

for others setPos perhaps

#

that there is an editor feature that might be a readable function somewhere in the configs

rancid pecan
#

i can try this open door

#

but don't working why ? where problem ?

#
{
    if (_x animationPhase "Door_1_rot" == 1) then {
        _x animate ["Door_1_rot", 0];
    } else {
        _x animate ["Door_1_rot", 1];
    };
} forEach (nearestObjects [player, ["Land_BackAlley_01_l_gate_F"], 10]);
plush oriole
#

where do you call this script?

#

floating point comparison maybe?

#

although I think arma handles this

rancid pecan
#

in mp server

#

in debug console call

plush oriole
#

are you sure the classname is correct?

rancid pecan
#

yes i m sure

plush oriole
#

try always animating the door open

#

without the condition

tough abyss
#

Look up in config for the name of animation source then use animateSource

hearty plover
#

When your blaming the script.

#

But it's the maps fault...

#

D:

topaz forum
#

Hello how do i add another script onto a mission file

tough abyss
#

There is scripted EH for save too

cosmic root
#

Is there a way to track a specific particles position or if not, is there a way to predict or track the amount it will be moved via wind?

#

Specifically particles from a #particleSource I've created.

quartz coyote
#

@winter rose I cannot get kbTell to work in vehicle.... works find out of a vehicle but not inside ๐Ÿ˜ฆ bug ?

tough abyss
#

You can track position with ontimer script but not remove once itโ€™s spawned @cosmic root

cosmic root
#

Wow I don't know how I missed that. Thank you. You're a legend.
Is there a way to pass a variable to the onTimer script?

tough abyss
#

Use global variable it will be available in script

cosmic root
#

Doesn't really work for my situation. If there's not it's no big deal.

tough abyss
#

Script doesnโ€™t take arguments apart from those set by the engine

cosmic root
#

Ideally I want to average the positions of all the particles from a source. I guess I'll have to do some weird hacky stuff. But I think I can make it work

tough abyss
#

How many particles?

winter rose
#

@quartz coyote might be

quartz coyote
#

oh god

#

they break the say command and then replace it by a kbTell command that's also broken...

winter rose
#

I don't know for sure; I will have to do some tests to confirm it though

velvet merlin
#

how does one determine the right z offset for simpleObjects (without class SimpleObject definition)?

tough abyss
#

trial and error

velvet merlin
#

so per model setup

drowsy axle
#

Hey guys, do you know of any plans to add ACEX sitting to the Contact seats?

velvet merlin
#

does createSimpleObject have any requirements on p3ds? cant get CUP/A2 vegetation to spawn ๐Ÿ˜

noble sentinel
#

Is else if a thing in sqf or not?

still forum
#

not without mods

#

so no

tough abyss
#

You have?

tender fossil
#

Do compiled functions have a namespace?

#

Ie. if I compile a function in mission namespace, do I have to call it with with missionNamespace do { ... } from eg. onLoad eventhandler set up for a control in dialog?

still forum
#

no

#

variables are in a namespace

#

if you put code into a variable, it's a variable

#

Yes I have elseif in intercept cba

#

Also instead of with do just use getVariable

#

Because... functions are variables.

tough abyss
#

If it is function library function it will be in ui and mission namespace, if it is handrolled function then you need to call it where you defined it

still forum
#

As I said, just use CfgFunctions

tough abyss
#

but do you have else if?

still forum
#

yes

tough abyss
#

With space?

still forum
#

implementation detail... uh.. no

tough abyss
#

Whatโ€™s the difference in performance?

still forum
#

didn't test perf

#

Depends on if you use condition as bool or as code

#

if you use code then it lazy evals

tender fossil
#

What are the benefits of using CfgFunctions instead of manually defining/compiling functions?

still forum
#

The benefit is that the game takes care of everything for you

#

instead of you having to write the same stuff dozens of times and having to make sure you don't make a single typo

quartz coyote
#

I'm having issues with kbTell inside vehicles. Sound is not heard whereas out of vehicle, sound is heard. Has someone experienced the same issue?

quartz coyote
#

Can't remember how to handle the diag_log command

still forum
quartz coyote
#

thank Dedmen, but i'm asking after having read that.

still forum
#

no idea how to help then. wiki says how you use it

quartz coyote
#

can you correct me :

#

I set diag_log {Off kbTell [aP, "jeep", "S02v03"];};
and it logged 15:42:41 {Off kbTell [aP, "jeep", "S02v03"];}

still forum
#

yep. that's correct

#

you are telling it to log a piece of code. It will log a piece of code

quartz coyote
#

okay

still forum
#

want something else?

quartz coyote
#

do that's not what i'd like to do then

#

I'd like to see any error related to the execution of the command

still forum
#

that would get printed anyway

#

script errors are always printed to log

quartz coyote
#

well, for some reason, kbTell doesn't do anything when the speaker is in a vehicle... so I need to understand why

still forum
#

I don't think the game will help you with that

#

there is no "please log everything that you're doing internally somewhere in the engine right now" command

quartz coyote
#

is it possible to see the script behind the command kbTell ?

#

since its not a function I bet not

#

but i'm asking anyways

still forum
#

there is no script behind commands

quartz coyote
#

I hope i'm wrong, but BI created kbTell conversation system to replace the say command but that is also bugged....

still forum
#

to replace?

#

I don't think so

#

they serve different purposes

#

kbTell is for the whole dialog system stuff

quartz coyote
#

suits you , nevertheless, both are fucked up

#

say command doesn't handle lip moves anymore and kbTell doesn't do anything in vehicle

#

great

#

wonder how they managed to create all the SP campaigns in the recent DLCs if their own work is fucked up

still forum
#

maybe it works correctly but you are just not using it correctly

#

or some undocumented parameters

#

BI uses the same script stuff that everyone else has access to. So if it works for them...

quartz coyote
#

yes I know.

#

but I've tested it correctly and it's not working

#

for kbTell, it's working fine outside of vehicles

#

but not in

still forum
#

I remember some recent change about something with audio and in vehicles

#

don't remember what it was tho. And can't find anything on kbtell wiki page

quartz coyote
#

not surprised.....

#

i've checked the Feedback tracker and the Forum but there is nothing related to my problem

still forum
#

have you tried if forceRadio works in vehicle?

quartz coyote
#

I tried but couldn't make it work. Altho that's probably me being dumb. I did :

Off kbTell [aP, "jeep", "S02v03", nil, true];```
But it displayed error
#

so I tried

Off kbTell [aP, "jeep", "S02v03", [], true];```
but again
#

error

#

so it's just me not doing it right

still forum
#

what error?

#

it says arguments are optional so

#

Off kbTell [aP, "jeep", "S02v03", true];

quartz coyote
#

but isn't true taking the 4th argument's place?

#

I mean argumentArray1toN

still forum
#

Read further

#

argumentArray1toN (Optional) is what it says

quartz coyote
#

mmmh. I though you still had to respect the order

still forum
#

yes you have to

#

and that's what youre doing

quartz coyote
#

not order > placement

still forum
#

Well yes. placement is also the same

#

optional argument is optional

#

optional things you either put in, or leave out

#

the placement for the arguments is
receiver then topicname then sentence class, then optional arguments, and last the forceRadio

#

forceRadio is still last

quartz coyote
#

but true is then taking the index position in the argument array no ?

still forum
#

index doesn't matter

#

wiki says forceRadio (Optional): Boolean, Number or String (last value of the array)

#

it has to be on the end

#

that's it

quartz coyote
#

okay okay

#

let's try

#

not working

#

I tried adding the Topic when unit is outside of the vehicle but it didn't change anything

#

I thought it was because I was using an RHS vehicle and tried with a vanilla vehicle but it wasn't that ether

topaz forum
#

overviewText = "TF-Black Home Rotation";
author="TFB Mission Team";
OnLoadName = "TF-Black Home Rotation";
OnLoadMission = "TF-Black Home Rotation";

class CfgFunctions {

class SSQN {

    class deployC130 {

        file = "functions";

        class deployC130 { recompile = 1; };
        class deployC130_addEffects { recompile = 1; };
        class deployC130_removeEffects { recompile = 1; };
        class deployC130_killAmbientLights { recompile = 1; };
        class deployC130_giveParachute { recompile = 1; };
        class deployC130_returnBackpack { recompile = 1; };
        class deployC130_placeInPlane { recompile = 1; };
        class deployC130_getCloudParams { recompile = 1; };
        class deployC130_signalJump { recompile = 1; };
        class deployC130_onEject { recompile = 1; };
        class deployC130_onUnitLanded { recompile = 1; };
        class deployC130_planeSyncFlag { recompile = 1; };
    };

};
class R3F
    {
        Class R3F logistics
        {
            file = "R3F_LOG\init.sqf";
            class R3F logistics {};

    };

};

{ #include "KPCF\KPCF_functions.hpp" };

};

#

can someone help me with fixing this

#

im trying to add another script

#

and they arent working

tender fossil
#

If I define functions with CfgFunctions like this (included in description.ext), do I need to start the files with function name or just write the function inside it?

class CfgFunctions
{
    class REV
    {
        class InitConstsAndVars
        {
            class constants {file = "constants.sqf";};
            class globalVars {file = "globalvars.sqf";};
        };

        class InventoryFnc
        {
            class monitorBankAccountStatus {file = "monitorBankAccountStatus.sqf"};
        };
    };
};
#

Like this:

REV_FNC_MonitorBankAccountStatus =
{
    _monitorBankAccount = [] spawn
    {
        with uiNamespace do {
            while {REV_doInventoryBankLoop} do {
                _moneyOnBankAccount = missionNamespace getVariable "REV_moneyOnBankAccount" + 250;
                ((_this select 0) displayCtrl 2310) ctrlSetText format ["Money on bank account: %1 %2", _moneyOnBankAccount, missionNamespace getVariable "REV_CONST_currency"];
                missionNamespace setVariable ["REV_moneyOnBankAccount", (_moneyOnBankAccount + 250)];
                sleep 1;
            };
        };
    };
};
#

Or this:

    _monitorBankAccount = [] spawn
    {

        with uiNamespace do {

            while {REV_doInventoryBankLoop} do {
                _moneyOnBankAccount = missionNamespace getVariable "REV_moneyOnBankAccount" + 250;
                ((_this select 0) displayCtrl 2310) ctrlSetText format ["Money on bank account: %1 %2", _moneyOnBankAccount, missionNamespace getVariable "REV_CONST_currency"];
                missionNamespace setVariable ["REV_moneyOnBankAccount", (_moneyOnBankAccount + 250)];
                sleep 1;
            };

        };

    };
crude needle
#

The second one, just the function.

winter rose
#

@topaz forum
```cpp
class pinkRabbit {
fluffiness = 1.54;
}```
โ†“โ†“โ†“

class pinkRabbit {
    fluffiness = 1.54;
}```
#

@quartz coyote no issue on my side

tough abyss
#

; after class definition is a must

winter rose
#

ssssssh don't ruin it ๐Ÿ‘€

topaz forum
#

@winter rose
im still a bit new to scripting so do i just add that in, all im trying to do is add another script onto my mission file

#

onto the mission itself and hope it works

hushed mirage
#

hello hi have a mod that i have permission to edit wondering if i could pay someone to do some 3dmodeling and put in back into game

#

was told to ask here

winter rose
#

@hushed mirage nope, post your ad in #creators_recruiting and be sure to be able to present this permission you mentioned

brittle harness
#

Does anybody have an update for ryanzombies resurrection that enables compatibility with ACE3?

hallow mortar
#

Does anyone know an immediately obvious reason why I couldn't use triggerActivated (in relation to a repeatable trigger) as a visibility condition in BIS_fnc_holdActionAdd?

#

I ask because I have done so, and the action isn't appearing

waxen tendon
#

we need a mission making language

#

write the mission, compile, play in a3

#

because sqf is way too shitโ„ข

#

is it possible to select everything with a $x in its name

#

i.e i would like to run script on every helipad*

#

without rewriting bash in arma

edgy dune
#

so for these actions here, https://community.bistudio.com/wiki/inputAction/actions, is it possible for me to trigger one of them? What im trying to do is have vtolVectoringCancel action ran whenever someone enters a vtol and I tried looking for something of the sorts but couldnt find anything

high marsh
#

@waxen tendon find

cosmic root
#

Waypoint activations/script only run on the machine the waypoint is local to correct?

edgy dune
#

@crude needle yea I was gonna use the getin EH, but I didnt know how to execute an action. I thought the action command just returns the state of an action lol. Thanks

crude needle
#

Thought the same thing when I initially saw it.

edgy dune
#

I was looking for something like doaction or forceaction

velvet merlin
#

Variable 'test_currentdisplay' does not support serialization and should not be stored in the mission namespace.
how does one solve this again? tried adding disableSerialization in all relevant scopes, but didnt help ๐Ÿ˜

ivory lake
#
with uiNamespace do {
``` ?
#

or uinamespace setvariable

sturdy cape
#

strange thing here,i need some help.i am trying to add a script execution to the pause manu of arma and it will lock input to the dialog in which you are when adding the EH ```sqf
TZRN_EscapeCheckEH = (findDisplay 49) displayAddEventHandler ["KeyDown",
{
_key = _this select 1;
if(_key == 0x01) then {

 call tzrn_fnc_escapecheck;

};
true

}];
"TZR-Client Keydown added (ESC)" remoteExec ["diag_log",2];

#

no idea why this happens,keydown eh will also not be added,it seems

#

did that for display 46 as well,just sayin

#

alternative would be ```sqf
//check if pause menu is open
while {alive player} do {

_display = (findDisplay 49);
waituntil {(findDisplay 49)};

if (!isnull _display) then {
[_display] call tzrn_fnc_onEscape;
};
sleep 0.2;
};```but i want to avoid having more whiles than necessary

mellow pier
sturdy cape
#

i want it to be addon side

mellow pier
#

(findDisplay 46) displayAddEventHandler ["KeyDown","
if ((_this select 1)==1) then {
player sidechat 'Esc key pressed!';
[] spawn {
waituntil {!isnull (finddisplay 49)};
hintsilent 'display 49'
}
}
"];

#

that what you looking for?

sturdy cape
#

basically yes

#

trying another thing right now

tough abyss
sturdy cape
#

uh nice thanks

sturdy cape
#

@tough abyss that did the trick,much love man

cold pebble
#

is onGameInterrupt called always when abort menu is triggered, or is there any other occassion?

tough abyss
#

Just when that menu opens

cold pebble
#

๐Ÿ‘

#

cheers

spring stone
#

Hey I have a question:
I want to insert the content from another file (.sqf, .txt....doesn't matter) into a script.
What I want to do is that I have a BIS_fnc_selectRandom and the Array for the randomization is safed in a seperate file (reason for that is that I need this array in many different scripts)

I know that #include is technically used for that but this does not seem to work in .sqf scripts (at least my testing didn't work)

still forum
#

!issuewarning @hushed mirage crossposting (this is your second warning....)

lyric schoonerBOT
#

Done.

still forum
#

@ivory lake setVariable > with namespace do

#

@spring stone yes #include is the way, and yes it works
BIS_fnc_selectRandom No.
selectRandom <--

ivory lake
#

yeah - I just suggested do if more needs to be done in it

still forum
#

I already told that Ezcoo tho ยฏ_(ใƒ„)_/ยฏ

tough abyss
#

@spring stone too can preprocessFile then compile it then call it if all it contains is array

storm sierra
#

Anyone know how to replicate the linearConversion to another coding language?

tough abyss
#

Or you can store array in parsingNamespace or even as mission config property, there many ways to skin a cat

#

@storm sierra look for lerp function in other languages

robust brook
#

Is it possible to add an event handler to a cruise missile so when it detonates , certain code runs on the detonate pos?

storm sierra
#

facepalm myself, thanks @tough abyss xD

dim kernel
#

how can i disable "kill me" from chat

plush oriole
#

what

still forum
#

what?

dim kernel
#

in chat if u type kill me

#

it kills u

hollow thistle
#

what?

#

It must be added by scripts wherever you're playing.

robust brook
#

What mission/server are you playing @dim kernel

manic bane
#

I put 'player setVariable ["something", "anything"]' on my code and that "something" is alive even after respawn. That is what I wanted but why? Isn't variable destroyed when object is gone?

restive leaf
#

infiSTAR is one addon that adds the kill me functionality

#

and afaik you can only remove that functionality by modifying the code in A3AH.sqf

still forum
#

@manic bane some thing get auto transferred on a respawning player

#

like variables

manic bane
#

didn't expect that. Thanks for answering.

tough abyss
#

@dim kernel why disable, you canโ€™t control your suicidal urges? ๐Ÿ˜‚

restive leaf
#

To be fair, iirc with infiSTAR it will suicide you if you type that anywhere in a chat message ๐Ÿ˜‰

#

So... "Thank God he didn't kill me!"... Boom, dead ๐Ÿคฃ

#

But to disable it you have to remove those lines or modify the string check in A3AH.sqf rather than via a config variable

tough abyss
#

Thatโ€™s just bad design, and people pay money for it?

winter rose
#

people pay for shittier things ยฏ_(ใƒ„)_/ยฏ

hollow thistle
#

Life. bloblurkinglenny

winter rose
#

wait, IRL, or the mod server ๐Ÿ˜„

tough abyss
#

I guess those that canโ€™t, pay

rough heart
#

@restive leaf you talking about the infistar a3 normal/exile version?

restive leaf
#

Vanilla version. Don't do Exile

marble thistle
#

Is there any Information on reliably RemoteExec to someone even tho they tabbed out?

#

Without nopause ofc

winter rose
#

so far, none I know

marble thistle
#

Ok ty

wind sapphire
#

I am looking for any tips on locality for waypoints. For example, when a group is transferred to a client or HC, and a script is executed on WP completion, where does it run and what constraints are there on it.

vernal venture
wind sapphire
#

there is some info on respanw configuration on the wiki.

#

there is also an event handler you can add to the object

vernal venture
#

Yeah, I tried class CfgRoles and it just errored out. Probably because I'm pulling loadouts from the player's locally saved loadouts

plush oriole
#

What are you using?

vernal venture
#

That's in initPlayerLocal

plush oriole
#

Oh I thought you meant you were using cfgRoles config

vernal venture
#

Yeah, no. Which is probably why I'm running into issues.

plush oriole
#

ah i see

#

you can't use a config because it's dynamic?

vernal venture
#

I suspect so. I'm still somewhat a novice at this.

plush oriole
#

actually did you give me the right thing?

#

that script seems to be to do with respawn loadouts

vernal venture
#

Yes

plush oriole
#

ok

vernal venture
#

I'm trying to set the role while still letting people use their own saved loadouts.

jovial patrol
#

anyone know how you can have "Type bool, excpected bool"

#

The error only accurs when on a dedicated server

hollow thistle
#

if a command that returns bools receives nil it will return bool typed nil

jovial patrol
#

ah thank you!

real mango
#

Hi everyone!
I'm looking for some insight on thread-safe communication within ArmA.
I have some critical region where separate threads access shared data which is both read and written by each thread.

My initial approach was to use a MutEx lock, so that if a thread is within the critical region, all the other threads are locked out.
It looked like:

waitUntil{isNil "lock"};
lock = true;
// < insert critical region here >
lock = nil // lock = false

But then I realized that this kind of lock is completely wrong, as it stops multiple threads the first time, but when they are able to exit the waitUntil block, there's no stopping.

Eventually, my lock became:

while {!isNil "lock"} do { uiSleep 0.05 };
lock= true;
// < insert critical region here >
lock= nil;

But I'm still super skeptical about this. Any advice?

TL;DR: How do you make a part of your code run by only one thread at a time?

winter rose
#

about how you did, with a public variable if you cannot afford to use a private var

real mango
#

Not really viable to have a private var shared between two threads, or is it? ๐Ÿ˜ฎ

winter rose
#

With a prefix, ideally

No not possible; well you could pass an array reference, or an object (but it may be a bit overkill)

real mango
#

What I meant is that each thread would have its own private var, which is not what I'm after ๐Ÿ˜›

#

And my aim is that if I have ten threads starting simultaneously, I want the threads to go through some section only one at a time. This is critical for processing requests ๐Ÿ˜’

winter rose
#
AROMA_ThreadLock = false;```
real mango
#

:woot:

winter rose
#

it is the simplest, a global flag

real mango
#

So it would be as I described above?

winter rose
#
waitUntil { not isNil "var" && { var } };```yeah
real mango
#

as I said, I don't think waitUntil will work ๐Ÿ˜ฆ

winter rose
#

Why not?

real mango
#

because it's blocking at the beginning of the code

#

but after that

#

when var becomes nil

#

several threads at the same time may read it and exit

#

and resume execution together

#

the while I used is aimed to prevent that

#

so that the condition is checked "twice"

winter rose
#

you can set a sleep at the beginning of the waitUntil if you want

real mango
#

as soon as it evaluates to true, it will quit the block I'm afraid

#

but maybe it's the same

#

I don't really know at this point with SQF ๐Ÿ˜„

winter rose
#

well, that's the point
just that the scheduler shouldn't make them all trigger at once; make tests to be sure (and/or use unscheduled)

#

I don't know much more, given I am about to sleep ๐Ÿ˜„

#

Good luck!

real mango
#

Same same

#

Thanks!

#

for the help and all, gn o7

winter rose
#

o7

tough abyss
#

@real mango you have probably been misinformed. There is no "at the same time" in SQF, everything runs either unscheduled or scheduled. When unscheduled code runs everybody waits, scheduled code time shares. What you can run into is that a spawned script can suspend in the middle of execution while another script starts executing, and there is no way of telling when suspension will happen or if it will happen. For this exact reason nothing you proposed is going to work.

wind sapphire
#

reference missionNamespace? might work but probably not.

cloud drift
#

Hey all, So i'm starting to get into scripting for missions and i'm looking for a good guide or video series to get my toes wet with the syntax (My background is mainly in C, Java, and Python) anyone have recommendations?

still forum
#

@hasty violet where is init file called from?
@real mango https://github.com/michail-nikolaev/task-force-arma-3-radio/blob/master/addons/core/script_macros.hpp#L96
But that isn't 100% safe either.

@real mango here is a variant that should be safe.

waitUntil {
    private _hasLock = false;
    isNil {
        if (!MUTEX_isLocked) then {
            MUTEX_isLocked = true;
            _hasLock = true;
        }
    };
    _hasLock
};

<code>

MUTEX_isLocked = false; //No need to make this part safe

@cloud drift can't think of literally any "good" guide to scripting. The barely acceptable video guides are so out of date that they are basically useless and teach you wrong stuff.

#

Yep

#

you shall not suspend in postInit

winter rose
#

spawn is ok, new thread

#

just don't waitUntil scriptDone ๐Ÿ˜„

still forum
#

Yes that is fine

#

in that case you are not suspending in postInit

real mango
#

@tough abyss As long as there is a scheduler (and thus preemption) there is going to be concurrency. Even if two threads never run at the same time (means little to no parallelism), it does not mean that there is not going to be concurrency.

Imagine two threads (T1 and T2) running the same script that just read a global variable into a private one, increase it and store it back:

// my_var is global and has value 0
private _var = my_var;
_var = _var + 1;
my_var = _var;

There can be instances where these two threads cause a very unexpected result. Why? Because the order of execution may be very different from what you expect.

A naรฏve (or optimistic) person may think that execution looks like:

T1 reads my_var = 0
T1 changes _var = 1
T1 writes my_var = 1
T2 reads my_var = 1
T2 changes _var = 2
T2 writes my_var = 2

But this is only one of the main different ways this can be run:

T1 reads my_var = 0
T2 reads my_var = 0
T2 changes _var = 1
T2 writes my_var = 1
T1 changes _var = 1
T1 writes my_var = 1

Which is clearly a wrong result ๐Ÿ˜›

@still forum I'll give it a shot, I hope you're right ๐Ÿ˜ƒ

I'll write some tests with hundreds of threads to check the results of all these different approaches, will let you know.
This might be some interesting (advanced) stuff for the wiki btw ๐Ÿ˜ƒ

cloud drift
#

@still forum ouch. Any decent resources with good documentation on the basic syntax atleast? I know i cant dec a for loop

for(User user : userList){

}

in sqf, but i cant say i know the correct syntax for an iterative loop through a collection.

#

I just dont want to bog down the channel with stupid questions like that xD

still forum
#

This might be some interesting (advanced) stuff for the wiki btw
not really

cloud drift
#

@still forum
Sweet, thanks will do. Sorry if i drop stupid questions every now and again. .sqf syntax is weird.

Side note, how do you return variables. I've been looking through code and i'm not seeing any return statements.

still forum
#

the value that's left on the stack will be returned

#
1 //put 1 on stack
; //End of statement clears stack
_var = //2. take value from stack and move into _var, stack is now empty (SQF bug)
1; //1. put 1 on stack
1 // put 1 on stack
; //last end of statement in script block is ignored (Don't ask...)

So. 1 was left on stack at the end, 1 get's returned.

cloud drift
#

Wow thats funky, but it makes sense lol

#

Last question for the night. Any IDE's that have an SQF syntax filter. Using brackets atm and it's nasty for this language =p

winter rose
#

Visual Studio Code with SQF plugin is fine

cloud drift
#

sweet. I'll grab that thanks

tough abyss
#

@real mango Not sure why I deserved such long pointless reply. I told you the reason your result can be unexpected but you clearly not ready for realities of SQF.

winter rose
#

Thaaat's not the way to help him.

@real mango the (in)famous scheduler cycles through all running scripts and give them each some time to execute; so it can "pause" your script, as you may already know, to let other scripts run too.

The thing is that you can't know for sure that your script will not stop right after the lock check. So your script arrives to the waitUntil / while / whatever, there is no lock so let's enter the code, then BAM, script gets paused and another one is running, the other one does the same, enters the code, does its stuff, gets paused, back to the first one, and the first one is still allowed to do its code. This is why you cannot make a "thread safe" thing in scheduled SQF

still forum
#

This is why you cannot make a "thread safe" thing in SQF uh.. I just did tho. Posted above...

winter rose
#

I think you could, however, put all this in an unscheduled code with isNil

still forum
#

which is what i did...

winter rose
#

let me finish!!1!1!! ๐Ÿ˜‹

still forum
#

He is a programmer. I'm quite sure he understands how this stuff works mixed up Roamn and Scrub Sauce

winter rose
#

Edited, not in scheduled* SQF

still forum
#

This is why you cannot make a "thread safe" thing in scheduled SQF I still did tho...

winter rose
#

isNil is unscheduled

still forum
#

yes, the 34 lines of code are unscheduled

#

the rest is "thread safe" scheduled script with a mutex

winter rose
#

wait, you would put your code outside of isNil? Isn't there a chance that the scheduler pauses between waitUntil statements?

still forum
#

no

#

it cannot exit the first waitUntil while another script has already passed it and hasn't reset the isLocked variable

winter rose
#

I mean between private, isNil and the result

still forum
#

isNil is unscheduled

#

nothing can interrupt it

#

if _hasLock is true, noone else can obtain the lock anymore.

winter rose
#

well yeah, everything happens in isNil. My bad, my brain

tough abyss
#

BIS_fnc_spawnOrdered

still forum
#

Might aswell just use call then..

winter rose
#

he steals our ideas!
So KK back @ BI or what?

real mango
#

Thanks for the many responses!
Let the code speak for us, I'll try to come up with a decent test suite to test Dedmen snippet and see if anything goes wrong ๐Ÿ˜ƒ

#

Sorry if I'm a bit lengthy in my question/responses, I thought 9 lines weren't that much ^^

tough abyss
#

Might aswell just use call then..
not the same innit if you run in unscheduled and need a bunch of spawned scripts but executed in order

hollow thistle
#

Spawn one and do calls inside

tough abyss
#

what if you need to spawn from different scripts?

hollow thistle
#

Then the queue thingy function kinda makes sense.

austere silo
#

hello party ppl. i have a question regarding headless clients. wich ip adress i need to write in the serfer cfg? on the turtorial said: headlessClients[] = { "xxx.xxx.xxx.xxx", Note however, that you need to replace โ€˜xxx.xxx.xxx.xxxโ€™ with the actual IP address of your headless client!

#

my stupid question: from were i get the IP adress from that headless client?

tough abyss
austere silo
#

thx for the quick response

#

and sry for wrong posting

modest temple
#

does someone know how to script the chemical detector added by contact?

cosmic lichen
#

There's not much to script. Just a variable one can set to change the displayed value.

cold pebble
#

oops

#

sorry

#

didn't meant to send it here ๐Ÿ˜„

winter rose
#

hehe, ninja'd ๐Ÿ˜„

cold pebble
#

๐Ÿ‘

dull drum
#

I've spent some time at the #arma3_ai it's dark and cold there, So I've returned with some strange questions.
I need a visual effect on one of my AIs. The setParticleClass thing effects locally. As many many other things that I apply via remoteExec if I need them to be seen or applied on multiply of machines. So the question: is there any good snippet or way to wrap the code to the function or .sqf that will execute everything inside a parameter set to be applied with remoteExec?

#

Like take all this code and apply each command through remote. Or even apply through remote if it is needed.

still forum
#

second definitely no.
first.. I think.. no? Can't really imagine what you need

dull drum
#

To avoid bothering about the locality.

#

And just go "ok I need this set of script commands to effect everywhere" without setting remoteExec for each of them

hollow thistle
#

wrap it in a function?

#

or do it via events?

dull drum
#

Will it give a remote context to everything inside?

hollow thistle
#

I have no idea what do you mean by remote context

dull drum
#

Give me a sec

#

Like

CUS_fnc_name  = {_this select 1 lightAttachObject [_this select 0, [0, 0, 0]];}
[_this, _lightsrc] remoteExec ["CUS_fnc_name", -2, true]
#

Will the lightAttachObject work on all machines except server?

#

If i'll run it within remoteExeced function?

hollow thistle
#

If the targets have function in CUS_fnc_name global then yes.

#

I have no experience with lights. It is possible that you might need to create the light locally on every client.

dull drum
#

It goes via createVehicle which is Ag Eg

#

but if it wouldn't be so, just

CUS_fnc_name  = {
_l1 = "#lightpoint" createVehicle getpos _this select 0;
_l1 lightAttachObject [_this select 0, [0, 0, 0]];}
[_this] remoteExec ["CUS_fnc_name", -2, true]```
 could do the trick, right?
#

The question is basically not about the particular light creation, but about creating a functions that run everything inside as a remoteExec

hollow thistle
#

There is no such thing as run everything inside remoteExec

#

By remote executing [<args>] remoteExec ["CUS_fnc_name", -2, true]

#

you tell all the clients to execute code stored in CUS_fnc_name global

#

with given args.

#

so the client "takes" code from CUS_fnc_name and executes that.

#

also remoteExec = spawn, remoteExecCall = call

dull drum
#

Yeah, sleeps and waits for spawn

#

Now I get why fnc_RyanZombies_DoMoveLocalized = compileFinal "_this select 0 domove (_this select 1)"; is set up this way. Thanks, @hollow thistle

#

I will return to the darkest and slimiest AI rabbit holes

exotic tinsel
#

Any ideas on what i might be doing wrong on my server that prevents custom faces and voices from playing/loading. We prevent all client side mods, if that might be the reason.

robust brook
#

is there any way to call in a cruise missile? on a specific pos?

#

without laser

dull drum
#

@exotic tinsel could it be just the thing with locality? How and where do you run your script? Like if it runs server only nobody will see anything.

exotic tinsel
#

server only

dull drum
exotic tinsel
#

I have a massive server side addon, i know how to remote exec and all that its just this issue with players custom faces and voices not working and causing arsenal issues. I have been told this is an arma bug and to wait for hotfix but i want to understand it so i can try to create a solution now. i have written alot of scripts to correct arma bugs so this is no different i just need to be pointed in the direction of the causes so i can start to formulate a solution. PLZ ANYONE point be at why arma is having this arsenal issue so i can implement a solution before arma does. half or a lil less of our 300 players are having this 'novoice' arsenal bug and that tells me its something im doing on my server.

spice axle
#

use ace arsenal

restive leaf
#

Massive server side add on... life server?

vapid ledge
#

Hey there guys. I'm doing an operation soon that may require a man to be on drugs that numb his pain and make him 3 times more damage resistant than the ordinary dude.

From my limited understanding of how Arma 3 coding (and ACE3 coding by extension) works, the following code makes it so every hit, no matter what, does 2% of the unit's health.

Unit addEventHandler ["HandleDamage", {false}];

Unit addEventHandler ["Hit", {Unit setDamage (0.02 + getDammage Unit)}];


I just want him to be more resilient to damage and near invincible to pain. Anybody have any how to go about this?

hearty plover
#

hmm

#

So, I have a event handler that fires when a units state is changed from X to Y.

#

I also have a loop that listens for when a unit dies, or is the last man in a unit.

#

I would like to extend the loop to ALSO switch based off a variable that can be set in the event handler.

still forum
#

@exotic tinsel

so i can implement a solution before arma does
It was fixed last week. So you're a little late on that.

crisp cairn
#

Hey guys, I'm making addAction using ACE. I am wondering how do I execute a function/script within one?

spice axle
#

A little more details pls
In a Mod?
In a Mission folder?
In the debug console?

still forum
#

addictions? what does that mean?

winter rose
#

@still forum I suppose addAction ๐Ÿ˜„

#

that or morphine abuse, IDK

still forum
#

Not sure if ACE has addictions in medical rewrite, I suppose not. But you can overdose

tough abyss
#

it means while {ace_syringe} do {player action ["Inject"]}

random crescent
#

@still forum no it does not because that would be stupid. You don't get addicted that quickly.

still forum
#

guess we'll have to wait till the user that went offline right after asking a question comes back online then

autumn stone
#

can somebody tell where i can change the respawn time in Alive

#

?

dull drum
#

Are there any good ways to cancel an RPG reload animation while moving? (and not just set it to feed infinite or excessive ammo)

winter rose
#

setDamage

dull drum
#

like kill an RPG bearer? ๐Ÿ˜ƒ

winter rose
#

yeah ๐Ÿ˜„
joke aside, I would remove/add ammo, this might not cancel the animation but the reload would have to be replayed

#

else: disable running/sprinting if reloading, this way they can only slowly walk

dull drum
#

The thing is I want to prevent soldier from stopping while reloading. I can feed ammo directly without any reloads but... it would be great to save an animation.

winter rose
#

or setAnimationSpeedCoef to zero so they can't move while reloading, OFP style (oh the nightmares)

#

wait, what do you want to do?

dull drum
#

exactly what I said - to prevent soldier for being stuck while reloading an RPG ๐Ÿ˜ƒ

#

Not to stop him, but vice versa

#

like if move is playing just continue to run please would ya?

winter rose
#

Are there any good ways to cancel an RPG reload animation while moving?
didn't understand that this way ^^

you would need to intercept the reload action and add the magazine by script yes

dull drum
#

Oh. And by intercepting do you mean to catch that reload is in progress or reloadrpg animation is in progress?

winter rose
#

I would say before that, the 'R' or 'reload from menu' action
there might be an EH somewhere for this

dull drum
#

On a key press?

winter rose
#

I don't know, the wiki might help you here

dull drum
#

Ok, thanks!

quartz coyote
#

Damn just read the change log : isn't that gonna cause a lot of problems ?

waitUntilย will now continue looping when incorrectly returning something instead of true / false, and show a warning. We strongly recommend fixing scripts however, because we intend to force exiting the loop again in 1.96.

still forum
#

That thing is a revert of what was currently ingame

#

pre hotfix waitUntil errors and exits

#

now it just throws warning and continues as normal

quartz coyote
#

I see

dull drum
#

Are there any legit ways to force open GPS for players? Like simulate rctrl+m press or something?

crisp cairn
#

Sorry, I wrote that when I just woke up haha. I am looking at executing a function through an ACE Addaction. Using a SQF within a mod

still forum
#

what is a ace addaction?

#

you mean ace interaction menu?

winter rose
#

@dull drum showGPS maybe?

astral tendon
still forum
#

that's what it says, yes

dull drum
#

@winter rose it's kinda deprecated or something

winter rose
#

@astral tendon well, yeah ๐Ÿ˜„

astral tendon
#

Even on the remoteexec?

spark turret
#

hey i get this in my cba_settings.sqf:
ace_interact_menu_useListMenu = true;
but its overwritten by clients, how do i force the mission settings over clients?

winter rose
#

@astral tendon it doesn't say "only local", it specifically says "it only works in single player"

#

@astral tendon though it might work for an AI, but definitely not for a player.

astral tendon
#

Well, no way to test that now.

winter rose
#

if you get more info, ping me so I can update the wiki

astral tendon
#

Sure.

winter rose
#

@dull drum then I don't know. maybe with some display magic

dull drum
#

I wonder if there somewhere lies a secret tome on managing the existing UI via scripting ๐Ÿ˜ƒ

ivory lake
#

atleast in arma 2 you oculd get it to work in multiplayer on a player if you had it apply very-very-post-post-init. after the player had loaded in and their identity applied

#

scratch that i think i'm thinking of setIdentity

exotic tinsel
#

@still forum so again, its something im doing on my server. what things would cause this issue, no custom faces loading and getting the error on trying to load arsenal items. error 'novoice'? please help me out mate. thats why we are all here. Im looking for understanding of why its happening so i can work backwards to find what im doing to cause the problem.

astral tendon
#

How to make a diferent lose screen when the tickets of a teams reachs zero?

winter rose
tough abyss
#

@exotic tinsel have you updated to hotfix? Sounds like you didnt

exotic tinsel
#

i update the server every day

exotic tinsel
#

@tough abyss any other ideas why its still happening?

hearty plover
#

Sounds like this is a server problem and not a scripting problem.

still forum
#

@exotic tinsel install the hotfix from today :U Come back when you double checked that you did

exotic tinsel
#

yes the hot fix today fixed it. thank you arma and you guys for the help.

hearty plover
#

Glad it's sorted.

waxen tendon
#

put everything in mission to array?

hearty plover
#

?

dull drum
#

It just sounded like a phD dissertation theme shortened :)

still forum
#

!purgeban @fast jackal 0 spambot

lyric schoonerBOT
#

*fires them railguns at @fast jackal* ร’_ร“

waxen tendon
#

how do i put everything in the entire mission to an array?

still forum
#

what?

restive leaf
#

I have no clue...

surreal peak
#

@waxen tendon do u mean the SQF file?

#

or like all objects into an array?

winter rose
#

maybe the mission export script?

surreal peak
#

or just a forEach loop with the terms being a bunch of different objects and append that into an array

vague harness
still forum
#

"multiplayer dynamics groups" what's that?

vague harness
#

when you press U

still forum
#

never seen that

#

but yes. leader is the script command to find the group leader so that's probably used in there

vague harness
#

Alright and if I want multiple conditions to be met to call a script is this syntax correct: if ((side player = west)(leader group player == leader player)) then

still forum
#

no

#

you need to use and or &&

#

also leader group player is always equal to leader player

vague harness
#

Alright

still forum
#

also the first one the = is an assignment, needs to be a == comparison

vague harness
#

if (player = leader) ?

still forum
#

again, equal instead of comparison

#

you want to see if player is the leader of his group?

vague harness
#

Yes

still forum
#

then leader player == player

#

if player leads himself, he's the group leader

vague harness
#

Ah ok I understand the = and == now

#

if (side player = west) and (leader player == player) then

still forum
#

= /== ;)
besides that yes

vague harness
#

๐Ÿ˜†

#

if (side player == west) and (leader player == player)

#

๐Ÿ‘Œ๐Ÿผ

waxen tendon
#

i need every object in the mission; added to an array.

cosmic lichen
#

pushBack?

still forum
cosmic lichen
#

entities can work too and might be faster

still forum
#

too*

cosmic lichen
waxen tendon
#

THANKS

#

allMissionObjects is what i wanted

cosmic lichen
#

๐Ÿ˜„

restive leaf
#

Hopefully just running at the beginning of a mission...

waxen tendon
#

yes

#

also why sould i not run it multiple times?

#

not that i will but i am curious now

still forum
#

as the wiki says, it's slow

restive leaf
#

Because objects created during the mission will be added. For example, if you use ACE3 and are wounded then the blood drops are mission objects too

#

And what Dedmen said

hearty plover
#

The blood drops are mission objects.

#

Hmmm, something to think about.

still forum
#

should be simple object now in new ace (next ace)

hearty plover
#

Still ain't got into that darn slack.

#

D:

restive leaf
#

Is that going to be the same for all medical trash @still forum ?

hearty plover
#

Id hope it's for anything ace drops, would be nice on the pref

manic bane
#

When I switch player unit with selectPlayer, every actions and scripts that work with previous player unit are terminated. Is there any good way to reinitialize?

hearty plover
#

How are you using selectPlayer

manic bane
#

I create new unit on current unit's position, and execute selectPlayer and remove previous unit.

hearty plover
#

Can you not re-init via the init argument in createUnit?

#

Or do you have to do it when the slectUnit is done.

manic bane
#

I think I have to do it when selectPlayer is done.

hearty plover
#

The real issue is locality is going to be pretty hard to troubleshoot.

#

The best way is to wrap the startup / reinit into a function that you remoteExec on the unit you are going to select into, and do it before you selectPlayer, or after you selectPlayer, and you know it is done, IE player has control, then you call that init script on the players new self.

#

Having a hand doPlayerInit wrapper function would make this a bit easier on you for certain tho.

manic bane
#

I think to use selectPlayer properly, I should make whole mission to work after selectPlayer.

#

while loop are keep running but EH and action are completely broken when I use selectPlayer.

vague harness
#

@still forum reference my last question, when I have multiple conditions separated with "and" these add up? they have to be all met for the script to continue?

#

and "or" is for one or another

vague harness
#

Okay please don't laugh ๐Ÿ˜† but this is the script I came up with and ofc it does not work. It's probably all fked up

#

waitUntil {!isNull player};

_unit = _this select 0;

if (side player == west) and (leader player == player)
then {_unit addAction ["Deploy FOB","_num = player nearEntities ['Man',15]; if(count _num >2)
then{['Deploying Platoon Rally Point',10] spawn HGF_fnc_progressBar;
sleep 10;
_fobarray = "Land_MedicalTent_01_NATO_generic_inner_F" createVehicle position player;
[west,player,FOB] call BIS_fnc_addRespawnPosition;)}
else {hint 'Need more allies nearby to deploy FOB'}","",1.5,false,true,"","_this == _target"];

_fobarray = _fobarray select 0; if (side player == east) or if (side player == independent) then addaction "Destroy FOB", deleteVehicle _fobarray; _fobarray call BIS_fnc_removeRespawnPosition;
};

vague harness
#

replace the multiple and with &&?

tough abyss
#

no go read wiki

coarse schooner
#

Try this:

waitUntil {!isNull player}; 

_unit = _this select 0;

if ((side player == west) and (leader player == player))
then {_unit addAction ["Deploy FOB",_num = player nearEntities ['Man',15]; if(count _num >2) 
then{['Deploying Platoon Rally Point',10] spawn HGF_fnc_progressBar;
 sleep 10;
_fobarray = "Land_MedicalTent_01_NATO_generic_inner_F" createVehicle position player;
 [west,player,FOB] call BIS_fnc_addRespawnPosition;)} 
 else {hint โ€œNeed more allies nearby to deploy FOBโ€};
 
 _fobarray = _fobarray select 0; if ((side player == east) or (side player == independent)) then {player addaction ["Destroy FOB", {deleteVehicle (_this select 0)},[_fobarray]]; _fobarray call BIS_fnc_removeRespawnPosition;
 };

I just added some parenthesis and removed some syntax problems. Do read the wiki though a lot of the problems are very simple and could have been avoided.

tough abyss
#

You could see by highlight it wont work

coarse schooner
#

Sorry Iโ€™m on my phone highlight doesnโ€™t show lol

#

I think I fixed the things I missed?

vague harness
#

Thanks, if i'm in the editor can I exec it in the tab there?

#

server exec?

coarse schooner
#

No

tough abyss
#

no it is not fixed

vague harness
#

^

#

should _unit be player instead?

#

line 4

tough abyss
#

No it is FUBAR sorry

coarse schooner
#

Looking at this on my computer I now have almost no clue what this supposed to do but @vague harness I'll dm you with my attempt at fixing this so we don't spam this channel with simple things.

vague harness
#

Any suggestions on why it's doing this?

chilly wigeon
#

leader player returns the player's group's leader

#

leader group player does the same

#

the issue is you're comparing the same value always

vague harness
#

Ah

chilly wigeon
#

you're probably looking for leader group player == player

vague harness
#

let me see if that works

#

No errors, but still shows true when player is not a leader

chilly wigeon
#

hmm

vague harness
#

I tried groupOwner too but I am not sure how to use that one

#

Maybe when a player is ungrouped it still registers him as a leader

chilly wigeon
#

Well, every unit is always in a group

#

When you leave a group, you're just joining a new empty group

vague harness
#

Alright, is it possible to be a leader of said empty group

chilly wigeon
#

Pretty sure, yea

vague harness
#

Dammit arma

#

or (formationleader player == player)

#

That shows true too...

chilly wigeon
#

yea, not quite sure myself what's going on now

vague harness
#

I am not quite good enough in code to do this but can you use _clientID = groupOwner _someGroup; to find out which ID of clients have a group and then allow these to the addaction

minor surge
#

hey guys, quick question. didnt arma 3 wheeled helicopter were able to taxi at some point?

vague harness
#

you can land with speed and roll

#

I've never seen taxiing

minor surge
#

umm that weird i could swear back in the day I even saw a video. like it had a break and if you release it it moved forward

#

maybe i m getting it confused with takeonhelicopters

#

but thx for the response

vapid wadi
#

Hello, Im working with some old code here and I heard that code like this: waitUntil {(player getvariable "loaded") == 1}; is deprecated or was always not correct, but now it shows as an error and makes it unuseable, how could I use this in a correct way?

#

this is what its throwing in my client rpt

#
 3:25:53 Error in expression <aituntil {(player getvariable "loaded") isEqualTo 1};
player allowdamage true;
[>
   Error position: <isEqualTo 1};
player allowdamage true;
[>
   Error Undefined behavior: waitUntil returned nil. True or false expected.
still forum
#

@restive leaf

Is that going to be the same for all medical trash
I hope so. Should be.

@vague harness

when I have multiple conditions separated with "and" these add up?
Yes. Just read like english.
condition1 and condition2 and condition3
Exactly like in the english language. Only happens if all conditions are true.
Also I'd really recommend to do
if cond then {
<code>
} else {
<code>
};
Instead of
if cond
then {<code>
<code>}
else {<code>
<code>};

๐Ÿค”

I have this as a condition for an addaction (leader group player == leader player)
I already told you yesterday why that makes no sense.
groupOwner is not what you are looking for. leader player == player like I already told you yesterday is the right thing to do.

foggy charm
#

@vapid wadi "loaded" is not defined on the client at the moment this is executed. You need to initialize it prior to using the check

vapid wadi
#

Alright, thanks Ill take a look

still forum
#

@vapid wadi if you update your arma to the last update it shouldn't error anymore. Just throw a warning.
No your code is not deprecated and wasn't "always not correct" either.

#

Use getVariable with a defaultValue

#

which will have the same exact result as your undefined variable

#

The waitUntil "fix" tried to fix some infinite loops, which you probably don't have there, you are just waiting for the variable to be defined

#

The fix is such a idiotic idea.
They wanted to fix infinite loops, now scripters will fix their scripts, and the same infinite loops will stay.
What's the benefit of that.

vapid wadi
#

When I set the loaded var on the player should it be a bool?

#

like ["loaded",1,true]

still forum
#

isEqualTo 1 is checking whether it's a number which is 1.
so, no a number

vapid wadi
#

ok so it should be false?

still forum
#

what?

#

false is also a bool

vapid wadi
#

how should I use the setvariable

still forum
#

I guess you would set it to 0

#

until whatever "loaded" means happens

#

unless 0 is also a valid value which has some meaning in which case you might want -1

#

can't know what to set it to without knowing what your code does

vapid wadi
#

I mean should I do player setVariable ["loaded",1,false]; when im trying to set it or player setVariable ["loaded",1,true];

still forum
#

depends if you need it globally or not

#

can't know what to set it to without knowing what your code does

#

You wrote your code, so only you can know what you need

tough abyss
#

@vapid wadi use waituntil{player getvariable ["loaded", 0] == 1}

spark turret
#

how performance intensive is it to repeatedly set public variables for units?

#

f.e. i have that in a fired EH for each unit of an 8 to 12 man group:

_unit setVariable ["IRON_EH_Fired_Time",time,true];
winter rose
#

aaand since it's on "fired", I suppose it is ๐Ÿ˜

spark turret
#

aonother thing: if i set the "public?" boolean to false, can i still call it from another script running on the same localitly?

#

to keep the network free

tough abyss
#

what is the reason you want to broadcast it

winter rose
#

yes of course

#

there is no need to broadcast it if the usage is local

#

(besides potential teamswitch / local code that would use "player" var)

spark turret
#

i dont have a reason to broadcast it publicly, other than that its used to determine if the group is in a firefight which triggers other stuff. its part of my "trenchAI" script

winter rose
#

maybe have usage of the time variable so it would set it to true if more than say 5s passed

spark turret
#

i thought of that too, but for that i have to use "getVariable" which i assume has the same perfomance impact as just setting a new one

tough abyss
#

fired fires on all pcs where it is added, there is no reason to broadcast it you just going to saturate network for no reason

spark turret
#

the EH is server local only since the script runs on server and all units are server local ai too

tough abyss
#

and where do you need to know if unit is fired?

spark turret
#

only on the server it seems

tough abyss
#

well then there is 0 reason to broadcast it

spark turret
#

changed it to that:

if (_unit getVariable ["IRON_EH_Fired_Time",time] + 5 < time) then {
_unit setVariable ["IRON_EH_Fired_Time",time,false];
};
tough abyss
#

you dont need to set it to false, it is false unless you set it to true

spark turret
#

i honestly doubt that the 5 second intervall check is less performance intenstive than just resetting the varibale each shot, now that broadcast spam is out the window

unborn ether
#

@spark turret As for me, it's better to keep it local and grab it by onrequest style, aka RE<->RE when it's needed. Well ofc if it's not an unconditional situation.

spark turret
#

for that one i dont need broadcasting at all actually

#

but will keep in mind, i can think of at least 3 EH that overbroadcast in other scripts atm

still forum
#

setVariable costs essentially nothing performance wise

#

and getVariable a little less

#

it's nothing you should ever worry about

#

Only problem might be network spam, if you send it over network, which you don't anymore

#

If only the server needs it. you can also do
_unit setVariable ["IRON_EH_Fired_Time",time,2];
which will only set it locally and on the server

spark turret
#

ah didnt know you could sort by that, cool

still forum
#

You still send quite a bit of networking stuff to the server, but not broadcasting to everyone should already make it good enough

vague harness
#

@still forum ```@Grahame

Is that going to be the same for all medical trash

I hope so. Should be.

@Atlas

when I have multiple conditions separated with "and" these add up?

Yes. Just read like english.
condition1 and condition2 and condition3
Exactly like in the english language. Only happens if all conditions are true.
Also I'd really recommend to do
if cond then {
<code>
} else {
<code>
};
Instead of
if cond
then {<code>
<code>}
else {<code>
<code>};

thinking

I have this as a condition for an addaction (leader group player == leader player)

I already told you yesterday why that makes no sense.
groupOwner is not what you are looking for. leader player == player like I already told you yesterday is the right thing to do.``` Thanks, didn't quite understand but I do now. Although It works, it's wierd that leader player == player always return true even when the player is not group leader. Any idea why?

#

I have it in onPlayerRespawn, could that be an issue?

still forum
#

"even when the player is not group leader" are you sure he isn't?

#

how do you check that he isn't?

#

how many other players/ai are in players group when "the player is not the group leader" ?

vague harness
#

I have tested with a squad leader grouped to a few subordinates and I have tested the subordinates and even 1 player alone thats is technically a group leader in a group with only himself is the way I see it as. That's the way I understand it anyways

winter rose
#

group leader = you can give orders (or you're alone)

vague harness
#

Another way I thought of doing it was to use groupOwner and find the id's of player who are group owners, make that into an array and then use that as a condition. Unfortunately I cannot figure out how to do just that.

winter rose
#

groupOwner means network owner, nothing to do with in-game leader notion

vague harness
still forum
#

if the player is alone in group, he's the leader. I guess he doesn't have a group after respawn (not having a group doesn't exist, not having a group is equal to being in a group with only yourself)

vague harness
#

I thought so too

vapid wadi
#

@tough abyss โค

real mango
#

Hi guys, sorry for yet another question!
I'm struggling a bit with Preprocessor commands:

#define QUOTE(var1) #var1

#define SV_DEFAULT(VAR_NAME, DEFAULT)\
if (isNil #sv_setting_##VAR_NAME) then {\
    sv_setting_##VAR_NAME = profileNamespace getVariable [QUOTE(sv_setting_##VAR_NAME), DEFAULT];\
}```

I defined a macro as this. What I would ideally want looks like:

```sqf
if (isNil "sv_settings_VAR_NAME") then {\
    sv_settings_VAR_NAME = profileNamespace getVariable ["sv_settings_VAR_NAME", DEFAULT];\
}

but instead I get this:

if (isNil "sv_setting_"VAR_NAME) then {    
    sv_setting_VAR_NAME = profileNamespace getVariable ["sv_setting_##VAR_NAME",  DEFAULT];
};

The if condition and the profileNamespace variable name have the same formatting but I was attempting two different ways.

Anyone knows how to achieve this? ๐Ÿ˜ฆ

surreal peak
#

I'm trying to add the blood drops to be able to be seen as a marker by zeus using this code:

obj = allMissionObjects ""; 
systemChat str obj; 
Zeus addCuratorEditableObjects [obj,true ];
#

It adds everything, however the blood isnt showing up.

systemChat str obj; 

shows ace_drop_2.p2d

#

which I assume is the blood drop as im doing this in a virtual map

real mango
#

Not 100% sure but I don't think it's a zeus editable object ๐Ÿ˜ฆ

surreal peak
#

It should be if it is an object

#

is what im trying to add as an object

#

I just need to find the name of it so I can use the interaction feature of ace to use on it

real mango
#

tracks and stuff like that also doesn't count as "object" even though it is such

#

also craters and bullets holes I'm pretty sure you can't add them to a zeus interface even with your approach

surreal peak
real mango
#

then 100% not zeus interactible ๐Ÿ˜›

surreal peak
#

I should be able to use the ACE interation menu with it though?

real mango
#

on blood drops? I really don't know about that ๐Ÿ˜ฎ

surreal peak
#

I think I found the classname for the blood drop, thanks for telling me about the zeus not working for simple objkectrs

still forum
#

@real mango you made a QUOTE macro, but then chose to not use it for isNil?

#

I should be able to use the ACE interation menu with it though?
no, not on simple objects

real mango
#

as I explained below, it was a different way to approach it, since using QUOTE wasn't working

still forum
#

also prefer simpler names, var1 instead of VAR_NAME

#

not sure if _ is allowed in there

real mango
#

it is allowed fortunately ๐Ÿ˜„

#

for now I got it to work like this ```
#define SV_SETTING_INIT(VAR_NAME, DEFAULT) sv_setting_##VAR_NAME = profileNamespace getVariable [("sv_setting_" + QUOTE(VAR_NAME)), DEFAULT]

#

although everyone will agree that's ugly ๐Ÿ˜›

still forum
#
#define QUOTE(var1) #var1

#define SV_DEFAULT(varName, DEFAULT)\
if (isNil QUOTE(sv_setting_##varName)) then {\
    sv_setting_##varName= profileNamespace getVariable [QUOTE(sv_setting_##varName), DEFAULT];\
}

or

#define DOUBLES(var1,var2) var1##_##var2

#define SV_DEFAULT(varName, DEFAULT)\
if (isNil QUOTE(DOUBLES(sv_setting_,varName))) then {\
    DOUBLES(sv_setting_,varName) = profileNamespace getVariable [QUOTE(DOUBLES(sv_setting_,varName)), DEFAULT];\
}
winter rose
#

ouch, red

still forum
#

that's sqf highlight :u

real mango
#

cpp does the same ๐Ÿ˜„

#

QUOTE(sv_setting_##varName)

#

this doesn't work unfortunately

#

will produce "sv_setting_##varName"

still forum
#

not quite sure why, but above should work as workaround

real mango
#

i like the DOUBLES macro idea

#

will give it a try

#

looks promising

#
#define SV_SETTING_INIT(VAR_NAME, DEFAULT) sv_setting_##VAR_NAME = profileNamespace getVariable [QUOTE(DOUBLES(sv_setting,VAR_NAME)), DEFAULT]
#

works like a charm ๐Ÿ˜„

#

@still forum Arigatou ๐Ÿ™

surreal peak
#

How would I go about using either the ACE addAction OR the vanilla addAction and add that action to any object with a class name which is defined in a array

still forum
#

@surreal peak if you have CBA you can use initPost eventhandler with retroactive thingy set to true on a classname. Will fire eventhandler for each existing object of classname and all future ones

surreal peak
#

For reference, im trying to make a zeus module that once ativated will allow you to use either ace interaction or just the normal interaction (with addAction) in order to clean blood spots

still forum
#

yes you can add XEH handlers via script

surreal peak
#

I figured out how to get an array of the blood spots with

_blood = allSimpleObjects [ace_drop_1,ace_drop_2,ace_drop_3,ace_drop_4];
still forum
#

don't have time now to google for you

surreal peak
#

kk

#

is there any way to do something slightly less complicated? :p

#

My knowledge in coding stops at around Event Handlers and Class's , since I havent studied those in school and struggled to understand them

astral tendon
#

I think I already asked before but I cant find it here but how to remove ACE interaction from a unit?

exotic flax
#

disable ACE mod... disable keybinds from interaction menu...
or is there a specific interaction you want to have removed?

astral tendon
#

everything

exotic flax
astral tendon
#

Looks good.

spark turret
#

is there a function to make a player invisible inMP?

surreal peak
#

hideObjectGlobal true;

calm bloom
#

hello, comrades! I have my arma crashing when i try to createdialog or createdisplay RscDisplayOptionsVideo

#

Have anyone tried something simillar?

#

i do it like this ```sqf
[] spawn {disableserialisation; (finddisplay 46) createdisplay 'RscDisplayOptionsVideo'}

still forum
#

missiondisplay as parent is probably invalid

calm bloom
#

so i should change 46 to something else, right?

#

I am not too confident in display and stuff

tough abyss
#

Its an engine display you are not supposed to create it by script

calm bloom
#

yep, but it is the only way to force AA to player

#

any other setting can be configured

#

i am forceing ATOC so nobody can see through the trees

tough abyss
#

How do you mean

calm bloom
#

class CfgVideoOptions
{
class ATOCQuality
{
class Disabled
{
text = "$STR_A3_OPTIONS_DISABLED";
grass = 1;
oldTrees = 1;
newTrees = 1;
other = 1;
multiSampleCount = 2;
};

#

and also i switch AA listbox itself from control config (mean config.cpp from addon)

#

only thing left is to summon video dialog, so the guy with arma3.cfg
multiSampleCount=0; will get it too

tough abyss
#

What are you saying that you can hide trees with user setting?

calm bloom
#

No, you can make trees transparent like crap

hearty plover
#

Other than KK, what blogs do you guys follow?

#

Anyone else have some they recomend?

#

Asking in scripting, because I am looking for more arma scripting related blog content.

tough abyss
#

What just by choosing different video option?

calm bloom
tough abyss
#

Looks like ATOC should be OFF by default, the other one looks like crap