#arma3_scripting

1 messages ยท Page 193 of 1

fallen locust
#

And a engineOn EH ๐Ÿ˜›

lunar lichen
#

once the engine dies its dead, ive even broken vehs wen allowDamage is false, once this happens you cannot fix it

#

ive had this issue too

fallen locust
#

allVariables veh

#

and see whats what

#

or just list EHs on that vehicle

versed belfry
#

Heyo, quick question.

If I am checking a complicated condition once, and only once on mission start, does it still make sense to use lazy evaluation? or is it not worth it?

For context, the condition is:

// The macros SET is explained below, it simply is a global variable.
// SET(Lorem) -> AET_disclaimer_SET_Lorem
 hasInterface && SET(enabled) && !( SET(disable_in_editor) && is3DENPreview ) && !( SET(disable_for_admin) && IS_ADMIN )
warm hedge
#

Lazy eval works best when you use a frequent and performance heavy eval. In this case, there is not much impact to have it or not, so your preference matters more

lunar lichen
#

ive done it with the standard vehs nothing seams to bring it back

fallen locust
#

really?

lunar lichen
#

cant say i tired too hard tho ๐Ÿ˜›

#

yeh

fallen locust
#

Testing time

lunar lichen
#

even setting the damage to 0 wont bring it back

#

i did it alot when playing with velocity in helis

#

u can break helies even when allowDamage false; lol

versed belfry
fallen locust
#

handleDamage EH thats why

#

remove them or return 0/false and gg ๐Ÿ˜›

#

and you cant break them

lunar lichen
#

yeh lol

#

damage EH are a pain

fallen locust
#

not really when you find out how it works

#

and when you notice they fire for each hitpoint

lunar lichen
#

i mean in the way of overwriting vars

#

how you been anyways bro? been a while since we last spoke lol

#

had a diff name back then, "TrinityNet"

jade abyss
#

"" even setting the damage to 0 wont bring it back "" <-- what do you mean with that? setDamage 0 on a Wreck?

#

If yes: Won't work. Models will be exchanged.

lunar lichen
#

on the engine @jade abyss

jade abyss
#

Hu? oO

lunar lichen
#

arma? lol

jade abyss
#

Wait

lunar lichen
#

ima check it, been a while since i last did it

nimble raven
#

please help, when i spawn units in via sqf they are hostile to everything including blufor, but if i use zeus or editor they arent hostile

this is the sqf i am using

_crewGroup = createGroup east;

_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];

#

samething happens with debug

warm hedge
#

Hostile against who?

nimble raven
#

anything and everything they are blufor and shoot blufor

warm hedge
#

Because east is OPFOR?

nimble raven
#

yeah they are shooting each other? even tho both are blufor then proceed to shoot me who is also bluefor

warm hedge
#

What is the goal?

nimble raven
#

originally its to spawn a convoy, but im just trying to spawn units in to put into the vehicle. However they just end up shooting each other even tho they are on the same team

pallid palm
#

that dont seem right that cant be

nimble raven
#

ive restarted my game and started this on a fresh mission file with nothing changed

pallid palm
#

are u useing Mods of some sort

nimble raven
#

I am using mods, same mod set ive used to do this before and havent had this happen

warm hedge
#

Do you mean you wanted to create BLUFOR units that behave OPFOR or?

nimble raven
#

Nope its a friendly convoy to protect

#

so i dont want them to act opfor

warm hedge
#

Because east is OPFOR?

nimble raven
#

okay where are you getting this east from? the units when i look in zeus are blufor

warm hedge
#

BLUFOR is west or blufor

pallid palm
#

East = Opfor West = Blufor

nimble raven
#

yes i get that. Blufor units spawn, but shoot blufor

nimble raven
#

im cooked

pallid palm
#

jump out the fire then lol

nimble raven
#

hey

#

they dont shoot each other anymore

#

thankyou

pallid palm
#

nice what did u do

nimble raven
#

changed east to west

pallid palm
#

nice

nimble raven
#

funnily enough even if the group iseast they still spawn as blufor

pallid palm
#

whats this ?

#

that cant be eather

nimble raven
#

let me clip it

pallid palm
#

if you spawn east they cant be Blufor

#

can you show the syntax your useing

nimble raven
#

_crewGroup = createGroup east;

_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];

this is what im using and here is a closer clip of the units being blufor

pallid palm
#

copy the text into discord

nimble raven
#

yeah thats above the video its

_crewGroup = createGroup east;

_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];

pallid palm
#

_crewGroup = createGroup West <-----fixed;

#

if your useing West then make um B_crew_F if your using East then O_crew_F

#

(((((((((( Dont spawn a East group and and give the grp Blufor soldiers )))))))))))

lunar lichen
#

yep, still dont work

pallid palm
#

you see what's going on there, you createGroup East and then made the soldiers B_crew_F, B_crew_F belongs to the West team, you don't want to do that, cuz that would be kinda funny

lunar lichen
#

take a veh, plow it in the water.. TP it out and you cant fix it

nimble raven
#

yeah i see how its gone whacky

pallid palm
#

so did u fix it

#

_crewGroup = createGroup West; <-----fixed;

nimble raven
#

yes

pallid palm
#

good great

#
_crewGroup = createGroup West;

_crewUnit1 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"]; 
_crewUnit2 = _crewGroup createUnit ["B_crew_F", getMarkerPos "CNVY1", [], 0, "NONE"];
lunar lichen
#

@jade abyss want me to record it?

fallen locust
#

Never saw this before

#

but its not a variable

#

or a EH

lunar lichen
#

lol ive known this for atleast a year

fallen locust
#

just tried it

#

its probablly hardcoded

#

actually

lunar lichen
#

yeh, i dnt think much of it

#

in the beta if you busted a wheel THEN fixed it the engine would come back on

#

not the case anymore

jade abyss
#

@lunar lichen Ah! In the water! Correct!

lunar lichen
#

ya

jade abyss
#

That doesn't work. Noticed it a few month ago also

lunar lichen
#

yeh, there was a way around it in the beta

#

but that was fixed

#

so i assumed this was meant to be

jade abyss
#

In Arma: "Its not a bug, its a Feature" ๐Ÿ˜„

fallen locust
#

interesting!

lunar lichen
#

yup lol

jade abyss
#

Pretty old bug, tbh @fallen locust

lunar lichen
#

a bug by design

jade abyss
#

Expl.: Water went in the engine and destroyed it irreperable.

#

Not bug, feature!

lunar lichen
#

lol

zealous arrow
#

Sounds like ArmA

jade abyss
#

You just have to love the RV-Engine ๐Ÿ˜„

zealous arrow
#

No recoveries for you xD

hushed turtle
tough abyss
#

drainWater _vehicle;

nimble raven
#

yeah but it doesnt change the units side? its still west but acts east

jade abyss
#

Or beeing a Masochist, to torture yourself with it ๐Ÿ˜„

#

(fk, i am a masochist)

lunar lichen
#

its one of the more fun enviroments ive played with

hushed turtle
#

Side command might still return blufor, despite unit being in opfor group

errant iron
#

^ it's a janky quirk of createUnit, it happens when you spawn a unit whose type is associated with a different side than the group's actual side

hushed turtle
#

But units in group always have been behaving like they are of the group's side

nimble raven
#

which was what was throwing me off, so spawning 2x blufor units as opfor would make them both opfor but seen as blufor so would shoot each other even tho on the same side

hushed turtle
#

Side depends on group side

#

I don't think there is any correlation with createUnit command. Unit behaves like it's side is group's side, regardless how it was added into the group.

zealous arrow
#

I think i'd have to agree, RV and its brokens do make for some fun times

fair drum
#

When using createUnit, you have to rejoin the unit to the side you created if the unit doesn't naturally belong to that side right after. It's buggy.

hushed turtle
#

Ok blobdoggoshruggoogly

errant iron
#

it's a known bug that's been (kind of) documented in the wiki for a while:
https://community.bistudio.com/wiki/createUnit#Example_6

Creating a unit from a different side may lead to issues: ```sqf
_grp = createGroup east;
hint str side _grp; // EAST
_ap = _grp createUnit ["C_man_p_beggar_F", position player, [], 0, "NONE"];
hint str side _ap; // CIV, not EAST

// workaround
[_ap] joinSilent _grp;
hint str side _ap; // EAST```

lunar lichen
#

the only game that can stress me out -.-

jade abyss
#

50/50 tbh

#

fun / anger

lunar lichen
#

some times this game shows me somthing so un-belivable that i just facepalm the desk

#

IE: the backpack "incident"

zealous arrow
#

I luckily haven't come across much anger yet, although I have faceplamed many a time, mainly related to model work xD

jade abyss
#

Like flying downwards with about x000Km/h (can't remember wich one it was) and watching the attachment slowly moving away from the weapon XD

timber shore
#

_veh enableSimulationGlobal true; ??

lunar lichen
#

Simulation is not disbaled

#

it can coast# still

#

just engine fked

#

sos for the spelling -.- not slept in a few days lol

zealous arrow
#

Well you're functioning better than I do with a lack of sleep ๐Ÿ˜„

lunar lichen
#

i spent 4 hrs trying to work out why my display was not working..... Pvt vars -.-

zealous arrow
#

My favourite is missing any of the following , ; ][ )(

lunar lichen
#

i came in here expecting somone to rip me a new hole lol

zealous arrow
#

sometimes even " '

#

xD

lunar lichen
#

i feel out of place with all those people ------------------------->

zealous arrow
#

My feels before I joined model makers, most of us are a delighful bunch although @fallen locust isn't he's usually grumpy ๐Ÿ˜„ think he's having a good day today?

lunar lichen
#

lol, ive spent enough time on the forums to know that xD

#

been a lurker since the begging of arma 2

#

only just started giveing back to the community

zealous arrow
#

I remember the day he taught me to PV/PVC/PVS ๐Ÿ˜„

fallen locust
#

Look at my avatar my avatar is amazing!

lunar lichen
#

lol

zealous arrow
#

You seem happy today Grim ๐Ÿ˜„

lunar lichen
#

alot of people in here showed me most of hat i know now

zealous arrow
#

Grim, Maca and Co for me

lunar lichen
#

guess thats why i feel out of place lol

zealous arrow
#

If it wasn't for a few others back in the skype channel I'd have been lost too, so many names

lunar lichen
#

yeh

#

a few never made it to A3 ๐Ÿ˜ฆ

#

saying that ive had a few fuses blow over this game

#

i dont know how you all do it all the time

brittle badge
#

Still need help.

lunar lichen
#

apparently im spamming -.-

fallen locust
#

Ill be deamed , false means something!

lunar lichen
#

ur bots being mean to me ;-;

fallen locust
#

try { if(false)throw(systemChat "False means NOTHING!"); } catch{};

lunar lichen
#

-.-

zealous arrow
#

It gets frustrating, most of my issues stem from not having any previous code experience resulting in not knowing effective ways to do x/y/z but someone usually points me in the right direction, I just think I'm doing this for 'fun' and seems to work alright

lunar lichen
#

ive spent most of my "code" time in VB.Net which i get shit on for lol

zealous arrow
#

Better than batch/cmd ๐Ÿ˜› thats pretty much my extent of code outside of ArmA

#

Very fancy batch xD

fallen locust
#

PS ftw ๐Ÿ˜‰

lunar lichen
#

i made all my old servers systems in VB.Net ... it may be old but it still works

jade abyss
#

ABC

lunar lichen
#

but yeh, VB does not translate to C++ Well lol

idle moss
#

can anyone tell me whenever i write a code it shows Type Script,exppected nothing what to do about it

hushed turtle
#

Wrong parameters? Maybe some command is getting some parameters. While the command does not take any?

idle moss
#

[jet, 600, 30, true, 10] spawn BIS_fnc_UnitCapture

#

i wrote this

hushed turtle
#

Is jet defined?

idle moss
#

yes

#

i just need to give a plane the variable name of "jet" right?

lunar lichen
#

thing i hate the most about scripting in this game is i have a crap computer... does not make things easy lol

hushed turtle
#

Yes

#

Don't know what's wrong

idle moss
#

can u just help me by coming to a vc?

hushed turtle
#

Where do you executing this? Do you have some code before or after it?

idle moss
#

im using a trigger and dont have any code

hushed turtle
#

In activation field?

idle moss
#

yes

zealous arrow
#

Define 'crap' as I used to do A2 work on a Athlon x2 64 @2.1GHz, 4GB of RAM and a HD3750 xD

tough abyss
#

I'm scripting on a netbook from 2011.

zealous arrow
#

^

timber shore
#

my mac-air?

lunar lichen
#

like that bad

zealous arrow
#

DayZ Mod used to look like that ๐Ÿ˜›

#

For me xD

lunar lichen
#

lol

warm hedge
#

You put it in On Activation, not Condition right?

zealous arrow
#

Mac Air is fairly sensible Nathan xD

lunar lichen
#

nah i have a fking AMD Phenom

#

time has not been nice on it

idle moss
#

YES

#

i put it on activation

warm hedge
#

When do you see the error message

idle moss
#

when i press the okay

warm hedge
#

Screenshot your trigger setup

idle moss
#

okay wait

lunar lichen
#

have to do all my work in VR to make things quicker

timber shore
lunar lichen
#

that looks like DayZ SA

zealous arrow
#

DayZ Standalone

#

Not a mod xD

timber shore
#

ahhh

fallen locust
#

"Not a mod xD"
Arguable ๐Ÿ˜›

timber shore
#

LOL

zealous arrow
#

True, true

lunar lichen
#

@fallen locust its not quite a game lol

jade abyss
#

It is

#

Just not rdy

lunar lichen
#

DayZ has a slower time scale than BI lol

zealous arrow
#

DayZMod > DayZSA

#

Will be for a very long time ๐Ÿ˜„

lunar lichen
#

does it run good? being on A2's engine?

jade abyss
#

Its not A2 Engine

zealous arrow
#

its like RV 2.5

lunar lichen
#

thought it was

zealous arrow
#

xD

#

But supposedly its getting its own?

lunar lichen
#

i bought it day 1 on steam and have less than an hr in it

jade abyss
#

same, just bought it for "Support", since dayZ for A2 was just a Gamebreaker ๐Ÿ˜„

lunar lichen
#

i dno, i cant stand it for some reason

#

will just stick to CS:GO lol... looks better xD

#

if you wanna see somthing funny take 3 hunters attach them with rope then drive one off somthing

#

entertainment for days

zealous arrow
#

I recently fired it up after not playing for a year or so, a bit nicer to play if i'm honest, I can actually get over 12 FPS now, that was the most depressing part, ArmA 2/3 60FPS max settings DayZ SA less than 20 ๐Ÿ˜ฆ I expected it given early access but c'mon xD

lunar lichen
#

still in alpha?

edgy dune
#

is there away to get the RPM of a tank while driving?

digital hollow
#

rpm is an animation source as well

zealous arrow
#

Oh yah, I know that but if I'm truly honest its spoiled the game, pushing it out so early ahead of being playable, up till a year after release I had 10 mins play time

lunar lichen
#

yeh, its not done. dont look like it will ever be done

zealous arrow
#

If it'd had been pushed out now I'd likely have been far more interested

#

'dont look like it will ever be done' agree

lunar lichen
#

it was just a money maker, they got their money... no need to finish the game

edgy dune
#

that and for sounds

digital hollow
#

"Life begins at 10k rpm."
Idk from where I have that memory

edgy dune
#

nice my idle rpm is 2400.05 and when driving at max speed its 5000
๐Ÿ’€ where as merkava is 1400 to 3000

zealous arrow
#

I tried not to consider that but its slowly looking that way

lunar lichen
#

^^

zealous arrow
#

Rocket should have just stuck with the mod in the first place, it was atleast half enjoyable xD

lunar lichen
#

as far as he cares, he has enough money to retire

idle moss
warm hedge
#

?

idle moss
idle moss
#

maybe Im on phone that's why

warm hedge
idle moss
#

i did

#

can u tell me what to do regarding this issue?

warm hedge
#

No, because it worked finely to me

idle moss
#

it is related to version issue?

warm hedge
#

...Okay

#

How do you get that version

idle moss
#

a website like I wasn't getting any speed on steam so my isp had a local server I downloaded it from their server

warm hedge
#

So you say you pirated the game. Good, I'll boot you up

idle moss
#

i did

warm hedge
#

!ban 902648635521654864 0 software piracy

lyric schoonerBOT
ancient gull
#

Hello, I am looking to add to a module that we create to put arsenal the option to limit to X categories, does anyone know of a place where I can learn how to do it? I just want to limit to certain items, and then I will find the life to get the system to list everything.

warm hedge
hallow mortar
zealous arrow
#

He's got his own studio

#

RocketWerkz

#

Something like that

lunar lichen
#

lol

zealous arrow
#

Still can't get over how its planned to port DayZ to PS4 + XBOne

lunar lichen
#

rly?

#

ROFL

zealous arrow
#

Yah xD

#

Underpowered CPU's comes to mind first

lunar lichen
#

i dont think the HW can even handle the engine

zealous arrow
#

^^^

lunar lichen
#

my phenom out powers an XOne lol

zealous arrow
#

This is likely true ๐Ÿ˜„

#

TBH the 'next gen' consoles were already 5 years behind before they were even released

lunar lichen
#

yeh, not like the 360, PS3 which wer acctaully on par on launch

frail skiff
#

Hey, had another question, this time regarding the ED-1E UGV. I'm looking for a way to have a trigger activate after interacting with a certain object (object1).

I've had a look at https://community.bistudio.com/wiki/Arma_3:_Probing_Mechanics, but it's really out of my depth, I don't really know what do do with the provided scripts and what the different "params" are, how to set them up etc.

lunar lichen
#

FML BI -.-

zealous arrow
#

Yeah, they were close, the problem is PC hardware advances so quickly now

lunar lichen
#

anyone know how to hude the stamina bar?
showHUD [false,false,false,false,false,false,false,false];
does nto work

zealous arrow
#

desc.ext

#

replace [ ] with { }

#

IIRC

lunar lichen
#

that works for everything else

#

just not the stamina

zealous arrow
#

Hmmmm, no idea TBH

lunar lichen
#

just have this random orange bar -.-

zealous arrow
#

@fallen locust Teach us

lunar lichen
#

lol

#

cant find any vars for it -.-

#

bug tracker it is

zealous arrow
#

CfgDifficulties I believe

#

StaminaBar[] = {1,1};

#

I assume change the 1's to 0's

lunar lichen
#

FML, but is local -.-

zealous arrow
#

Then make it global ๐Ÿ˜›

lunar lichen
#

i meant the mission, can u set CfgDifficulties in .ext?

#

ive allways done it in config.cfg

zealous arrow
#

I would like to say yes but can't be too sure, haven't played with it TBH

#

not yet anwyway

lunar lichen
#

hmm, i haz a bug

#

i think it does hide it

#

i was not calling it -.-

#

someone hit me

brittle badge
#

.

sharp grotto
lunar lichen
#

ok, if you call showHUD at the begging of the mission it dont work

#

i gues the HUD has not loaded yet for it to be hidden

wind basin
#

Is there a way to prevent allied AI going hostile when civilians are killed?

granite sky
little raptor
#

you can at least allow positive rating tho ๐Ÿ˜…

errant iron
#

change it to abs (_this # 1), then you can get promoted hmmyes

granite sky
#

Why, it's a garbage system :P

granite sky
#

but yeah, change 0 to abs (_this # 1) if you want to keep positive rating changes for some reason

west portal
#

Is there an option to remove scene visibility on a waypoint added using addWaypoint?

hallow mortar
#

You can also use setWaypointVisible to change it for individual waypoints

west portal
#

Thanks Nikko, what I needed

grim cipher
#

im trying to debug my script and whenever i load in and get an error or get multiple errors they eventually go away, is there anyway to find where the errors go?

#

so i dont have to load out, load back in to screen shot the error

hallow mortar
grim cipher
#

sweet thank you

hallow mortar
#

Keep in mind that the RPT file also contains a large number of log entries that are either not errors, or are internal errors that don't matter

thin fox
late fox
#

hello
I read about side relations
but the following code does not work

east addFriend [sideEnemy , 1] ;
west addFriend [sideEnemy, 1] ;

I don't notice the effect of the statements.
Why is that?

hallow mortar
#

Probably because the command is actually setFriend, not addFriend

#

That being said, I'm not totally sure that you can make sideEnemy friendly

late fox
#

maybe i was using setFriend all along because I did see the hints of arguments appearing when i was coding.

hallow mortar
late fox
#

but still, no effect

late fox
hallow mortar
#

I mean, probably.
A lot of the sides other than the main 4 are meant for special cases and game mechanics, so it's quite likely that they don't respond the same way.

crimson rain
#

are there any vehicle unflip scripts made public?

zealous arrow
#

I think the only way is via CfgDifficulties

dusty steppe
zealous arrow
#

Might be able to do it on server directly in the profile

dusty steppe
crimson rain
#

I'll take a look into that, thanks

errant iron
#

it does the same thing that KP Liberation seems to do theirs, using setPos which resets the vehicle orientation

#

the extra part you might be interested in is the hold action itself, and the condition to determine when the player's looking at a flipped vehicle

crimson rain
#

what's the best method for detecting a flipped vehicle, vectorDot?

#

trying to understand all of them so I can write something lightweight for myself, and learn at the same time

errant iron
tulip ridge
#

It works fine, it's what I use for my flip vehicle stuff

sly cape
#

How do mods like Enhanced Soundscape know what kind of environment you're in? I would like to use a similar thing for my pub Zeus spectrum device script.

lunar lichen
#

nah showHUD does it

tulip ridge
#

You can also just use _vehicle setVectorUp [0, 0, 1]; to unflip ot

tulip ridge
lunar lichen
#

just have to set it after the game starts

sly cape
#

I'm even more confused now.

nocturne bear
#

Thank you so much

real tartan
#
TAG_fnc_createMarkerAO = {
    params [ [ "_pos", [ 0, 0 ] ], [ "_type", "o_unknown" ], [ "_size", 50 ], [ "_visible", false ], [ "_color", "ColorOPFOR" ] ];

    private _alpha = [ 0, 1 ] select _visible;
    private _name = hashValue systemTime;

    private _marker = createMarkerLocal [ format [ "%1", _name ], _pos ];
    _marker setMarkerSizeLocal [ 1, 1 ];
    _marker setMarkerTypeLocal _type;
    _marker setMarkerColorLocal _color;
    _marker setMarkerAlpha _alpha;

    private _border = createMarkerLocal [ format [ "%1_border", _name ], _pos ];
    _border setMarkerSizeLocal [ _size, _size ];
    _border setMarkerShapeLocal "ELLIPSE";
    _border setMarkerBrushLocal "BORDER";
    _border setMarkerColorLocal _color;
    _border setMarkerAlpha _alpha;

    private _ao = createMarkerLocal [ format [ "%1_ao", _name ], _pos ];
    _ao setMarkerSizeLocal [ _size, _size ];
    _ao setMarkerShapeLocal "ELLIPSE";
    _ao setMarkerBrushLocal "FDiagonal";
    _ao setMarkerColorLocal _color;
    _ao setMarkerAlpha _alpha;

    [ _marker, _border, _ao, markerDrawPriority _marker, markerDrawPriority _border, markerDrawPriority _ao ];
};

when creating marker, I get random results, markerDrawPriority is always 0

#

calling [ getPos player, "o_unknown", 100, true, "ColorOPFOR" ] call TAG_fnc_createMarkerAO; for debug

#

if not visible where the problem is, that north marker semi-alpha is created with same call, they should be same as others

granite sky
#

Are you sure that some of those markers don't already exist?

#

If you call createMarker on a name that already exists, it will quietly fail.

real tartan
#

using private _name = hashValue systemTime;

#

should be unique to milisecond, these markers were created at least 1 second apart

granite sky
#

Well no, hashValue isn't guaranteed to be unique even if systemTime is different.

#

Not sure how you ended up with half alpha though. That code can only generate 1 or 0.

#

So the issue is probably in other code.

real tartan
#

there is no other code, just snippet + debug console

#

I go further, loaded vanilla arma, different map

#

hmm, could be problem with '/' in name due hash ? "TK6/tT4jF1U"

#

does not explain opacity tho

hallow mortar
#

The opacity isn't different, it's in a different channel

granite sky
#

I suppose you can just replace with * or something, if that's the only character that createMarker cares about.

real tartan
#

forum dead, suppose to find easy replace string function somewhere

#

I guess trim would do

#

forgot about regexReplace

granite sky
#

regexReplace probably best.

#

trim won't work because it only checks the ends.

real tartan
#

ah yes, regex, the nightmare

#

private _name = ( hashValue systemTime ) regexReplace [ "\/", "*" ];

sly cape
#

How would one go about getting the direction vector for where the player is looking at?

little raptor
#

getCameraViewDirection

sly cape
meager granite
meager granite
#

Actually maybe slight chance for e notation number, but no /

crimson rain
#

I managed to get it working via the other 2 people's help above :) ty though SM, appreciate you!

tough abyss
#

The stamina bar cannot be disabled with showHUD

#

You can disable it if you are using the latest version of ACE (3.4.2)
(call ace_common_fnc_getStaminaBarControl) ctrlShow false

#

Keep in mind that this will hide it as long as the game is running, even if you switch missions.

frail skiff
#

Hey, my earlier message got drowned out, so I figured I'd try again

How would one go about detecting an interaction of the ED-1E UGV w/ a predefined item? The biki page on the subject is not easily comprehensible

meager granite
#

No idea how it works, best bet would be downloading that demo mission and dissecting it

frail skiff
#

Is there a specific app you'd recommend?

meager granite
#

There are tons of tools to unpack the mission pbo, I think even official ones?

frail skiff
meager granite
#

Or you can just open the mission in editor instead

frail skiff
meager granite
#

I don't know what that addon from workshop contains, download it, unpack it there probably will be a mission file in missions or MPMissions, just copy it into your profile's missions directory to open in editor

frail skiff
#

will do, thanks!

sweet vine
#

nofiication invoked by BIS_fnc_showNotification or completion of a task sometimes doesn't go away on dedicated server...

Anyone familiar with how it might be possible to clear notification on the rare occasion it fails to disappear?

sweet vine
#

Even just the IDC for the notification GUI would be helpful if anyone could find it, I couldn't

meager granite
#

I'd better look at the source of the problem rather than hacking a fix which will probably break it even more

faint burrow
frail skiff
# frail skiff will do, thanks!

Sorry still being stuck on this, but from what I've gathered so far on google, I need to use either CfgConvert or BINtoCPP.bat to open the .bin file

However, the programs always returns an error stating

"Error reading config file 'C:\File\Path\Blah\Blah\Blah\784110538843228437_legacy.bin'
Press any key to continue . . ."

I suspect that this is due to the fact that it's a mission that requires Contact DLC, any known workaround?

sharp grotto
frail skiff
#

Just did, got the following error:

"This is not valid raP file.
Was expecting signature 50617200, got 74696e69"

sharp grotto
#

Well looks like the .bin is corrupted then, never had this problem.

frail skiff
#

Strange, because the mission opens fine in the game when using Contact, would it still work if the file was corrupted?

I'll redownload it and test it all again

#

Nope, still doesn't work, even on a different computer

sharp grotto
#

Then you need to load it via eden editor, and save it again unbinarized.

faint burrow
#

It's possible to unbinarize mission.sqm using CfgConvert.

frail skiff
# sharp grotto Are you trying to convert a binarized mission.sqm or what?

I don't have a mission.sqm or anything like that

I downloaded this mission from the workshop https://steamcommunity.com/sharedfiles/filedetails/?id=1841970902&searchtext=ED-1E

After going into the SteamLibrary/steamapps/workshop/content/107410/1841970902 folder, the only file there is called "784110538843228437_legacy.bin".

Seeing as I want to open the mission in editor, I'm looking for a way to transform this file into a mission.sqm file or any format allowing me to edit the mission in eden

sharp grotto
#

no clue then blobdoggoshruggoogly

faint burrow
#

Try to find the mod in Arma 3 folder.

sharp grotto
#

it's a scenario, that's the only file in there

faint burrow
frail skiff
#

Oh my god it worked
I love you

brittle badge
sharp grotto
brittle badge
sharp grotto
brittle badge
#

I think with script competition level 2 or not? Some servers has that

#

Or generally not

sharp grotto
#

No clue about zeus + scripting sorry

hallow mortar
# brittle badge I think with script competition level 2 or not? Some servers has that

Composition script level is a separate setting. It also has to be changed at the server or mission level; it cannot be changed on the fly.

Composition script level determines what scripts can be executed from a saved composition, when it's placed. 0 means none of the composition's scripts will be executed. 1 means only object attribute scripts will be executed (anything triggered by an option in the object's Editor attributes panel). 2 means all scripts will be executed, including scripts in the object's Editor init field.

If the composition script level setting doesn't permit scripts to be run, they won't run at all. You won't be kicked, nothing will happen.
Composition script level does not affect BattlEye and CfgRemoteExec security settings. If a composition script is allowed to run in principle, but does something that's forbidden by the security settings, then it will be blocked by that.

#

The problem you're facing is that you're trying to remoteExec something that's forbidden by the server's security settings. You need to either refactor your code to remoteExec something that isn't forbidden, or refactor your code to not use remoteExec. I don't play on public Zeus servers so I don't know what they forbid or allow - and it can vary from server to server anyway.

sly cape
#

I need help with multiplayer scripting. I want my script to be useable with JiP that's in an init spawned by a Zeus. I don't know where to start.

stable dune
sly cape
brittle badge
stable dune
sly cape
brittle badge
#

thats what i doing tho with the NV-Script but i cannot bring effekts to other players with remote exec or something like that

sly cape
#

From a composition like EZM and stuff.

brittle badge
#

thats like the problem that i have. they say me its not possible but i know there is any way to do that becurse core do it to

brittle badge
#

and trying something like EZM

#

i created my own TWR /Desert Fraktion and a lot more but the nightvision sucks

#

everythink what u try in Mp u need to be carefull with remote exec. for testing u can use remote exec call 0 BUT only for testing on servers without battleeye like ur own privte server or i give u acception to mine wehre u can test public zeus scripts. otherwhile u can use this trick:

brittle badge
#

that shows u 1st is ur script running local if a player on a server with u. after that u need to testing on servers

brittle badge
lunar lichen
#

showHUD has disabled it

sly cape
#

More specifically is that I want to know if putting createVehicle in the init will only make one or if it will make one for each machine.

errant iron
#

but it's been a while since i checked so i might be wrong on that

lunar lichen
#

showHUD [false,false,false,false,false,false,false,false];

sly cape
brittle badge
#

3D event handler

errant iron
#

i know a while ago i made my own zeus comp that had issues with locality (it had an addAction but other players couldn't use it), so i came to the conclusion that the init field wasn't globally executed

brittle badge
thin fox
#

doesn't using "EntityCreated" MEH solves the problem?

tough abyss
#

showHUD [true,false,true,true,true,true,true,true];
Oh right. It's linked to the weapons info box.

lunar lichen
#

seams to be

tough abyss
#

(call ace_common_fnc_getStaminaBarControl) ctrlShow false
can disable it without hiding everything

lunar lichen
#

yeh, not running any mods

tough abyss
#

Thats new though. Last time it stayed no matter what

lunar lichen
#

it does like to come back tho

tough abyss
#

I'm afraid that the method with ACE is the only one I know.

#

It's based on some config changes.

lunar lichen
#

yeh, i just did

_HudDisabled = [false,false,false,false,false,false,false,false];
_hudStatus = shownHUD;

if !(_HudDisabled isEqualTo _hudStatus) then
{
hint "Removing HUD";
showHUD [false,false,false,false,false,false,false,false];
};

and tied it into my HUD Refresh

tough abyss
#

crazy

lunar lichen
#

it works

#

lol

#

trying to make a mission and dont want to do any mods

tough abyss
#

GL. I couldn't do anything without CBA

hallow mortar
zealous arrow
#

To be honest theres alot you can do without mods, just some things have to get really 'hacky'

brittle badge
torn basin
#

Hello guys im having trouble with an error message popping up as soon as the respawn screen is displayed

20:57:47 Error position: <param [3,"",[""]];
private _uniqueID =>
20:57:47 Error Type Array, expected String
20:57:47 File \A3\Functions_F\Respawn\fn_showRespawnMenuDisableItem.sqf..., line 88

Im not using the function BIS_fnc_showRespawnMenuDisableItem anywhere, which i believe is creating the error.
My Respawn template is working as intended too, still the error message is quite annoying.
Does someone have a clue how to solve this?

I assume it is a function that automatically is getting called on every respawn? How and where can i define the parameters that the function uses?

hallow mortar
stable dune
little raptor
torn basin
faint burrow
torn basin
brittle badge
hallow mortar
thin fox
#

and it's just easier to say "you were right, sorry" blobcloseenjoy

tough abyss
#

You can't hide the stamina bar without mods.There is at least no way that I am aware of.

#

With mods it's super easy. If you know where you have to look.

brittle badge
hallow mortar
#

If you understood the question, you wouldn't think that's what he asked

thin fox
brittle badge
# thin fox he explicitly asked a question about locality, I don't see any "hey Idk how to u...

Who are you that I should apologize to you for anything? This is my interpretation of the question and my answer. If you're so obsessed with putting on an act here and telling me that you understand answers, then tell me why, after almost six months and multiple inquiries, I haven't received a reasonable answer to my questions or scripts. You constantly tell me that it wouldn't work or something without you even beginning to engage with anything. Core, for example, did this in their script, but I personally am not in a position to expand it to 9-10Filter. This isn't the first time I've asked a question here, and the only person who really contributed anything was -hypoxic . Please don't act like that, and above all, don't make fun of me, because you're not exactly the ones who should be amused when someone, according to "your level of knowledge," doesn't understand a question when you yourself aren't even very capable of it. And while I have 14,000 hours in Arma 3 and know a lot, I'm not going to try to help anyone if they come at me like you do and tell me I have something to apologize for because of a different perspective and understanding of an issue. Seriously,

grim cipher
#

Anyways, Iโ€™m running into a problem with my postInit.sqf triggers: I want the vanilla radio channels to play a beep sound when you press/release Push-To-Talk, but I want to exclude the direct chat from making any noise because obviously that makes no sense. Right now, even when I switch to the direct channel (proximity), the trigger for general PTT (pushtotalk) still fires the beep. How could I set it to ignore a specific channel? Below is how I have it set up currently...

private _trig7 = createTrigger ["EmptyDetector", [0,0,0]];
_trig7 setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_trig7 setTriggerInterval 0;
_trig7 setTriggerStatements [
    "inputAction 'pushtotalk' > 0",
    "setCurrentChannel 7; playSound 'beepIN2';",
    "playSound 'beepOUT';"
]; ```
brittle badge
# grim cipher Anyways, Iโ€™m running into a problem with my postInit.sqf triggers: I want the va...

You can redesign your trigger so that it first checks which channel you are currently on, and only then plays the beep. For this, you use the command currentChannel in SQF, which returns the number of the currently active radio channel (in Vanilla Arma, 'Direct Chat' is usually channel 0). So if currentChannel == 0, nothing should happen; otherwise, the beep should sound when pressing/releasing PTT.Below you see 1 example: one with just one trigger (but with a small conditional check in the 'else' branch).

#

private _trig = createTrigger ["EmptyDetector", [0,0,0]];
_trig setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_trig setTriggerInterval 0;

_trig setTriggerStatements [
"(inputAction 'pushtotalk' > 0) && (currentChannel != 0)",

"playSound 'beepIN2';",

"if ((inputAction 'pushtotalk' == 0) && (currentChannel != 0)) then { playSound 'beepOUT'; };"

];

(idk if that works)

#

but u can try it

grim cipher
#

Thank you very much, I was having a hard time trying to find where the radio channels are designated

#

but thats very helpful

grim cipher
#

Just found it lmao

sly cape
brittle badge
sly cape
brittle badge
#

You didn't contribute anything to this

hallow mortar
#

He's the one who originally asked the question

sly cape
grim cipher
#

@brittle badge Oh also I forgot to mention I wanted to have a static sound play while the PTT button is held, does this look good?

_trig1 setTriggerActivation ["ANYPLAYER", "PRESENT", true];
_trig1 setTriggerInterval 0;

_trig1 setTriggerStatements [

     "(inputAction 'pushtotalk' > 0) && (currentChannel != 5)",

    "playSound 'beepIN2'; \
     [] spawn { \
         while { ((inputAction 'pushtotalk' == 0) && (currentChannel != 5)) } do { \
             playSound 'static1'; sleep 0.5; \
         }; \
     };",

     "if ((inputAction 'pushtotalk' == 0) && (currentChannel != 5)) then { \
         playSound 'beepOUT'; \
     };"
]; ```
brittle badge
brittle badge
brittle badge
grim cipher
#

Ohhh I shouldve mentioned too that its a sound I have in a folder

#

I made a class for it in the config

grim cipher
#

But the beep and beep out work

hallow mortar
#
while { ((inputAction 'pushtotalk' == 0) && (currentChannel != 5)) } do {
    playSound 'static1'; sleep 0.5;
};

It's checking for the input state being 0 - that is, not pressed. That should probably be a !=, so it plays while the state is not 0 - that is, while it is being pressed.

#

A User Action Event Handler would be better than using a trigger for this, though.

grim cipher
#

Ohhhhh

grim cipher
hallow mortar
#
addUserActionEventHandler ["PushToTalk", "Activate", {
  if (currentChannel != 5) then {
    playSound "beepIN2";
    0 spawn {
      while { inputAction "PushToTalk" > 0 } do {
        playSound "static1";
        sleep 0.5;
      };
    };
}];
addUserActionEventHandler ["PushToTalk", "Deactivate", {
  if (currentChannel != 5) then {
    playSound "beepOUT";
  };
}];

CAUTION: there are several different input actions for push-to-talk. You'll want to make EHs for all of them, except PushToTalkDirect I suppose.

grim cipher
#

I see, thank you very much

foggy stratus
#

In some mission somewhere, I remember seeing a sick animation, where the unit was puking or retching. Via polpox's viewer I searched for sick, wounded, puke, inj, etc. and couldn't find it. I don't think it was a mod, but maybe it was. Anyone know this animation name?

torn harbor
#

anyone have suggestions on the best way to have an when a player picks up a body via ace carrying a checks runs to see if the AI is in line of sight of the player

I have a script kinda put together which is below and I get into the while loop where the hint is but it seems like its getting tripped up after that part and not triggering the if statement even if I look at the AI in the eyes. It works when I pickup a body infront of the AI but if I pick it up and walk infront of them then nothing happens

if (player getVariable["UC_Checked_Carry", []] isEqualTo true) then{
    } else{
        player setVariable ["UC_Checked_Carry", true];
        _carryEventId = ["ace_dragging_startCarry",
        {
            params ["_unit", "_target"];
            hint "EVH was added";
            private _aiUnits = allUnits select {
                side _x != side player && {alive _x && {_x distance player < 500}} // only enemy AI within 500 meters
            };
            {
                while {player getVariable ["ace_dragging_isCarrying", []] isEqualTo true} do
                {
                    hint "check is running";
                    private _ai = _x;

                    // Check if AI has line of sight
                    private _eyePosAI = eyePos _ai;
                    private _eyePosPlayer = eyePos player;

                    private _hasLOS = lineIntersectsWith [_eyePosAI, _eyePosPlayer, _ai, player] isEqualTo [];

                    // Check if AI knows about the player (value from 0 to 4)
                    private _knowledge = _ai knowsAbout player;

                    if (_hasLOS && {_knowledge > 1.5}) then {
                        player setCaptive false;
                        hint "You were spotted carrying a body! You are now OVERT!";
                        player setVariable ["UC_spotted", true];
                    };
                    
                };
            } forEach _aiUnits;
        }] call CBA_fnc_addEventHandler;
    };
pallid palm
#

hi @foggy stratus

foggy stratus
pallid palm
#

i love the barrel script

foggy stratus
#

It's fun, especially when many near so you get a chain reaction.

pallid palm
#

lol yes its awsome thx m8

warm hedge
sly cape
#

Might be an Old Man one.

foggy stratus
#

ok, maybe I imagined it, thx

sweet vine
sweet vine
# sweet vine nofiication invoked by `BIS_fnc_showNotification` or completion of a task someti...

In the mean time made this little failsafe, @faint burrow incase you're interested as well

[] spawn {
    if (!hasInterface) exitWith {};
    scriptName "BIS_fnc_showNotification failsafe";
    _clearNotifDialog = { ["RscNotification_1", "RscNotification_2"] apply {(_x call bis_fnc_rscLayer) cutrsc ["Default","Plain"]} };    // clear notification dialog
    while {sleep 5; true} do {
        waitUntil {sleep 1; missionnamespace getvariable ["BIS_fnc_showNotification_queue",[]] isNotEqualTo []};    // wait until notification is active
        
        sleep 30; // 30 sec timeout for notification to go away
        
        if (isNull (missionnamespace getvariable ["BIS_fnc_showNotification_process",true])) then {call _clearNotifDialog; continue};    // no active notification script
        
        terminate (missionnamespace getvariable ["BIS_fnc_showNotification_process",true]);    // terminate active notification script by handle
                   
        call _clearNotifDialog;        
        
        missionnamespace setvariable ["BIS_fnc_showNotification_queue",[]];    // clear notification queue
    };
};
granite sky
#

Hmm, I can see a weakness in showNotification.

#

A good chunk of it should probably be running in unscheduled.

#

Calling it twice in close succession with the first call in scheduled can result in broken state.

#

Not sure if the queue loop is entirely safe either though.

zealous arrow
#

Well if CBA are using their own script to do it you can just replicate said script in your mission, just call it after the game has started

#

ACE sorry

indigo snow
#

ACE uses config tweaks to do it

#

as commy said

tough abyss
#

^

sweet vine
#

Was adding a config file to conditionally set respawn template in description.ext, I keep getting Preprocessor failed on file X - error 11, with #if while #ifdef has no problems, what am i missing?

//#MISSION_CONFIG.hpp: #define MISSION_SPECTATE true
#include "#MISSION_CONFIG.hpp"     

// works fine
#ifdef MISSION_SPECTATE
    respawnTemplates[] = { "ace_spectator","Counter" };  
#endif

// Preprocessor failed on file X - error 11
#if MISSION_SPECTATE == true
    respawnTemplates[] = { "ace_spectator","Counter" };  
#endif

// Preprocessor failed on file X - error 11
#if MISSION_SPECTATE
    respawnTemplates[] = { "ace_spectator","Counter" };  
#endif
proven charm
#

maybe **true **not defined?

sweet vine
#

It is, I imported the file and checked the value, in debug console, it's defined

winter rose
#

try #define true 1 before all that still?

sweet vine
#

Ah, will do

proven charm
#

debug console is not the same as preprocessor though

winter rose
#

(also that is more of an #arma3_config thing but since it's started and most likely soon done, let's keep it here)

sweet vine
#

Gotcha, that fixed it, tysm

errant iron
#

For future reference, it possible to get the stack trace of a running script? One of my objectives was taking excessively long to generate whenever it was next to a coast. I managed to fix it, but it took me a while of spamming diag_activeSQFScripts to figure out which function it was spending the most time on.

(to clarify, the game wasn't performing poorly, the script just did too many position checks)

little raptor
#

there is diag_stackTrace or something like that

#

but anyway for that you can use Dedmen's Arma Debug Engine or Arma Script Profiler

hallow mortar
silk tiger
#

thank you

errant iron
#

Entirely separate question, one of my new objectives randomly freezes the game for around 4 seconds, but I'm not sure what's causing it. This is the trace I recorded with diag_captureSlowFrame ["total", 0.5]:

granite sky
#

You said this is running in scheduled, not unscheduled?

errant iron
#

yup

granite sky
#

How much stuff is it spawning, typically?

errant iron
#

this objective's relatively small compared to my other ones, about 20 units, 2-5 objects, and a few vehicles

granite sky
#

I'm gonna blind-guess that one of your spawning functions is doing a safe-position test that blows up in some circumstances.

little raptor
#

just place some timers around the suspicious parts

granite sky
#

It's quite hard to jam anything in scheduled though.

little raptor
#

it's hard to say which it is

errant iron
little raptor
#

but as John said selectBestPlaces is the most sus

granite sky
#

It's probably the worst thing in that function but I suspect the issue isn't in that function directly.

little raptor
little raptor
#

or many other things

errant iron
little raptor
#

@errant iron another thing: regarding the end of the fnc where you do GC queuing, just remember that deleting many objects at once does freeze the game

granite sky
#

uh

#

Try wrapping the selectBestPlaces in isNil :P

little raptor
#

wut?

#

a joke?

granite sky
#

I mean that doesn't take 3s, it's more like 50ms.

little raptor
#

its timing can differ tho

granite sky
#

3s is more like it's doing 3ms of it and then having a scheduler break, except something is bugging out.

little raptor
#

based on where it samples

little raptor
#

if the scheduler is too slow tho

granite sky
#

oh, I guess if it's doing the whole map it might need to disk load.

little raptor
#

yep

granite sky
#

So first run is 3s and then next one is 30ms.

errant iron
errant iron
granite sky
#

hmm, can't replicate though. Are you on an HDD or an SSD?

errant iron
#

SSD

little raptor
granite sky
#

Even with 1 as the cycle count?

little raptor
#

idk it was a maybe ๐Ÿ˜…

granite sky
#

I can switch maps, run with cycle count 1, and livonia finishes in 10ms :P

errant iron
#

i only noticed it occasionally while i was testing the objective too

granite sky
#

Hmm, maybe if it tries looking outside the map boundary...

errant iron
#

in the meantime, code has been shipped :)

granite sky
#

Bear in mind that during startup, code that takes 50ms in unscheduled could easily take 3000ms due to contention with other scripts.

#

Freezing is weird though. Not even sure if selectBestPlaces can take scheduling breaks.

#

ok, it doesnt'.

#

Easily tested with precision = 10.

errant iron
#

does the scheduler allow stopping in the middle of a script command? or is it always in between?

granite sky
#

Generally not.

#

Unless it's a script command that runs code.

little raptor
#

btw the command preloads all objects and the terrain in the radius

little raptor
granite sky
little raptor
#

no but maybe it does include the base model (minus visual lods)
also it has this comment ๐Ÿ˜…

// Allow up to 1 minute freeze here, due to disk access for terrain loading it may get stuck here for a while
#

1 minute freeze ๐Ÿ˜…

granite sky
#

Well, if it can freeze for seconds on an SSD...

little raptor
#

you're lucky with just 4 seconds

granite sky
#

just puzzled that I can't replicate it.

#

Restart arma, start Altis editor mission, first cycle still 70ms.

#

Maybe Windows disk cache is just working really well

little raptor
#

@errant iron which branch are you using btw?

#

the function is multithreaded (iirc Dedmen did it) and maybe you're using the stable with the old job manager? (and it's locking for too long for some reason)

errant iron
atomic niche
errant iron
#

oh as in i only tried on profiling branch

#

want me to check? should take a few min

granite sky
#

What CPU & cpuCount settings?

errant iron
#

5900HX, unset

granite sky
#

Didn't disable HT in BIOS or anything like that?

#

or forced affinity

errant iron
#

id hope not, task manager says 8 core 16 threads, and arma3_x64.exe affinity says all allowed

granite sky
#

Not likely to be one of those all-threads-slower issues then.

errant iron
little raptor
#

yeah it's probably the preloading that's slow
you can cache the result of that script command into a grid (2D array) and use it statically tho
that way you won't get freezes (except the first time)

stark fjord
#

How would one get simulation type of an object?

granite sky
#

getText (configOf >> _object >> "simulationType")

stark fjord
#

umm nada, but since its base macro is House_F, its safe to assume its House?

#

Ah got it, thanks it was "simulation" instead of "simulationType".

granite sky
#

yeah sorry, working from memory

stark fjord
#

all good, thanks!

tulip ridge
#

It's just simulation, not simulationType

#

Unless simulationType is some separate thing too

#

Nvm discord didn't load those other messages :/

pallid palm
#

hello all: So as the respawn tickets start running down, what syntax would i use to count the respawns, that are left

thin fox
pallid palm
#

@thin fox yes sir tickets

pallid palm
#

Awsome WoW thats cool man thx @thin fox

pallid palm
#

@thin fox holy shit man that works Awsome thx you so much @thin fox

pallid palm
#

oh yeah i made a script that shows the count, in systemChat, every time you die, and when your out of respawns it say OUT OF RESPAWNS lol

#

Awsome i love it lol

#

also i have types of respawns, and the script takes in to account, for each type of respawn, some of my respawn types are: "No Respawn", "10 Total Respawns", "Team Respawn"

naive needle
#

in terms of network optimization in arma, is it better to send stuff it via string or array (I would assume string)?
"[42, ""Hello there"", true]"
or
[42, "Hello there", true]

pallid palm
#

eather or is good @naive needle

naive needle
#

yea but what is better ๐Ÿ˜„

#

I think I was reading from dedmen that strings are always better

pallid palm
#

ummm i guess string is better

granite sky
#

Apparently the network transfer format is a lot better than the profilenamespace storage format, but that's not saying much.

naive needle
#

yea what even is the format

#

I was reading that in one of dedmen scripts

// We send as JSON, because string is more efficient over network
    private _messageEncoded = toJSON _chatMessage;
pallid palm
#

@thin fox wow thats the 1st time i ever got something to work perfect on my 1st try, thx you so much @thin fox

#

now if i could just get my golfswing to work perfect on my 1st try every time lol

spring stone
#

I have a question: Is there a way to set the date of a mission for the actual date? (Meaning, if the Date of the server is 15th of January and the mission is started, the mission also has the date 15th of January) Vanilla or modded (CBA?) and sec. question: The same for the time?

tough abyss
#

You can also set them in the editor.

#

year, month, day, time and minute

spring stone
#

I mean dynamically on every mission start

tough abyss
#

setDate then

spring stone
#

don't want to edit the date all the time

fallen locust
#

you need an extension to get system time

#

no inbuild way

tough abyss
#

^ is that what you mean?

spring stone
#

Yes, so...nothing I can achieve I'd say ;P

tough abyss
#

There is no way to get the current real date / time in SQF. An extension could do it.

#

As Grim said

spring stone
#

Okay, thanks (I just think thats nothing I can do, since my scripting skills are....limited. xD)

fallen locust
#

that could do

#

and now push decides to work...

still forum
#
  1. Alot fewer (because they wouldn't move/animate/change much), but not none.
    1.1 no, afaik it never was
    1.2. Position, animation.. The objects "state". Different per object type-
  2. I don't understand that question, the command itself would not use network (other than the global one which informs all other players about the change)
#

If you want no network traffic, create the object local-only. createVehicleLocal, or the local only flag in editor

#

Global

fallen locust
#

usage would be

setDate call compile ("dllName" callExtension "");
spring stone
#

UIIII...Gonna test that later then :3

#

Thank you

lunar lichen
#

KK has a real time / date DLL

still forum
lunar lichen
still forum
still forum
#

But the json conversion is probably more expensive, than the native encoding would be. But they are in different places

lunar lichen
#

anyways guys, im off to bed. thanks to eveyone who helped today ๐Ÿ˜ƒ

#

nighty night

raw abyss
#

Hello everyone,

I'm working on a horror mission in Arma 3, and I'm trying to summon a custom enemy when a player interacts with a special object. However, when the summoning is triggered, instead of the enemy appearing, I get a message on screen that just says: "not found".

Here is the script I'm using to create and manage the boss enemy:

sqf
_jefe = "WBK_SpecialZombie_Smacher_Hellbeast_3" createVehicle position spawn_jefe;
_jefe setPosATL (getPosATL spawn_jefe);
_jefe allowDamage true;
_jefe setVariable ["bossMaxHealth", 1000, true];
_jefe setVariable ["bossCurrentHealth", 1000, true];
_jefe setName "EL ELEGIDO";

["", 0, 0.9, 2, 1, 0, 0] spawn BIS_fnc_dynamicText;

{
_x cutRsc ["RscTitleDisplayEmpty", "PLAIN"];
} forEach allPlayers;

[] spawn {
waitUntil {
sleep 0.1;
!isNull _jefe
};

while {alive _jefe} do {
    _hp = _jefe getVariable ["bossCurrentHealth", 1000];
    _max = _jefe getVariable ["bossMaxHealth", 1000];
    _percent = _hp / _max;
    _bar = "";
    for "_i" from 1 to 20 do {
        if (_i < (_percent * 20)) then {
            _bar = _bar + "โ–ˆ";
        } else {
            _bar = _bar + "โ–‘";
        };
    };
    {
        _x setTitleText [_bar, "PLAIN"];
    } forEach allPlayers;
    sleep 0.3;
};

{
    _x setTitleText ["", "PLAIN"];
} forEach allPlayers;

};
I double-checked that the spawn marker spawn_jefe exists on the map. Still, the boss doesnโ€™t appear and I get that "not found" error. Could it be that the class name is incorrect? Or am I missing something related to mod dependencies?

proven charm
#

if spawn_jefe is marker name you must use getMarkerPos "spawn_jefe" instead

rough vortex
#

Does anyone know how to script props like furniture in a room from a house?

naive needle
naive needle
still forum
# naive needle so using a single string is faster on the CPU side (less encoding overhead) I gu...

Array: Datatype 1 byte, size 1 byte
42: Datatype 1 byte, value 4 byte
true: Datatype 1 byte, value 1 byte
"hi": datatype 1 byte, null-terminated string 3 byte
== 12 bytes.

String:
Datatype: 1 byte, null-terminated string 17 bytes
== 18 bytes

Arma does not compress strings, the performance overhead wasn't worth it.
If you have something big to transfer though, you could compress it yourself with 2.20 ctrlWebBrowserAction

rough vortex
raw abyss
split scarab
#

Zeus Enhanced has a 'Execute Code' module and it says the following, but I'm not sure how to utilize the 0: Module Position ASL param

Thought it'd just be like this but apparently not?

createVehicle ["R_TBG32V_F", this select 0, [], 0, "CAN_COLLIDE"];
warm hedge
#

_this instead

proven charm
tulip ridge
#

_this is also an array, with the position and object

split scarab
tulip ridge
#

Oh nvm you do have a select 0 in there

#

I love discord's code blocks going off the screen on mobile

cosmic cipher
#

Hi, does anyone have any idea how I can find out if the current mission is on an island or not.

This is important for me to send reinforcements by water or air.

I have already tried all possible variants, but have not yet found a 100% satisfactory solution (via pathfinding, spiral shape to see if there is water around it, etc.).

These variants are often very time-consuming and cost a lot of resources. I already do this so that it is cached in the preinit but I would like to have another variant that I can also use during operation (resource poor).

Maybe someone has a better idea or can give me some new food for thought.

hallow mortar
proven charm
#

this is how I check for island map (just quick solution...) ```sqf
isWaterMap = false;
{
if(surfaceIsWater _x) exitWith {
isWaterMap = true;
};
} foreach [[0,0],[worldsize,0],[worldsize,worldsize],[0,worldsize]];

#

checks the corners for water

raw abyss
cosmic cipher
# proven charm this is how I check for island map (just quick solution...) ```sqf isWaterMap = ...

Thank you, I think I need to explain in more detail what I mean.

For example the Virolahti map:

It has about 50 small islands (estimated), headlands, bays, lakes, rivers.

My mission plays on the whole map, everything is randomly generated.
By mission in my first post I meant mission object, there are also over 200-300 spread over the map.

Now some of these objects are on islands.
As objects are taken in the course of the mission, a front is formed where the enemy can no longer push through if reinforcements are to come, so reinforcements only come from the objects that have not been taken.

My current system works 80% of the time with islands, but has vulnerabilities. I would like a variant or idea if from Pos A to Pos B (is island) it is determined that there is no access over land, as a quick check. During operation not before (preInit), as I have it now.

4 corners does not work, as there are also headlands, spiral is bad because of longer islands but possibly expandable as a combination.
Is there a possibility with Pathfinding (in move mode) where it spits out that you have to swim from there?

digital hollow
#

Is there an appreciable speed difference between drawIcon3D vs repositioning a UI ctrl, both per frame?

winter rose
#

I would assume drawIcon3D to be quite faster indeed, however we do not have any benchmarks at hand (feel free ๐Ÿ˜)

torn harbor
#

not sure what I am doing wrong here so maybe someone is able to see something I am not able to see

I get the error in the screenshot when I place the module I have down and this is the area of the code it is pointing to

{
            private _player = _x;
            if (!isPlayer _player) then { continue };

            private _nearbyCivs = civManager_allCivs select {
                (_x distance _player) < _spawnRadius
            };

            private _civsToSpawn = _maxCivsPerPlayer - (count _nearbyCivs);

            for "_i" from 1 to _civsToSpawn do {
                private _pos = _player getPos [random _spawnRadius, random 360];
                private _type = selectRandom _civilianTypes;
                private _civ = createUnit [_type, _pos, [], 0, "NONE"];
                [_civ] call TFR_fnc_setCivBehavior;
                civManager_allCivs pushBack _civ;
            };
        } forEach allPlayers;
little raptor
#

there's a 1 frame delay for UI

digital hollow
#

meant performance, but yeah that is good to know as well

proven charm
digital hollow
#

application is for optimizing cockpit interaction system, which is currently drawing cursor+labels using BIS_fnc_dynamicText meowsweats

torn harbor
proven charm
warm hedge
torn harbor
#

so after the _civ = add in group

proven charm
#

yes

hallow mortar
#

Units can't exist outside of a group, so you need to specify a group to create the unit into

torn harbor
#

alright thank you I shall try that

I had it as createAgent before while I was working on it and changed it to unit so I can actually have them doing things and such and react to firefights

granite sky
#

Ah no, just whether it's an island map or not. Never mind.

hallow mortar
cosmic cipher
granite sky
#

Foot's a lot more expensive than road.

#

Maybe semi-plausible if you do 50 or 100m precision.

#

you can approximate to doing the road check and then searching to the nearest road.

#

Roads you can build using the alt syntax of roadsConnectedTo.

errant iron
# little raptor yeah it's probably the preloading that's slow you can cache the result of that s...

Do you know how often the map entities get unloaded? I've got a cache set up now, but I'm debating whether I should pre-calculate my objectives' expressions right away, or wait until the objective spawns with the desired expression.

For now it's only four unique expressions total, but not all objective functions might spawn at the same time (some not at all, depending on lack of player activity), and it'll incur a small maintenance cost to keep track of these expressions in a separate list.
-# and i'll most likely forget to do it anyway >:(

cc @granite sky, @still forum

granite sky
#

Apparently I can't convince them to unload at all :P

#

I remember having this sort of replicability issue with the hideObjectGlobal startup bug. Something like map entities not loading in before hideObjectGlobal ran, but I could never convince it to happen in a simpler mission.

granite sky
#

Localhost.

proven charm
#

still lag ๐Ÿ™‚

#

(i think)

granite sky
#

You have successfully reduced the term to meaninglessness :P

proven charm
granite sky
#

There's a common thing with UIs where onLoad is called scheduled, because otherwise it fires before the controls load.

#

Now usually that means it still fires in the same frame, just slightly later. Spam enough scheduled scripts and it often won't.

proven charm
#

yea maybe turning the code to non-suspending would fix it

granite sky
#

It's one of the big irritants with the UI system.

#

Should have made an event that fires after the controls are loaded.

proven charm
#

true

granite sky
#

It's probably possible to abuse the undocumented load order logic to tack the onLoad onto your last control instead, but this sort of hack is not sensible when other people have to work with your code.

#

So the common situation is non-deterministic UI loading.

proven charm
#

im not sure if we are talking about the dialog/display "onLoad" script because that seems to work well. is it non scheduled? i forgot

granite sky
#

It's unscheduled but in practice it's commonly used to spawn a function, because of the load order issue.

proven charm
#

ok

#

i use it alot (or more or less)

#

and i havent got issues but thanks for the heads up , maybe i'll run to those someday.

naive needle
still forum
still forum
naive needle
still forum
#

๐Ÿคท

naive needle
# still forum ๐Ÿคท

I checked it via exportJIPMessages , and then looked for the object netID to check if the message count goes down when using nil and it dosent , in fact it goes even up when using nil on variable which he didnt had on before player setVariable ["SOMERANDOMVAR",nil,true] , so yea it stays in jip

granite sky
#

Yeah, it's kinda documented:

To remove a variable, set it to nil (see Example 5) - note that this does not work on Object and scripted Location namespaces (the variable will be set to nil but will remain listed by allVariables).
#

Respawns are odd though. My recollection is that the variable copying between old and new units is actually done on the client side.

#

But then the client doesn't have the JIP queue, so it doesn't know if a variable is supposed to be published.

#

Looks like every machine copies over its current variables for that object on respawn. Not sure if the JIP entry is copied or not.

naive needle
#

interesting

#

what about when the object gets deleted

#

does the var stay in jip ?

#

let me check with exportJIPMessages

granite sky
#

I only tested player respawn. I don't know how general it is.

#

In general I'd hope that JIP entries for setVariable on objects would be deleted when the object is...

naive needle
#

yea I checked and the netID gets deleted from JIP

naive needle
#

also interesting with containers, I know dedmen mentioned it before that containers for example that every inventory interaction will get put into jip. I wonder how much of an impact it has because you could also reduce it to its minimum by deleting the object and replacing it with its inventory

errant iron
#

How do I check if a backpack can be assembled into a UAV? There are AI UAV operators scattered around my AOs, and I'm thinking of having those AI assemble their backpacks into autonomous FPV drones on the fly. Making them do the actual assembly action would be nice too, but I don't mind faking that if needed.

little raptor
granite sky
#

Item add/remove always adds entries each time so if you have a particular inventory that gets changed frequently, it can help to replace it occasionally.

errant iron
granite sky
#

"assembleInfo" >> "assembleTo"

naive needle
#

backpacks, vests and uniforms which the player is wearing also have an global container. If you put stuff into it or remove it , the message also gets into jip. If you put the backpack in an container and pick it up the netID stays the same ( which would allow you to put persistent vars on it btw). With player setUnitloadout (getUnitloadout player) you can easily give yourself an new container object and it removes the jip to 0 of the container

little raptor
#

yeah. there was also the opposite

#

but iirc it had a typo

#

dissassembledTo iirc

granite sky
#

yeah something like that.

errant iron
#

got it, thanks!

naive needle
#

will test it

granite sky
#

I forget whether you have to do backpack cargo separately.

#

but IIRC they clear the related JIPs.

#

tested it once.

naive needle
#

yea it works, it resets it

#

would be kinda dope to have an command to check how many commands are in jip que for this object, so if its to many you can just clear it back to minimal ammount. But I guess inventory related commands dont really cause any issues for the network traffic

chilly bronze
#

if its not possible to force an AI to lean via sqf, what exactly is making them lean in combat/while in stealth mode?

granite sky
#

I don't think I've ever seen an AI lean on its own.

#

You certainly could force them with animations. I would guess you have a mod that's doing that.

formal grail
#

Is there any way to make playSound3d not queue the sound for people who are out of range? ArmA behavior seems to be to "remember" the sound in the location so when someone who wasn't in the area comes into the area, they start hearing the sound.

#

(Other than some kind of manual distance check. I've tried using the distance parameter but it doesn't seem to control this.)

chilly bronze
#

@granite sky if you set an AI to stealth and tell it to move, it will lean around corners. I cant send screenshots unfortunately

granite sky
#

In the general the AI is a black box. You can poke it a bit at the edges, and it responds unpredictably.

stark fjord
#

They do sometimes lean indeed

last cave
#

I find funny glitch
The player can bypass EH HandleDisconnect while loading the mission.
The entry conditions that I had.
Skip the lobby with automatic slot selection.
I just kept pressing esc while loading the mission. And the player who was supposed to appear remained in the mission as a bot, although AI is disabled in the description.

When I joined again, then the player did not occupy the slot on which he was and created the AI, but the next one.

last cave
molten yacht
#

I'm trying to teleport units within a random radius. This works, but they get stuck inside the floor of the building, instead of at the proper height (the height of the destination gamelogic)

params ["_source","_destination","_radius"];

if (!isServer) exitWith {};
{
private _center = getPosATL _destination;
private _angle = random 360;
private _randomSquareRoot = sqrt random 1;
private _distance = _radius * _randomSquareRoot;
private _position = _center getPos [_distance, _angle];
_x setPosATL _position;
} forEach (allUnits inAreaArray _source);

Invocation:

[dropbay_0,warehouse_0,5] call ASH_fnc_tp_squad;

dropbay_0 is a trigger, warehouse_0 is a gamelogic.

#

The randomization code is directly from the wiki...

granite sky
#

getPos [] always generates results with 0 z-coord for some reason.

molten yacht
#

pain

granite sky
#

you'd need to copy in the z coord from _center

molten yacht
#

I am not sure how to do that, but thank you very much

#

I thought I was going crazy

granite sky
#

_position set [2, _center#2];

molten yacht
#

Woah, you can just edit it in place like that?

#

Cool.

pallid palm
#

this what i use sometimes

#
// random radius
private _angle = random 360;// angle definition (0..360)
private _distance1 = 90;// distance1 from the center (Radius)
private _distance2 = 90;// distance2 from the center (Radius)
private _position = getMarkerPos "Center";// [_distance, _angle];
_spawnPos = [_position, _distance1, _distance2, 4, 6, 1.0, 0] call BIS_fnc_findSafePos;
royal quartz
#

hey guys. Im using the following code to detect objects in an area around me. A vehicle has recently exploded near me.

(player nearObjects 15);

it returns this:

[2017f32d600# 163959: lha_med_1.p3d LHA_Med_1,bis_o1,2019c49c080# 164035: heli_light_03_f.p3d I_Heli_light_03_dynamicLoadout_F,164042: krater.p3d #crater]

The last object is a crater. Now if I find its type by doing:

typeOf(player nearObjects 15 select 3);

It says its "#crater". Now checking if isKindOf "crater" or isKindOf "#crater" returns false.... anyone know why? Or how I can exclude craters from my list of objects found.

warm hedge
#

Because they are not really regular object

#

Why you need to isKindOf it?

royal quartz
#

I just need to exclude craters from my search of objects. Im trying to check if an area is clear of objects to spawn a vehicle. SO im already excluding, animals, insects, birds etc. But I cant see how I can exclude craters

#

even after the exploded vehicle is removed the crater remains.

warm hedge
#

I guess just compare typeOf is the way

#

Or, I think using other command than nearObjects

royal quartz
#

ill try that. there seems to be a range of craters in the game, craterLong, CraterShort and they dont have a inheritence in common ๐Ÿ˜ฆ

royal quartz
#

I guess nearestObjects?

warm hedge
#

nearestObjects

#

Duh my network is bugging

#

Did I sent the post twice?

royal quartz
#

and then speicify types? The problem I worry about with that is I can specify ["Air", "Ship", "Car", "Tank"] but that dosnt include a whole host of objects with inventory etc that could get in the way

royal quartz
warm hedge
#

Thanks

#

"AllVehicle" or "AllVehicles" I don't recall which

royal quartz
#

ill double check config too see thanks

royal quartz
warm hedge
#

Actually, it there a reason to check it, since createVehicle's "NONE" does it already?

abstract veldt
#

Can "Wrong signature for file" messages in the bottom left be intercepted by HandleChatMessage mission EH?

ionic ingot
#

Hi all
I have a small problem. I want to make a prison transport when i have a BluFor unit in a truck filled with OpFor unit.
i have setup the Blufor unit like this:

[Hostage] JoinSilent AmmoTruckD;
Hostage AssignAsCargo hostage_Truck;
Hostage MoveInCargo [ hostage_Truck , 6];
Hostage AllowDamage false;```

But he keeps going out of the truck, when it start to follow the Waypoints that is setup for it. 
is there a way i can force him to stay inside the truck?
faint burrow
ionic ingot
faint burrow
#
yourGroup addVehicle hostage_Truck;
ionic ingot
#

he is only one unit and not in my group, so i gues i need to use his variable name.

faint burrow
#

In Arma even single unit is in a group.

ionic ingot
#

yes i kon w he is in his own group

faint burrow
#

In your case, you should add the vehicle to the group you're adding the hostage to.

ionic ingot
#

ohh so at it to the OpFor group, i think i got it..

real tartan
#

I am assuming that Strategic Map Module is client side ? and should be only used in SP missions ?

opaque topaz
#

would need permission to use it

proven charm
#

might need more scripting though depending what you want to do with it

gritty parrot
proven charm
#

Is there a reason why HandleChatMessage EH fires only on global chat (and not side chat)?

hallow mortar
#

That's DS/HC specific. On normal clients it fires for other channels.

#

It's just a guess, but I'd speculate it's because DS/HC don't have a player that would be in the side channel to give them access

proven charm
#

hmmm

#

it fires on client only though

proven charm
#

nvm i thought it didnt work at all on DS

#

now im trying to figure why isnt the EH catching player sideChat _msg;

#

i guess its not the same as typing the message to side channel

hallow mortar
#

The note on the EH page that says it doesn't work with chat commands could be a clue

proven charm
#

oh somehow i missed that

proven charm
#

the wiki is contradicting itself when it says first this: "Does not trigger for any of the chat related script command such as systemChat, sideChat, or other." and then it says: "Do not put any of the chat related script command such as systemChat, sideChat, etc in this EH code as it would naturally cause recursion and the game will freeze."

#

see the contradiction? or is it just me XD

hallow mortar
#

so that passage is already partly unreliable

#

You could mention this other contradiction in the wiki channel (and mention that linked message again since it doesn't seem to have actually been updated to account for it). The wiki can be changed to correct it, or Dedmen might provide clarification

proven charm
#

yea wanted to first see if you guys agree

proven charm
#

is it somehow possible to show message like when you type it and press enter to send it, via script command? sideChat always adds quotation marks

little raptor
#

question marks?

proven charm
little raptor
#

I'm blind ๐Ÿฅฒ

split scarab
#

Where in the mission.pbo can I find the real names and values for these mission parameters to use in the "mission override" config?

pallid palm
#

hello all: is there a way to Remove the mag that's in your Rifle, when you Reload, so like if i Reload, can i delete that mag on Reload

pallid palm
#

oh cool awsome man thx alot

atomic niche
#

Might have to manually find the mag in inv and delete it after the reload tho, not sure never used the reloaded evh

pallid palm
#

@atomic niche ok m8 thx you very much this will get me started

stable dune
#

You can debug all parts and check out does it work like you want it to work.
You want just delete "empty" < 5 ammo left mags from unit?

#

Our script will delete without checking how many ammo you have, tiu you asked earlier if unit has under xx ammo left, then delete

pallid palm
#

no no

#

@stable dune i just want the old mag to be deleted and the new mag to come in on Reload, whenever you reload, even if you have a full mag in your gun

molten yacht
#

If working in a foreach loop, and I need to re-use a private variable every time, should it go

private _createdGroup = createGroup [_spawnSide, true];
{private _unit = _x createUnit [_spawntargets, _createdGroup];
 _unit disableAI "PATH";
sleep _interval;
} forEach _spawnTargets;```
#

or should the variable be made outside of the foreach loop and reassigned inside of it

faint burrow
pallid palm
#

oh i see ok cool awsome @faint burrow

#

so i can't remove the mag thats in my gun at the moment

faint burrow
#

But you wrote

i just want the old mag to be deleted

thin fox
#

that's what I do, at least

pallid palm
#

@faint burrow yes i want the old mag or the mag in my gun to be deleted, and the new mag to come in my gun on reload

#

yes i wrote, i want the old mag to be deleted and the new mag to come in on Reload, whenever you reload, even if you have a full mag in your gun

#

like if your going along and shooting and you see you only have like 3 bullets left in your mag, and you reload, i want that mag to be deleted that's in your gun, and the new mag to come in your gun

faint burrow
#
player addEventHandler [
    "Reloaded",
    {
        params ["_unit", "", "", "", ["_magazine", []]];

        if (_magazine isEqualTo []) exitWith { };

        _magazine = _magazine select [0, 2];

        _magazinesCountsPerContainer = [
            backpackContainer _unit,
            vestContainer _unit,
            uniformContainer _unit
        ] apply {
            _container = _x;

            [
                _container,
                if (!(isNull _container)) then {
                    { _x isEqualTo _magazine } count (magazinesAmmoCargo _container)
                } else { 0 }
            ]
        };

        _ammoCount = _magazine select 1;
        _magazine = _magazine select 0;

        _unit removeMagazines _magazine;

        _magazinesCountDecreased = false;

        {
            _container = _x select 0;
            _magazinesCount = _x select 1;

            if ((isNull _container) or { _magazinesCount == 0 }) then {
                continue;
            };
            if (!_magazinesCountDecreased) then {
                _magazinesCount = _magazinesCount - 1;

                _magazinesCountDecreased = true;

                if (_magazinesCount == 0) then {
                    continue;
                };
            };

            _container addMagazineAmmoCargo [_magazine, _magazinesCount, _ammoCount];
        } forEach _magazinesCountsPerContainer;
    }
];
pallid palm
#

@faint burrow oh cool wow Awsome man

#

i love you man @faint burrow its just hard for me to believe that you can't remove or delete the mag that's in your weapon, "i don't know that much i guess" what iv been doing is drop the mag, and reload lol

molten yacht
#

I can't remember the damn command for "force this group to stand up and stay standing"

#

and of course the forums are down (are they ever up anymore)

fair drum
#

setUnitPos

molten yacht
# fair drum setUnitPos

the command naming scheme makes this feel ilke it should be "set unit position" and I hate it, thanks

#

like genuinely thanks but this scripting language makes me feel insane

errant iron
#

How do I make a drone less likely to be targeted? The AI seem very good at spotting and engaging my FPV drones before they ever make it close, and I want them to focus on other conventional threats more often. If push comes to shove, I'll just mark them as captive until they're close to their target, but I'd like to know of other alternatives before going that route.

Also a second question, what happens to a drone (or any turret) object when it's disassembled? I noticed my variables persist on them when they're reassembled, but I'm not entirely sure where those objects go in the meantime.

little raptor
#

it gets broken down into two backpacks, and those backpacks get placed into a WeaponHolder. both backpacks and the weapon holder are objects

#

I guess one of those backpacks maintains the variables

#

and regarding AI spotting, did you make the drones yourself? or do you want a scripting solution for all drones?

hallow mortar
#

Unfortunately, I don't think we have any way to retrieve a reference to the vehicle object from its associated backpacks.

#

About detectability for drones, I've been wondering for a while whether setUnitTrait camo and audible coefs work on vehicles

granite sky
#

IIRC objectParent works in one direction.

#

might be vehicle -> backpack though. I suspect the state is maintained so that static weapons retain their ammunition, for example.

errant iron
#

the script could theoretically work on any drone (or a person with some tweaking >:) but i don't need to initialize every created drone as one

little raptor
ornate whale
spring token
#

"BIS_fnc_VRHitpart" will this command work on objects other than VR_OBJECT?
I was able to see the white edges when I used the "BIS_fnc_VRHitpart" command on a real tank, but when I shot the tank, it didn't change color in the area being attacked.

proven charm
#

i wonder why this script doesnt add the second player to the channel when testing in dedi: ```sqf
waituntil { sleep 0.1; !isnil "chatChannelID"};

// putting sleep 2 here seems to "fix" it

chatChannelID radioChannelAdd [player];

#

the chatChannelID is set through public variable and is not nil

faint burrow
#

Have you checked if player is not null?

proven charm
#

no, checking...

#

yep that was it ๐Ÿ™‚ thx

proven charm
#

question about custom radio channels, do i have to create new channel for each side when i want only same side players to see the messages?

fair drum
#

well. not exactly.

errant iron
fair drum
#

i guess it depends on what you want to do. for instance, say you want to make a status update channel (like hey we captured xx), you might want 3 individual status channels and only worry about adding the units to that channel that are of that side

hallow mortar
fair drum
#

otherwise, you have to add and remove constantly from the channel

#

i personally prefer having individual channels for each side if you can afford it (have the slots) and only have the units of that side added to it, rather than constantly adding and removing from the channel depending on who you want to see it

proven charm
#

im making a chat dialog. so need custom channel for all 3 playable sides

errant iron
proven charm
#

i was thinking of using HandleChatMessage to prevent showing messages from other sides but then they would still be sent over net

hallow mortar
little raptor
#

unless the game uses the trait of the commander for detection (which I'm pretty sure it does not), it shouldn't work

pallid palm
#

oh cool thx thats Awsome @faint burrow

little raptor
errant iron
#

from a few non-scientific tests using _drone setUnitTrait ["camouflageCoef", 0.02]; and sending 16 drones at 20-50m altitude in front of 4 assault squads at ~20% unit skill / 100% skill difficulty, it appears to reduce their initial engagement distance from 200m to ~50m

little raptor
#

yeah the game does use the commander's trait for detection

#

it even works on other vehicles (if a soldier with that trait gets into them and is the effectiveCommander) blobdoggoshruggoogly

granite sky
#

raises an eyebrow

iron flax
hallow mortar
#

I wish we had a similar command for targeting the vehicle itself, but this is useful information

ornate whale
ornate whale
open marsh
#

How to simply reliably and efficiently count

All civilian, independent, opfor that died during a mission, tracking this.

And al Blufor that died

Is there an easy way ,

granite sky
#

Yeah if you want simple and reliable then EntityKilled is the way.

iron flax
#

What would I use in the condition of a trigger to active it by a certain classname?

faint burrow
#

What're the trigger settings?

iron flax
#

I just want a trigger to activate by using the classname of a unit.

tough geode
#

trigger on what? What should the object with the specific classname do?

ornate whale
#

He probably means if a certain type of unit enters the area.

faint burrow
#

That's why I asked about the trigger settings, so that we wouldn't have to guess what we were talking about.

iron flax
#

That's what I thought it would be, but I don't know what the proper syntax for it.

isKindOf == "vn_b_men_jetpilot_10"

^^ this doesn't work

faint burrow
#

That's why I provided the link to the article describing the command syntax.

iron flax
#

I don't see an example that would work in this case.

ornate whale
# iron flax That's what I thought it would be, but I don't know what the proper syntax for i...

Something like this into the activation condition:

{
  if (typeOf _x == "class_name") exitWith {true};
} forEach thisList;

You probably need to set activation to anybody and present. It will then go through the list of present units and check the type.

The only problem with triggers in this case is if you want to check the presence repeatedly or continuously, the unit/s would probably need to leave and re-enter, or at least one more enter the volume.

faint burrow
faint burrow
compact terrace
#

Hey can anyone explain to me how i can make a folderstructure for my kampagne? idk how because everytime i make some folders arma cant find the stuff in it

compact terrace
#

nope that doesnt helped me out

proven charm
#

file patching on?

compact terrace
#

whats that ๐Ÿ˜…

proven charm
#

its launcher parameter, that allows reading of loose files

compact terrace
#

ah okay ill check it