#arma3_scripting

1 messages · Page 475 of 1

astral dawn
#

For path finding there are algorithms like A*, you can try to run it on a set of roads that lie in a circle between two cities

#

It hsould give you what you want

waxen tide
#

Considering AI driving performance i'm not sure that would make things easier.

astral dawn
waxen tide
#

But i noticed that all these silly checks on existing map objects do not impact performance in any meaningful way as far as i can tell.

#

It takes a long time, but if you run this every 3-4hrs to spawn a mission, who cares.

astral dawn
#

Yeah I agree with you, it all depends on the situation and how often you need to perform this

waxen tide
#

well that's one way to make it perform i guess.

astral dawn
#

Yeah... in the Antistasi mission there is a road database as well (for civilians AFAIK)

waxen tide
#

A* is an improved dijkstra as it seems

#

but yeah implementing an algorithm like that is probably better than my branching attempts

astral dawn
#

But that's exactly what you asked for... if the piece of road actually connected to the towns (and not a random piece of road instead)

waxen tide
#

Yes yes

astral dawn
#

Just try to run it not on the roads from the whole map but on the roads between the towns plus some radius (so that the towns are also included) and it should be fast enough

#

I think I tried this GPS script and it was making the routs quick enough

waxen tide
#

The annoying bit is in 80-90% of all cases my script already picks nice spots

#

but sometimes it just derps out and puts stuff in dumb places

#

which i think hurts immersion too much

astral dawn
#

Are you doing some awesome dynamic scenario?

waxen tide
#

of course!

#

In only a few years, it will be done.

astral dawn
#

Hmm sounds nice

#

I did automated roadblock placement in the old antistasi, they would be placed along the frontline, taking into account road width and surrounding buildings 😄
But yeah they were placed in weird places 10% of the time or so

waxen tide
#

I'm only spawning one main AO at the time

#

so only 1 to 5 roadblocks or so

#

so if one is placed really badly, one road might be totally open, if players pick that then zero roadblocks encountered - bad

#

well maybe not but they might laugh their butts off because the roadblock is on a tiny side street right next to the main road

astral dawn
#

hmm for that you could check the road width

#

but these road things get very weird at intersections, I had just to filter out intersections

#

Because it's very hard to measure the road width at an intersection

waxen tide
#

yes.

#

what a lovely site

quasi rover
#

In addAction condition expression, where special variables _target (object to which action is attached to) and _this (caller/executing person) from BIKI, e.g.:
_unit addAction ["Move Unit", {call blabla;}, [], 1, false, false, "","alive _target AND _this == _target AND blabla..."];What does this condition mean? _this == _target

waxen tide
#

== is a comparator. in this case you're comparing if the caller is equal to the target.

#

result is bool, true or false.

quasi rover
#

I know the operator, so what does it mean? _this == _target?

quasi rover
#

Please translate the meaning _this == _target.

waxen tide
#

it's checking if the caller of the script code is equal to the target.

#

idk how to explain it better.

quasi rover
#

Sorry, I don't understand how the caller is the target?

waxen tide
#

with addAction you attach an action to an object. that object is stored in the variable _target.

#

this object is passed into the script as a magic variable

#

so that you may use it inside the script code

#

also the caller of the script code, so the object that called it, is passed as _this

#

so you can do a comparison in your script like _this == _target

#

i'm wondering a bit how that is useful

#

maybe if you do addAction on every player, and want each player be able to trigger it on everyone else but himself or something.

#

(might be talking rubbish here now)

quasi rover
#

I thought when I use the addAction like player addAction ["Move Unit",... blabla... ], I ,as a player, am the _this, and the unit to be moved is the _target, so how _this is _target?

waxen tide
#

you're the object to which the addAction is attached, so you're _target

#

you're also the caller, so you're also _this

#

the terms "target" and "this" etc only apply to the addAction, not to what you're actually doing inside the script you're putting behind the addAction.

#

the unit you want to move has nothing to do with the addAction

#

_target and _this have nothing to do with your script code that addAction executes unless you want to use them for some reason (which you absolutely do not need to do to move a unit)

#

now if you attach the addAction to the unit, then the unit is the _target and you're still _this if you use it.

#

if some other player does it, then he's _this

#

but then you need to walk up to the unit to use the addAction

#

if you use player addAction, then you can use it always

quasi rover
#

Oh I see. I'm trying to understand you are saying. Thanks a lot. 😅

waxen tide
still forum
#

@astral dawn I know a Life site that's selling that Arma GPS you linked 😄

waxen tide
#

I fail a bit to understand how the came_from is saved to each node

#

or, how to best save it myself

astral dawn
#

@still forum I think we must tell it to the author of the GPS script then

still forum
#

Someone posted it on BIF and the scripts they sell for free. But can't find it anymore via google.

#

But their whole store was a big crapshow of stolen together life stuff that they only distribute as EBO so that no one can look inside it and see that it's stolen.
Just average life stuff.

#

the GPS scripts is licensed as GPL which allows selling so they aren't doing anything wrong

open vigil
compact maple
#

@still forum which life site ?

#

i know very well the creator

still forum
#

Don't have the link ^^ I knew a guy ripped their paid scripts and posted them for free on BIF. But google doesn't find me that thread.

compact maple
#

thats sad D:

#

if you remember the name site, tell me please !

#

wasnt it "The Programmer" ? @still forum

still forum
#

Don't remember that website design so probably not

compact maple
#

okay thanks you, the developper of TP is the creator of that GPS

tough abyss
#

The brofiler just locked up with the sqf assembly pbo still in the mod tried without it and looks like the main contributor unde the CBA every frame handelr is acre fnc_speaking but it is 0.5ms so not massive - https://imgur.com/wfDqztJ

#

The bad contributor hasn't climbed yet so once it does should see it now, nice job Dedman 👍

still forum
#

My name has no a inside it

#

Only 2ms of frametime is in unscheduled scripts. So that is atleast currently not causing a framedrop

dusk sage
#

@still forum If it's GPL, they are required to distribute the source (not as an EBO) along with it

#

Or give them access, and directions on how to view it

still forum
inner swallow
#

Ambient animations were pretty broken on DS when I tried it last

#

Can't see that thread just now but will when I get home

tough abyss
#

Today something else has happened, not seeing the climb in unscheduled but fps is down to 30 again (from 60-80) and its all in visUA, any ideas what causes that? - https://imgur.com/UbOQJHg

#

It is alternating as well, one frame is 22 and the other is 40+, so lots of stuttering with this only being large every other frame

hollow thistle
#

You're playing antisatsi? I was playing few days ago and I've noticed that when there is an enemy jet our and server fps were around 20. The moment we destroyed it Server fps stabilized to ~45.

#

I wonder if this might be related to integrated VCOM ai or smth.

tough abyss
#

There are a few different aspects, none of them are directly scripts, visUA is the big climber, sounds for cars is another (so AI count) and then occasionally indirectly something on frame handle.

still forum
#

parWorldVis checks what things are visible against particles

#

aka "Is that object visible or are there particles in the way?"
What's weird is that it should be multithreaded. As parWorldVisJob tells you. Things with Job at the end are usually "wait till multithreaded jobs are done"
but they don't show up on the profiler at all. But that could be just because there is no scope inside the job

#

actually no.... parWorldVisJob is the actual job not the "waiting for jobs to be done" so there is only one job there.

#

Would be interesting to know which positions it's checking

#

Not sure. Might be the occlusion check. To not render things that are not visible?

#

In your screenshot I'm seeing rain. Aka lots of particles to check. Maybe that's why it's so slow. And it only runs on intervals. Not every frame. Which explains why it's only there every few frames

dusk sage
#

@still forum Yeah, they're not giving a 'written offer to distribute the source code', and I doubt they have any intention to selling EBOs

tough abyss
#

It was raining but it was also raining before the major performance drop off occurred. Might explain the jobs beneath it but not why the cost of those checks was 40x what they usually are

compact maple
#

hey guys, how do i do that: if i want to create some AI, who stay at a certain position, and not attacking me until i approach them ?

strong shard
#

@compact maple create unit, assign any idle animation in infinity loop (using AnimDone) and disablAI 😃

compact maple
#

that could work but thats dirty isnt it

strong shard
#

@compact maple it is normal, when unit find enemy, we enableAI and disable animation

compact maple
#

will do the job, thanks

strong shard
#

@compact maple or you can use setCaptive

meager heart
#

setCaptive for that ai will not stop him from shooting at players... with setCaptive for the players... maybe 😃

ornate quail
#

Hey, does anyone know why my while loop is not executed? I'm running CBA and ACE, do they block it for some reason?

    {
        _target playActionNow "kka3_arrested";                                                //Make Gesture arrested
        if (currentWeapon _target != "") then                                                //Check if Weapon is selected
        {
            _target action ["SWITCHWEAPON",player,player,-1];                                //Unselect Weapon
        };
    };```

if I put true instead of "kka3_isHostageWalk" in the condition, it still doesn't run. 
Well to clarify, the loop runs once, but doesn't "loop" as it should
still forum
#

error inside the loop would make it only run once

ornate quail
#

Could it be if (currentWeapon _target != "") { _target action ["SWITCHWEAPON",player,player,-1]; };

#

I have no time to test it right now, but I made bad experience with != operators, could that be the issue? So changing it to if !(currentWeapon _target == "") could solve the issue?

digital jacinth
#

Is it possible to add a new parent element for ace interaction with some other object. Right now I am trying to add an interaction point to a selection name of a unit, it just does not show up and I am not sure why.

private _action = [
    "diw_action", // internal identifier
    "label", // shown to player
    "", // icon
    {systemChat str _target}, // code
    {true}, // condition
    {}, // insert children code
    [], // params
    "head", // pos
    5 // distance
    ] call ace_interact_menu_fnc_createAction;

["CAManBase", 0, [], _action] call ace_interact_menu_fnc_addActionToClass;

I left the parent array for addActionToClass empty as I am trying to make my own interaction point.

#

so far it only works when you are using pre existing points which is not what i want

still forum
#

@ornate quail no

#

can't see an error in there 🤔

ornate quail
#

If I haven't misread your post, you can make new parent classes in Configs, so I would assume it works in scripts as well.

#

@still forum my next guess would be currentWeapon when having no weapon and returning the value of currentWeapon it returns "". But if you want to select Weapon "", nothing happens, the unit is not holstering its weapon

meager heart
#
player call {
    private _unitDude = createGroup playerSide createUnit [typeOf player, player, [], 5, "NONE"];
    _unitDude spawn {
        while {true} do { 
            _this playAction "gestureGo";                                         
            if (currentWeapon _this != "") then {
                _this action ["SwitchWeapon", _this, _this, -1];                                
            };  
        };
    };
};
```loops^*
ornate quail
#

So it doesn't work because I didn't change player to _target? The rest seems to be the same

#

Or am I wrong?

meager heart
#

it works with player too 😃

ornate quail
#

Yea, but maybe not in my script as _target is not the player

still forum
#

a local AI?

strong shard
#

i think he not define _target and/or getVariable return false

still forum
#

@strong shard then you didn't read what he told us before

meager heart
#

it works once he said, so it does return true, Vlad

ornate quail
#

_target is defined, I was able to use it in the script before. The loop is just a code snippet of the actual script.

#

_target is defined by Ace and given as parameter in my script

strong shard
#

@ornate quail it is ACE action?

ornate quail
#

Yep

strong shard
#

mb this code run in unscheduled environment?

still forum
#

yes it does

#

Wait..

#

duh

#

Should've maybe mentioned that

strong shard
#

unscheduled environment has limit on while loop 😃

#

if this code outside scheduler then it looks like one iteration because this limit reached in one frame

meager heart
#

^

ornate quail
#

Not exactly sure what you mean by that, I'm not really into scripting. I'll read some stuff about scheduled and unscheduled environments and reply tomorrow if I have any more questions. Thanks to all of you :)

strong shard
ornate quail
#

Thanks

cold pebble
#

Anyone know if in a listbox, when you lbAdd something - can you use <br/> or something to have multiple lines for that specific selection?

noble pond
#

likely no @cold pebble

#

but i'm not available to test the theory at the moment to confirm

waxen tide
#

@hollow thistle Look into RHS Afterburner bug if you're using it.

hollow thistle
#

I am. I will check this out, ty for info.

#

Do you have any link? I can't find anything recent on Google :/

waxen tide
#

@hollow thistle No but i remember very recently either reading a bug report somewhere or someone complaining about RHS T-50 afterburner causing loads of issues and i remember that being the case a long time ago. So when you say killing a jet doubles fps and you're using RHS then that would be a reasonably confident first guess.

paper thistle
#

how do i disable all scops/muzzels accesorys and bipods for my weapon ? so i only can use the stuff i tell it can use ?

fossil yew
#

Is it possible to freeze all AI at once (keeping the position and animation they were at moment of freeze) while letting the environment active?

astral dawn
fossil yew
#

Thanks, I didn't even consider this!

ornate quail
paper thistle
#

oh well if there are no such script i can fit into my config for the new gun then it is so but thanks anyway for letting me know 😃

ornate quail
#

Well, you're making a new gun?

paper thistle
#

yep

ornate quail
#

Then it's not really scripting I guess. I have no time right now to send you an example. For Configs there is of course a way to restrict only specific attachments. Lemme try to find an example real quick

paper thistle
#

i am in no hurry to get it out so you can send me an example later on if you want 😃 i am just slowly trying to learn bohemia way of coding in stuff

ornate quail
#

There's a Config sample and explanation. Should be clear on how it's done. If not then I could send you a code snippet tomorrow. Anyway, Config stuff is related to #arma3_config not scripting.

paper thistle
#

oh ok sorry thought it was almost the same 😛

ornate quail
#

It kind of is but at the same time not at all 😋

paper thistle
#

see with arma you learn something new everyday and in my case i have learned alot of stuff of arma just by trying to make a new gun 😛

ornate quail
#

Modeling, Textures, Animations, Configs, sometimes scripting when it comes to bolting functions etc... Yea you really need a very universal knowledge when it comes to weapons, but you could do the same for vehicles etc 😄

paper thistle
#

indeed 😛

meager granite
#

Hm, how come there is trigger distance for "Fired" event handler?

#

I have "Fired" event handler on remote jet, and it triggers only if jet is close to camera (few hundred meters close only)

#

Me and remote jet are both clients, server is not involved

#

(FiredMan is affected too)

meager granite
#

Seems like all weapons are affected and trigger distance is different

#

Hm, I guess testing from server side mislead me to believe that Fired\FiredMan trigger regardless of distance, looks like they don't for clients.

#

I wonder what are the conditions for event triggering then, distance seems to be different for different weapons.

tame portal
#

@meager granite maybe it's the server not broadcasting that event with the other client due the distance and him being outside of the zone where he receives client updates from the jet

#

As in, too far away to bother updating since they can't see each other anyway to save processing

meager granite
#

Yeah, probably some kind of optimization

#

Flares themselves actually do come out though, just no Fired event

#

Distance being different for different weapons is what stumps me, I wonder how it is calculated

meager heart
#

i have that eh in cas (plane) support thingy

private _ehID = _plane addEventHandler ["Fired", {
    params ["_plane"];
    if (assignedTarget _plane isKindOf "LaserTargetW") then {
        [_plane, 3] remoteExec ["SL_fnc_supportProvider", JTAC_player];
    };
}];
```RE there that is just report message for jtac player and was no issues with distance 🤷
meager granite
#

Sure I can script broadcast everything but I expected to use engine functionality to my advantage

#

With Fired working on remote entities

#

Nothing is done easy in Arma

meager heart
#

¯_(ツ)_/¯

#

also maybe dynamic simulation is the problem 🤔

meager granite
#

No, everything is always simulated.

#

Pretty much having Fired event handler on remote entities as client is pointless now, might as well do if(!local ...) exitWith {}; or not add it in a first place.

#

Actually, looks like I knew about this for a long time and just forgot, vanilla smoke screens don't even spawn on remote vehicles if camera is too far away, since they're created through Fired event handler script.

opaque lynx
#

Hello, I'm new to scripting and am attempting to remove specific items from ACE Arsenal. I've had success removing firearms via [this, ["hlc_smg_mp5k"]] call ace_arsenal_fnc_removeVirtualItems. However, when attempting to remove something such as [this, ["optic_nightstalker"]] call ace_arsenal_fnc_removeVirtualItems the item remains. Could anyone shed some light on why I'm able to remove primary items, but not secondary attachments?

#

My ACE version is 3.12.2.

opaque lynx
#

So far I can remove primary weapons, pistols, launchers, rail attachments, magazines, bipods, etc. I just can't remove Optics for some reason

#

Resolved: capitalization matters. -- Nightstalker vs nightstalker

peak plover
#

Display EH onSliderPosChanged can only have string?

still forum
#

explain?

peak plover
#

Let me check agian, had an error, probably my own typo

#

Nope

#

It's just ctrlSetEH

still forum
#

you said display although you mean control?

peak plover
#

yeah

still forum
#

and you didn't even say you are talking about Set instead of Add

peak plover
#

Exactly, my bad

#

There is no ctrlAdd?

still forum
#

bad boio 🔨

#

there is

peak plover
#

Ohh thanks

#

That wasn't in see also

#

So I thoguth it didn't exist

#

I gottaa use dis

still forum
#

It is now! (∩`-´)⊃━☆゚.*・。゚

peak plover
#

👏🏻

cosmic lichen
#

MIght be a stupid question, but what is the difference between .h, .hpp and .inc?

still forum
#

none

#

just human made naming

cosmic lichen
#

I see, thanks.

still forum
#

no functional difference at all

#

SQF files can be called script.blabbelblubber if you wanted

peak plover
#

blubber ducky

compact maple
cosmic lichen
#

They usually do

compact maple
#

hm thanks i will try it later

ornate quail
#

I don't know what it is, but it still does the loop only once, any ideas?

[_unit,_target] spawn 
    {
        params["_unit","_target"];
        while {true} do                        //while Var true //_target getVariable ["kka3_isHostageWalk", false]
        {
            _target playActionNow "kka3_arrested";                                            //Make Gesture arrested
            if (({getNumber (configFile/"CfgWeapons"/_x/"type") in [1,2,4,5] } count [currentWeapon player] == 0) then                                                                        //Check if Weapon is selected
            {
                _target action ["SWITCHWEAPON",_target,_target,-1];                            //Unselect Weapon
            };
        };
    };```
still forum
#

Your count is completly useless. Why?

#

and why use / instead of >> ? / is slower. It's only benefit is that you afaik don't need the parenthesis around it. But you have them anyway

#

You should add a small sleep if running once per frame is enough

#

did you try to add logging to check if it reaches till after the if statement? Before the closing } for the while code?

ornate quail
#

I haven't really thought through that line of code, it works but it isn't perfetct. Still the loop runs only once

fringe yoke
#

Is there a get version of ctrlSetTextColor? It would appear there is not

astral dawn
#

@meager granite Probably your EH doesn't fire because you added it on the client instead of server?

ornate quail
#

@still forum getNumber(configFile>>"CfgWeapons">> (currentWeapon player) >>"value") == 0 like this?

still forum
#

yeah.. similar to that

#

but in your thingy you test type in 1,2,3,4,5 that's not value == 0

cold pebble
#

Anyone know if in a listbox, when you lbAdd something - can you use <br/> or something to have multiple lines for that specific selection? 🤔

compact maple
#

@fringe yoke ye, i dont think there is

still forum
#

@cold pebble you already asked that. Try it out. If it doesn't work then probably you can't

ornate quail
#

Alright, by adding a delay the loop was working, but as I expected it became laggy. I just found an EH who does the job as well

compact maple
#

@cold pebble give it a try by assign it the proper style and a ctrlSetStructuredText ?

compact maple
#

LB_MULTI 32 0x20 Makes CT_LISTBOX multi-selectable (see also lbSetCurSel, lbCurSel, lbSetSelected, lbSelection)

#

I think that's just for selecting multiple lines, isnt it ?

cold pebble
#

🤔

#

Thanks, I'll have a try

compact maple
#
For list boxes, the usage of 'ST_' style constants (ST_MULTI & ST_TITLE_BAR) behave differently than expected for other controls, so use the corresponding 'LB_' (LB_TEXTURES & LB_MULTI) list box style variants instead.

style = LB_TEXTURES; // solid scrollbar
style = LB_MULTI; // multiple item selection
fringe yoke
#

Not sure if there is a better place to ask in this discord, but I am having issues with file patching using the ACE development environment

#

I had it working previously, but after a fresh install of Windows I seem to be unable to get it working again

still forum
#

You have a z folder in your Arma directory. And -filePatching parameter set

#

that's about all you need

fringe yoke
#

Yeah, got those 🤔

still forum
#

maybe the CBA cache disable PBO too if you are doing script stuff

fringe yoke
#

Have that too

#

when I used setup.py it didn't run saying I was missing the ACE Development Environment

still forum
fringe yoke
#

isFilePatchinEnabled does return True

#

I setup all the folders manually since I couldn't get setup.py to work

still forum
#

setup.py is for setting up your pdrive for building

fringe yoke
#

I have a P drive too

#

I can build a release just fine, so everything required should be setup correctly

still forum
#

setup.py is only for building stuff. Afaik not for ingame stuff.

#

So you have the file Arma 3\z\ace\addons\common\config.cpp ?

fringe yoke
#

i know, I was just mentioning that I got the missing the ACE Development Environment so the folders were setup by me

#

I am not working on ACE

#

but I have the equivalent for my mod

still forum
#

sooooo... What doesn't work?

fringe yoke
#

file patching

#

I load up Arma

#

find a bug

#

fix the bug

#

doesn't get recompiled

#

I have to build and relaunch before changes are seen

still forum
#

Answer my question then.

#
debug console. `loadFile` with a `\z\ace\addons\...` path to a file, updates if you update that file?
compact maple
#

so theoretically it's possible to work with this filepatching for other addons?

without having to close and reopen the game ?

fringe yoke
#

You can build with build.py from ACE or with makePBO and then by using file patching you don't need to relaunch when working on a mod

compact maple
#

I can import my OWN mods into the addons ace folder ?

still forum
#

filePatching works with everything

fringe yoke
#

you can use it without ace being involved in any way

still forum
#

it literally checks if a file can be found in game directory and loads it from there instead of PBO. any file.

compact maple
#

im a bit lost. i should activate the pbo first on my launcher right ?
then when i'm making modifications, i just have to delete the PBO and to repack it, and the game will reload it ?

still forum
#

no

#

you cannot edit pbo's while the game is running

compact maple
#

so it need to be basic folders ?

still forum
#

If a file on the same path exists in your game folder. It will load that

#

having a PBOPREFIX will help

compact maple
#

it does have a pboprefix

fringe yoke
#

I fixed my file patching issue anyway.
I used mklink /J "[Arma 3]\z\mymod" "P:\Arma3Work\mymod"
Arma didn't like that for file patching for some unknown reason (P drive is also all junctions)
I had to use mklink /J "[Arma 3]\z\mymod" "[My Documents]\mymod"

#

then it worked just fine

compact maple
#

i got it, its working, thanks you two

still forum
#

junctions afaik don't work across file systems.. Wrong. But they only work on NTFS.

#

I use symlinks. Never had any problems

fringe yoke
#

Windows Explorer had the paths working just fine, same with my text editor. Oh well though, easy fix ¯_(ツ)_/¯

ornate quail
#

Is there a way to return the current Action / Gesture? For example I want to prevent the player from switching weapons, but AnimationState doesn't work as it's not an animation but a Gesture/Action.

still forum
#

@meager granite range for the WeaponFired event is max (ammo.visibleFire*ammoCoef.visibleFire, ammo.audibleFire*ammoCoef.audibleFire);
Coefs come from silencer for example.
I'll add that to the wiki notes for that event

#

Don't know about FiredMan but I'd guess it's the same.
actually all "Fired" effects are controlled by that. Adding heat to the weapon (TI), the sound (obviously), the ejected cartridge being spawned (also obvious), FiredNear EH, and maaaaybe.... potentially also notifying nearby AI. If they are local to your computer, not the server.

astral dawn
#

I guess if he added them at the machine which spawned the units then it would work without the distance check, right?

still forum
#

locality is what matters. Not who spawned them

#

If you add the EH where the unit is local then yes. It would fire locally and not depend on the range of that network event

astral dawn
#

Aren't they local to you when you createVehicle them?

still forum
#

For a vehicle. yes. Until someone get's in the driver seat.
For a unit.. You don't createVehicle a unit

#

createUnit a AI it is local to you. Until you add it to a group. The it's local to the groups leader

earnest path
#

Noob question for the day : what does FMS stand for. I have been googling for it but cant get an answer

astral dawn
#

Finite State Machine

still forum
#

FSM?

earnest path
#

That one yes

still forum
#

FMS is also False-Memory-Syndrome

astral dawn
#

Oh lol 😄

earnest path
#

Obviously in Arma 3 terms

astral dawn
#

It's a way to implement a sertain set of actions or states... like a traffic light IRL or in arma (and other games) AIs are made with FSMs

still forum
#

Finite State Machines have states and transitions.
A FSM file defines SQF scripts for the conditions for each transition. And the code that's executed on a transition to a different state.

earnest path
#

Ok i found the wiki in bohemia i will read it up thank you my issue was typing FMS rather than FSM

astral dawn
#

So if I had to make the EH run all the time regardless of distance on the server, do I have to watch the vehicle's locality constantly and add the event handler to the machine who now owns the vehicle?

still forum
#

Yeah.. Think so.
Don't know a way to make the EH transfer automatically

#

There is a locality changed EH tho

meager granite
#

@still forum Thanks for insight. Different trigger distance indeed gave me an idea it has to do with some config values related to visibility or sound audibility

astral dawn
#

That's weird, I recall I used the 'fired' EH well on the server, it was working all the time.

meager granite
#

It does for server

#

On client it doesn't trigger if camera is far away

still forum
#

The client always sends the message to the server. But he also sends along a "Range of where this event is relevant" and the server decides based on that which clients to notify about it

meager granite
#

I wonder if shooting slow projectiles (missiles, bombs) still triggers regardless of distance, probably does

#

Actually, might be not, considering that Fired doesn't even return the entity of the projectile (There was something about projectile entity being null in Fired event on remote vehicles, can't fully recall now)

still forum
#

Maybe...... reyhard recently mentioned that CfgAmmo has eventhandlers. It has a fired eventhandler. The projectile might be spawned regardless of FiredEH firing. And if the projectile spawn calls the CfgAmmo eventhandler that might work. But the eventhandler is config only

meager granite
#

Yeah, there is no projectile in Fired event handler if shot is slow. And no, Fired event handler still doesn't fire over certain distance regardless of shot kind.

still forum
#

That thing also influences the muzzle flash and cartridge drop and stuff. I wonder what happens when you have a silencer that reduces audible/visible distance to 0. Stand next to the guy but don't see/hear him shooting? 😄

meager granite
#

The perfect silencer, doesn't even show you shooting 👌

still forum
#

Addition to that. On serverside the range is multiplied by 2. and used as the "error" value. error specifies the priority of getting the message out. And if the message is above a max age. It will just get discarded.
So it should technically still arrive. Just after some time. In your case(Or in any case if it is too low) the message will timeout before it's priority get's high enough to be sent out

#

That is then dependent on MinErrorToSend/MinErrorToSendNear setting

#

Waaah.. Forget half of what I said. Everything about priority and time

#

error = visible value (from before) * 2.0
agecoef = 1- (currentTimeInSeconds-timeWhenMessageArrived)*(1/5)
errorCoef = (20*20) / (firePosition distance cameraPosition)
if THEN
error*ageCoef*errorCoef < MinErrorToSend or < MinErrorToSendNear then the message is discarded

#

I hope that's understandable?

#

Having a hard time with this networking stuff.

#

If you have time. Can you write that up into a wiki note that I can add on the eventhandler page? I don't feel like my brain is up to that task.

meager granite
#

Sure, I will add a note about trigger distance.

still forum
#

I already added a note before. But I missed all this error value coef stuff

meager granite
#

Ah you mean in-depth details. Maybe its better to just mention that it is dependent on visibleFire and audibleFire as well as connectivity

still forum
#

Yeah. Maybe look at my note. Maybe you're fine with it already

meager granite
#

Hm, Tigris\Cheetah cannon ammo has values of

        visibleFire = 38;
        audibleFire = 200;
```and event fires are max of approximately 12600 meters, not sure if these values are related
compact maple
#

quick question, what would be the good syntax ?

onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call life_fnc_teleport;";
18:53:15   Error Type String, expecting Boolean
meager granite
#

onMapSingleClick should return boolean, life_fnc_teleport seems to be returning string instead of boolean

compact maple
#

@meager granite i got it, thanks, its fixed

still forum
#

?

astral tendon
#
[_object,false] remoteExec ["enableSimulationGlobal",2];
#

can some one add this exemple for players to call the enableSimulationGlobal?

still forum
#

no.

#

it's wrong

astral tendon
#

fixed

still forum
#

Now it's correct 😉

astral tendon
#

because

_object enableSimulationGlobal false;

Does nothing for clients

still forum
#

Done.

astral tendon
#

Thanks.

rough fiber
#

Hey, is the GPS displayCtrl still findDisplay 311 displayCtrl 101 because when I add a ctrleventhandler it does nothing?

tough abyss
#

is it possible to remove items/ blacklist items from an ace arsenal" ace_arsenal_fnc_openBox" rather than initbox? if so what is my route?

fringe yoke
#

Does anyone know a way to use hideObjectGlobal without removing collision?

meager granite
#

Use some invisible object instead?

fringe yoke
#

The object is a player's object though

still forum
#

@tough abyss No. But why not initBox first?

outer fjord
#

Is their a function to determine if a unit is in smoke?

fringe yoke
#

Is there a way to get the number of people connected to a server?

#

not allPlayers, but the total connected, even people in the slotting screen

still forum
#

Don't know if PlayerConnected EH fires for them. It could but probably doesn't

fringe yoke
#

Basically what I am trying to do, is wait for everyone to be fully loaded into the mission at the start

#

so I need to know how many people are still loading

meager heart
#

maybe playableSlotsNumber will helps

still forum
#

Don't know how that could help...

#

number of playable slots doesn't give you any info about how many are filled

meager heart
#

"filled" slot taken by player ?

#

playableSlotsNumber > Returns the number of available slots in mission per side (both empty and taken).

#

🤔

#

also playersNumber 🤔 x2

fringe yoke
#

Players who claimed a slot in the lobby but didn't start the mission are counted as well.

#

Looks like that might do it

#

kind of annoying side is required, but I should be able to make it work

#

AI bots will be treated as valid players and will be counted too oof why

still forum
#

but you can also count the AI's by counting the !isPlayer in playableUnits and count them out then. playableUnits only contains spawned in units

fringe yoke
#

yeah, just gonna make it messier than would be ideal

edgy halo
#

@rough fiber the display must be visible

waxen tide
#

Is there a way to spawn units into a flying plane directly? As cargo, not crew? BIS_fnc_spawnCrew works fine to spawn pilots into flying planes, but there does not seem to be an equivalent for cargo. I know about moveInCargo but i don't like that i have to spawn units somewhere first and then move them in.

waxen tide
#

Meh. I just unpacked the functions_f pbo, and in line 87 of fn_spawnCrew.sqf you find:

        _unit = _grp createUnit [_crewType, position _vehicle, [], 0, "NONE"];
#

So they just spawn the AI on the same spot as the vehicle, and then they're later moved in:

        _unit moveInDriver _vehicle;

That's one hacky solution. I mean it works but if you put a sleep 1; in there the vehicle looses all wheels and the soldier dies 😐

meager granite
#

No there is no way to spawn unit in vehicle, only spawn then move in

#

moveIn* commands don't care about unit position, spawn then anywhere you want.

#

Look at moveInAny, might be what you want

waxen tide
#

I was thinking of just spawning them outside the map in the air, but i am concerned if lags etc happen. The BIS function is only safe if the unit is moved before the unit/vehicle takes dmg by being glitched into each other.

#

But thx for confirmation Sa-Matra i'm never quite sure i missed nothing.

sharp bronze
#

Hi does anyone know the script for arma 3 rp so only gangs or police can open gates

brave jungle
#

trying to use BIS_fnc_showRespawnMenu
Everything loads but the respawn button does nothing? I can't see where I need to call extras, as they seems to call eachother?

tough abyss
#

hey i have a question not around here so often but i am searching for a Sandstorm script that has really bad visibilty

#

basically with very limited vision

brave jungle
#

Armaholic has one

tough abyss
#

is it the MKY one ?

brave jungle
#

no idea

#

i've seen one there before

tough abyss
#

my unit used that one before but its not really what i am searching for

#

its not really thick

brave jungle
#

that looks good enough

tough abyss
#

uhh yes

#

thank you very much

dry inlet
#

Hey Guys, could Need some help. I wanna sort vehicle classnames in two groups, armed and unarmed. Does anyone know how the check could be done? Already looked in the config viewer but there aren't any informations about the weaponry of a vehicle, or I'm to blind to find it.

austere granite
#

Check for weapons confug entry

#

Exclude flares and horn

waxen tide
#

Is there a way to access the preconfigured unit lists for infantry groups that you can place in editors via skript? I looked at the config but i didn't find it.

digital hollow
#

Look at CfgGroups

waxen tide
#

Oh i'm an idiot. I looked in there and just totally overlooked it. Thx.

fierce ingot
#

Can you execute SQF's while in zeus using achilles?

buoyant steppe
#

Depends on the nature of the script

#

Because some require to be run from the init of the mission

#

And if you have to execute it on an object

#

Thats not a vehicle

#

Then you have to give it a variable name

#

And use the execute code module

fierce ingot
#

So you can only execute it on objects?

buoyant steppe
#

No

#

You can execute sqfs on anything

#

Its just that objects dont bring up an init field

#

When you try to edit them in zeus

#

Unlike vehicles, ai and players

fierce ingot
#

Ah okay i get it now

#

cheers lad

buoyant steppe
#

Np

fierce ingot
#

just one more question, if you assigned them a variable to an object via a module, then ran an execute code module, wouldn't you be able to bypass the init limitation?

buoyant steppe
#

Exactly

#

Thats why you should give objects variable names if you want to run scripts on them

fierce ingot
#

ah okay, that makes it alot more clear

buoyant steppe
#

You can just "this" your way with zeus :p

#

Unfortunately

fierce ingot
#

can you run execute code on objects?

#

if you can use this

buoyant steppe
#

Unfortunately not

#

Again, hard coded behaviour

still forum
#

if there was a module sure you could

#

but I don't know if achilles has one

buoyant steppe
#

Achilles does have a execute code module

#

But you can't drop it on an object and execute the code

still forum
#

you can use cursorTarget to get the object you are aiming at

#

not sure if that works well with zeus camera

buoyant steppe
#

you can also save your zeus mission and then copy the sqf code into the execute code module and have a prepped zeus mission loaded without dealing with the 3den editor

fierce ingot
#

wooo that might also work

earnest path
#

Does anyone know why 0.03 min 0.2 results in 0.03

meager heart
#

lol

still forum
#

because 0.03 is smaller than 0.2?

#

Basic math?

#

Primary school?

earnest path
#

Ah i know that but i didnt read the min function properly

tame portal
#

did you think it's going to subtract? :P

still forum
#

probably thought the minimum function returns the maximum of the two numbers

lusty canyon
#

possible to create conical light sources (flashlight)? if not, can you hide a street lamp objects body but still keep the light it emits?

still forum
#

hideObject might work on street light

lusty canyon
#

hideobject removes all

still forum
#

diretional light with only scripting. no.

lusty canyon
#

is there a flashlight object mod i can just attach to stuff?

storm monolith
#

Basically, we've been trying to make a Music Mod. And it works great, before we decided to create another music mod because we wanted two seperate mods. Now only one of them loads. Great.... Any suggestions?

snow pecan
#

Conflicting CfgPatches entries most likely

#

Make sure they're both named differently

storm monolith
#

They are both named differently

#

We've checked.

snow pecan
#

maybe double check PBOPREFIX paths as well

#

¯_(ツ)_/¯

gray geode
#

@tame portal ill go gay for you

tame portal
#

wot

winter rose
#

who wouldn't, I mean

waxen tide
#

There is a nice editor module to spawn mines - can i use that with a script, too? My google fu failed :/

storm monolith
#

You could probably call the mine function through a script. Not quite sure which fnc it is, but you could probably find it pretty easily in the function viewer.

#

Don't take my word for it though

astral dawn
#

Hmm I remember Dedmen said that the profiler addon dumps all local variables' valued to the .rpt on script errors. How do I activate this? I've installed the intercept and the ArmaScriptProfiler addons and they seem to have loaded fine.

still forum
#

not the profiler

#

the debugger

astral dawn
still forum
#

yeah. Just made a release build on there

astral dawn
#

Cool, I'll check it soon. So tired of these errors

drowsy hollow
#

Since when does synchronizedObjects building no longer return anything (for buildings)? This broke some of my missions. :(
synchronizedObjects otherUnitThatIsSyncedToABuilding still works though.
Edit:
Seems this is true for all "non-intelligent" (except game logic)? objects. e.g. also empty vehicles.
Related: https://feedback.bistudio.com/T126516
Edit2: Interstingly get3DENConnections building select 1 still works (but only in 3DEN obviously)

waxen tide
#

@astral dawn what intercept? 😮

astral dawn
#

IF you google it up you will find it easily

drowsy hollow
#

Should I ping someone (specifc) about this synchronizedObjects bug?

still forum
#

Are you using that for a eden module script? That would also have a second way to access synchronized objects

drowsy hollow
#

No, it has nothing to do with 3DEN, but afaik get3DENConnections building select 1 would be the equivalent command in 3DEN ... which still works.

high marsh
#

maybe it'll pop up then

edgy halo
#

//Script 1

_handle1 = [] spawn {sleep 10;_h="";};
_handle2 = [] spawn {sleep 10;_h="";};


handlearray = compileFinal (str [[_handle1],[_handle2]]);
systemChat str handlearray;

// Script 2
_test = handlearray;
systemChat str _test;
``` I'm using compileFinal on a array, how do i get the array back to normal since it returns a code with an array in it
still forum
#

call it

edgy halo
#

does not work

still forum
#

call it.

high marsh
#

call compileFinal

still forum
#

oh I see

#

yeah you cannot str a script handle

edgy halo
#

tried alot of things

strong shard
#

@edgy halo code is wrong, you can’t convert string to script-handle

still forum
#

other way around. script-handle to string.

#

both ways

#

and reverse!

edgy halo
#

Well, how would i do it different, i want to store script handles on client . and let servert execute code on client and check if it is still running

still forum
#

🍌

#

just store the script handle in a normal variable

#

without compileFinal

edgy halo
#

i dont want any client to overwrite it

still forum
#

Can't

#

simple

high marsh
#

shrug Both ways and reverse dedmen, I think I found your kink.

edgy halo
#

I dont get you Dedman, can you give a small example

still forum
#

i dont want any client to overwrite it can't.

drowsy hollow
#

@high marsh synchronizeObjectsAdd doesn't work either. The problem isn't that the objects aren't synced. It's that synchronizeObjects simply doesn't return anything sometimes.

still forum
#

just store the script handle in a normal variable


//Script 1

WIT_handle1 = [] spawn {sleep 10;_h="";};
WIT_handle2 = [] spawn {sleep 10;_h="";};

// Script 2
systemChat str WIT_handle1 ;
edgy halo
#

I should be able to do that but i will have to make some if statements instead

quasi rover
#

Is there simpler expression than this? :
(cursorTarget isKindOf 'CAR') OR (cursorTarget isKindOf 'TANK') OR (cursorTarget isKindOf 'Helicopter')

still forum
#

no

quasi rover
#

thx Dedmen

meager granite
#

I wonder if pre-scanning entire CfgVehicles config and then doing typeOf cursorTarget in classesList will execute faster, probably will

still forum
#

if you prescan for these isKindOf's then yeh

meager granite
#

Yeah that's what I meant

#

Gonna test this now for heck of it

still forum
#

Recently found out that CfgVehicles config has fast lookup enabled

#

Very few classes do. The others just iterate over all entries

#

Although I thought they were all hashMaps.
But CfgVehicles has some special thingy to find entries faster

meager granite
#

PreloadConfig?

still forum
#

ye

meager granite
#

Yeah noticed that some time ago too

#

Nope, in array is much much slower 0.00868ms vs 0.00180ms for triple isKindOf

#

count classesList => 517

#

Thought in array was quicker

still forum
#

I can immediately see that you have a Intel CPU 😄

meager granite
#

Yep, why? Does arma utilize multi-threading well for such searches?

still forum
#

no

#

I don't yet know why. I guess better prediction and bigger cache

#

I made a mod that replaced the interpreter. I think about 10x speedup on AMD. None on Intel because Intel was already at the edge

#

I'm still on buldozer though. Dunno how newer AMD fares

waxen tide
#

Much better. Honestly i am tempted to start a kickstarter for a new pc for dedmen. It is sad to see someone competent wasting time on optimising for bulldozer µarch

queen cargo
#

Hah... Dedmen is fine with Bulldozer
The Latest AMD family May be better, but there should be no pressing issue with the Bulldozer Plattform yet
Hell... Even my phemom II still is doing fine! Just that I Start to feel that bottleneck in modern Applications more and more.. But that has to do with less optimized Apps

waxen tide
#

Well when i went from Phenom II to Skylake the jump in performance in ArmA was gigantic. Easily doubled or tripled fps in multiplayer. TOTALLY OFFTOPIC THO

meager granite
#

Being on worse hardware is a good stimulus to optimize your stuff well

waxen tide
#

Usually i would concur, i used to marvel at what people did with super cheap 8bit risc hardware and inline assembler. But the Bulldozer µarch is not just linerarly slower, it is simply a different (failed) approach that is now entirely irrelevant. I don't think it is worth optimising for it at all especially since even AMD moved much closer to intel's current approach. But then, i'm not an expert, i just pretend to be one on the internet occasionally.

meager granite
#

Well I meant not optimizing for it specifically, we're talking Arma here, meant trying to squeeze as much FPS out your scripts as possible.

queen cargo
#

Wich reminds me to do speed comparisons between arma and my sqf-vm implementation

meager heart
#

during a3 alpha friend of mine was playing on "toaster" with average 10-15 fps, so when he had somewhere close to 20 ish that was a sign that scripts are 👌 😃

waxen tide
#

You guys are about to make me read the code optimisation guide a 5th time.

snow pecan
#

You mean you cannot recite it from memory yet?

waxen tide
#

I think my brain has like 100kb of memory, tops.

#

that's enough to remember 3 different script commands and the location of my coffee machine.

meager granite
#

100kb is a lot of text

fossil yew
#

A condition of unit presence defined in the editor - can it contain a variable expression and at what point in the initialization should those variables be set?

meager granite
#

"Condition of presence evaluated at the scenario start, must return boolean expression. When false, the object is not created at all."

#

No idea myself. Just do a quick test, add diag_log in your init script and diag_log in condition field and see in RPT which gets called first?

meager heart
#

init field will be the first one

#

probably most reliable way will be after time > 0🤔

fossil yew
#

Searched forums and it seems preInit functions need to be used to set those variables

meager heart
#

afaik objects are not initialized yet in preInit... so gl

digital jacinth
#

is there a way to retain player controll if you create a camera and switch to it? I want to make a custom third person cam for servers which have third person disabled.

meager granite
#

No

#

You can issue commands like walking (playMove "WalkF", etc.) into direction to unit though

digital jacinth
#

hmm. The thing I needed it for is, I do have a playable dog and the camera position for it sucks pretty hard.

meager granite
#

Well I gues you might be able to simulate controls over dog like this, not sure how precise it will be though

#

Best approach would be to have an addon that moves the camera properly

digital jacinth
#

hm i thought the camera is parented to either the head or the pelvis bone.

meager granite
#

Can't recall to where exactly, but there is camera offset array in vehicle config which you can change

#

Oh actually, I've been looking into it just recently, it rotates around "zamerny" memory point

#

Anyway, camera position offset from that point can be configured without touching the model

digital jacinth
#

hm. I guess i look into that at some point.

#

right now i just add the base functions to the dog player

#

you gotta be a good boy and sit down 😉

chilly wigeon
#

Which camera view are you trying to change? Third or first?

digital jacinth
#

first

#

the server I am playing has third person disabled

meager granite
#

You can sort of emulate control by issuing movement commands after movement keys were pressed

#

Not sure how usable or precise it will be though

digital jacinth
#

It will not be precise enough, the dog would be then an agent as well then, which i do not really want.

chilly wigeon
#

I assume you're using BI dogs models?

digital jacinth
#

I already have made dog agents and they are really finicky with the "run through solid objects" thing.

#

yep

chilly wigeon
#

memoryPointPilot = "head"; in the vehicle config should fix first person iirc

#

<- has spent far too much time working on playable dog stuff

digital jacinth
#

lol. yeah it is a thing many people want and I just make these for my oddball missions

#

sane as basically any script beginning with the anomalies to the ragdolling one

chilly wigeon
#

It's super possible to build out as unit based off CAManBase but there's some issues with it

#

Mostly no damage hitpoints

meager heart
chilly wigeon
#

You can give it throw and put weapons though, and if you're using ACE the dog can then pickup grenade objects like chemlights via ACE advanced throwing

digital jacinth
#

ooooooooh

#

switchcamera, i forgot about that command!

#

I used that one in one of my spooky mission where you suddenly are in someone else's body for like a split second.

#

or something similar

#

ayyy, that works

#

tho it will most likely require PIP enabled

#

or actually, no this whoudl work without

#

That works better then expected, only that the attach to cannot keep up.
https://streamable.com/39x72

This scene had over 300 fps and video was recorded in 60 fps

gray geode
#

noice 1 m8

digital jacinth
meager granite
#

Hm, I forgot that you can still control yourself when switching camera to another entity 🤔

digital jacinth
#

don't worry about it. I also forgot about that command

digital jacinth
#

another interesting issue now is, I wanted to make the dog be able to leap forward. I noticed the velocity i set is only applied at one frame and the dog it self will just stand there doing nothing

player setVelocityModelSpace [0, 10, 10000000];

not even this makes the dog do anything.

meager heart
#

maybe addForce 🤔

#

(will looks horrible 😄)

digital jacinth
#

nope

limpid pewter
#

Anyone know why this dialog and its controls (https://hastebin.com/vocimokoca.cpp) don't retain the correct size and position when the resolution/aspect ratio changes?
I am using safezone for sizing and position, which i thought meant that it would adjust the position correctly no matter what aspect ratio, but some of the controls are still a bit off. My theory is that there is small area on the screen in which this is true and if the dialog goes outside this area (when using safezone) it all goes to shit. Am i on the right track or way off?

strong shard
#

@limpid pewter inside group positions is relative to group-control

#

@limpid pewter and safezone for entire screen, if you need 25% from group-control you need use group-control size instead

limpid pewter
#

Hmm.. But the control group is also using safezone. Shouldn't that mean that its child controls follow the same sizing? or do you mean because the children controls are relative to the control group and not the rest of the display, it doesn't notice the change in aspect ratio?

strong shard
#

@limpid pewter [0,0] inside group = top-left corner

#

@limpid pewter and bot-right corner = [w, h] of this control

limpid pewter
#

ok, makes sense

#

So it should look more like this: https://hastebin.com/xoboqicuqo.cpp
Where all child controls don't use the safezone constants, but rather use sizing and positioning values relative to the control group

strong shard
#

@limpid pewter x = “X * groupW”; y = “Y * groupH”; w = “W * groupW”...

#

@limpid pewter replace groupW/H with w and h from group-control

limpid pewter
#

Yeah ok, i will give that a go. Thanks for the help

#

GUis are not my forte` haha

quasi rover
#

Is it possible to pass cursorTarget as addAction argument?
player addAction ["test", {call ciy_fnc_drag;}, [cursorTarget],1,false,false,"","blabla... "];

strong shard
#

@quasi rover use it inside action-code

#

@quasi rover not in arguments

quasi rover
#

You mean, fn_drag.sqf: _obj = cursorTarget; ?

strong shard
#

{[cursorObject] call ciy_fnc_drag}

quasi rover
#

thx.

#

then the [cursorObject] is _this select 0 or _this select 3 ?

strong shard
#

0

limpid pewter
#

@strong shard Multiplying everything by the height and width of the control group didn't work unfortunately (sorta). But your other advice about the child controls being positioned and size relative to the group helped alot. In the GUI editor i moved the control group to position 0,0 (using safezone), then using absolute value i placed the rscStructuredText controls to the position i wanted them in, and it worked :D.
Essentially i just got the size and position in absolute values relative to the group and used that.

#

Thanks Mate 😃

forest ore
#

I'd say that this should remove all items from AI's (though not only AI but any soldier that is of type "Man" so players too) inventory upon getting killed but it doesn't:

        params["_killed"];

        if (_killed isKindOf "Man") then {
                removeAllAssignedItems _killed;
                removeAllItems _killed;
                };
}];```What am I  missing here?
waxen tide
#

First you're missing a proper error description. What actually happens? Nothing? Script errors? Some items not being deleted?

forest ore
#

in that form the script doesn't give any errors and also no items get removed when I as a player kill an AI
(so nothing really happens)

waxen tide
#

you have script errors turned on? so you usually see your script errors?

forest ore
#

I'm testing the script on a dedicated server for which I have a console open at all times so that I get to read the mission output constantly

waxen tide
#

did you check if your if condition actually turns true?

#
_removeItems = addMissionEventHandler ["EntityKilled", {
        params["_killed"];

        if (_killed isKindOf "Man") then {
                systemChat "true";
                removeAllAssignedItems _killed;
                removeAllItems _killed;
                };
}];
forest ore
#

tested just now and there was no true being output to systemChat so apparently it doesn't (turn true). Uhh, whyy

waxen tide
#

what's inside _killed?

forest ore
#

Apologies, I don't understand what you are asking

waxen tide
#

try that

#
_removeItems = addMissionEventHandler ["EntityKilled", {
        params["_killed"];
        systemChat format ["_killed: %1", _killed];
        if (_killed isKindOf "Man") then {
                systemChat "true";
                removeAllAssignedItems _killed;
                removeAllItems _killed;
                };
}];
#

either there is nothing inside your _killed var, or it is not of type Man

forest ore
#

no results by adding systemChat format ["_killed: %1", _killed]; in the mix. I mean, the game did not output anything in the systemChat when I killed an AI

tough abyss
#

Both commands take local argument, is _killed local?

forest ore
#

yes

#

or, should be afaik

waxen tide
#

the whole bit of code you posted isn't being executed. otherwise you would see "_killed: any" in chat at least.

#

either you're adding that code in the wrong spot (server/client locality) or your eventhandler is wrong. I'm not terribly experienced with EventHandlers.

forest ore
#

If I add a deliberate error in the script (removed the last }]) I get an error so it "should" be exectued

#

but that I don't know if the script executes correctly when someone kills someone

meager heart
#

btw CAManBase < do not includes rabbits and 🐍 😃

forest ore
#

Thanks for the tip sldt1ck 😄

#

how can an AI soldier be something else than typeOf "Man" and/or "CAManBase" unless one has deliberately changed the type to be something else (can such thing even be done)

waxen tide
#

that's not your problem

#

your "typeOf" is never evaluated

#

i think.

#

try:

_removeItems = addMissionEventHandler ["EntityKilled", {
        params["_killed"];
        diag_log format ["_killed: %1", _killed];
        if (_killed isKindOf "Man") then {
                diag_log "true";
                removeAllAssignedItems _killed;
                removeAllItems _killed;
                };
}];
indigo snow
#

This might also be a good moment to check if the EH is applied at all

forest ore
#

this came now with diag_log immediately after killing an AI soldier

15:29:31 "true"
15:29:32 "_killed: cc7a3000# 1030699: dummyweapon.p3d REMOTE"
waxen tide
#

ah.

#

everything i said previously was rubbish. i now say the opposite: your EH works and your commands to remove the items do not work.

forest ore
#

I at least can't come up with anything else than

removeAllItems _killed;```but I bet there a million other ways to script and make the item removal work
waxen tide
#

Removes all special items from the unit.

#

special items? that sounds like toolbelt items or something

#

probably ignores weapons and magazines or something 😄

forest ore
#

removeAllItems should at least remove compass, watch and map. Maybe even FirstAidKit. No?

waxen tide
#

Remove Everything and make blank slate:
removeHeadgear this:
removeGoggles this;
removeVest this;
removeBackpack this;
removeUniform this;
removeAllWeapons this:
removeAllAssignedItems this;

forest ore
#

I have that removeAllAssignedItems covered but no, nothing gets removed

waxen tide
#

i just did

removeHeadgear player;
removeGoggles player;
removeVest player;
removeBackpack player;
removeUniform player;
removeAllWeapons player;
removeAllAssignedItems player;

and now i'm buttnaked.

forest ore
#

sure sure I bet you are :D
But using player does not remove stuff from _killed AI

waxen tide
#

Could it be that once the entity is killed, it stops being a unit you can remove gear from with those commands, but rather turns into a groundweaponholder or something?

forest ore
#

I'd hope it would not be so.. but probably is. Would have been more nice if this had been an easy thing to achieve

waxen tide
#

15:29:32 "_killed: cc7a3000# 1030699: dummyweapon.p3d REMOTE"

#

that looks weird.

forest ore
#

can confirm further that the script works with removeAllContainers _killed;With that the killed soldier loses its uniform + all the containers it has (backpacks, vests)

tiny wadi
#

Does anyone know where I could find the original arma 3 inventory scripts?

#

I want to modify the inventory display and add a few custom options

#

Ive got the display done, just need to code it now. Wanted to see if I could hook it in with the default scripts before making my own

tame portal
#

@tiny wadi As far as I know logic wise it's pretty much hardcoded into the engine, but the displays are changeable

tiny wadi
#

ah

#

welp time to make some event handlers

digital jacinth
#

What is an efficient way to get any unit in a 45° cone in front of you. Right now i am using lineIntersetsSurfaces, but that is just riiight infront of me

#
private _res = lineIntersectsSurfaces [
                AGLToASL positionCameraToWorld [0,0,0], 
                AGLToASL positionCameraToWorld [0,0,10], 
                player,
                objNull,
                true,
                1
                // "GEOM",
                // "NONE"
                ] select 0;
still forum
#

get all units. Get their position. get your position and view direction. And Math.

tough abyss
#

Try forEach allUnits inPolygon

digital jacinth
#

i was thinking about attaching a trigger infront and see what is in the list of it.

#

it is an action which could go each second

still forum
digital jacinth
#

yeah, i was thinking about something like this.

tough abyss
#

That would be 90 degree cone

digital jacinth
#

that is fine with me, internally I do a distance check anyways, so the upper part is not counted in anyways

strong shard
#

allUnits select { _dir = (player getRelDir _x); (_dir <= 45) || (_dir >= 315); }

still forum
#

That's just a check if the unit is northwards of player

#

Or was that getDir?

strong shard
#

@still forum getRelDir not getDir

still forum
#

Ah yeah. That would work. But not very performance effective

digital jacinth
#
private _pos = player modelToWorld [0,2,-1];
private _units = (allUnits - [player]) inAreaArray [_pos, 2, 2, (getdir player) + 45, true, 3];
private _target = objNull;
{
    if(alive _x && (_x isKindOf "CAManBase") && {((_x distance player) < 2.5)}) exitWith {
        _target = _x;
    };
    false
} count _units;
#

that is what i got now, it works so far

tough abyss
#

allUnits are all alive and of CAManBase by default

digital jacinth
#

ah, tho nope not the second

#

right now my player unit is a dog

#

till shows up in allUnits

tough abyss
#

Are you remote controlling the dog?

digital jacinth
#

nope

tough abyss
#

selectPlayer dog?

digital jacinth
#

yep

#

tho i called it selectPlayer doggo; because i am a degenerate

tough abyss
#

Yeah, then player will be in allUnits as a dog

lusty canyon
#

i have a player respawn EH that is running twice, how do i stop it from duplicating ?

tough abyss
#

Still it would probably be more efficient subtract player dog object before the loop like you did with player than check type each iteration

waxen tide
#

Is 40 lines of code + 20 lines of log above the "you'll get murdered for posting it directly into the channel" limit?

snow pecan
#

if in doubt use pastebin or equivalent

tame portal
#

Don't worry there have been so many 9999 character messages already without any code tags or anything, but anything above 30 lines I'd drop in paste or hastebin aswell

#

Does your code take dead ends into consideration?

#

Sometimes on a regular road two road segments don't report each other being connected

waxen tide
#

not yet, but i tried a lot of different spots and the code always behaves the same

#

The roads are actually connected, that is not the issue.

warm shell
#

kind of a stupid question, but I'm trying to pull what type of man a player is currently playing as (such as B_Soldier_F), what's the command to do this?

tame portal
#

@warm shell with typeOf you can get the class name

#

typeOf player

warm shell
#

alright, thanks

#

I was looking under get* at BIS wiki

#

hmmmm, so I'm trying to make a player's loadout reset to the base loadout of the unit they're playing as when they respawn

#

so I made an onPlayerRespawn.sqf in the mission file

#

and in that I put

_playerCurrentClass = typeOf player;
_standardLoadout = getUnitLoadout _playerCurrentClass;
setUnitLoadout player _standardLoadout;

#

doesn't seem to work though

still forum
#

setUnitLoadout player _standardLoadout; what's that supposed to be? That's a syntax error

warm shell
#

wew

#

thanks

#

nice catch

#

yeah, it works, thanks for the help all

waxen tide
#

hnnng i found my error.

#

i didn't check if the currently processed road isn't the _dir_road as well

peak plover
#

getMissionlayers - cannot be found on biki

tame portal
#

@waxen tide Did you delete your messages?

waxen tide
#

yeah i don't want someone to crawl thru my bullshit for an error i already found.

tame portal
#

Was just about to do it :P

waxen tide
#

Well thank you, that would have been very nice of you.

still forum
#

@peak plover The description for that seems wrong

peak plover
#

yes

#

Seems like it's got the default description

#

It returns an array containing all layer names

still forum
#

I'll check which commands are missing when 1.84 is out

peak plover
brave jungle
meager heart
#

probably you will need respawn templates class in description.ext... and position

brave jungle
#

Yep all present

#

It works normally, but using the function to open the menu, for some reason, makes the button clickable, but it does nothing

meager heart
#

hmm

#

what about > openMap [true, true]; ?

brave jungle
#

It opens, then I can't esc it

meager heart
#

yep

brave jungle
#

have to use flush

meager heart
#

lol

brave jungle
#

😃

meager heart
#

what is task there ?

brave jungle
#

where?

#

oh to open it?

meager heart
#

you open that menu ? when ?

#

what for ?

brave jungle
#

Loading startup for JIP players, but then I want the respawn screen to be present after it. I've got it currently killing them but I feel it's too messy killing them afterwards

meager heart
#

Loading startup for JIP players
that is some scripts/intro things ?

brave jungle
#

Yeah

meager heart
#

titleCut ["", "BLACK FADED", 10e10]; > waitUntil {visibleMap};> openMap [false, false]; > "Loading startup for JIP players"> openMap [true, true]; < i have something like that in one mission

brave jungle
#

but then how would the respawn menu load?

#

well

meager heart
#

yep

brave jungle
#

I say load

#

Work*

#

I can spam the respawn button

#

but nothing :c

fierce ingot
#

Noob question here, how do you execute scripts outside of a mission folder

brave jungle
#

debug console

fierce ingot
#

throught execVM right? how do i call it outside the mission folder though

tiny wadi
#

you can use a PBO

fierce ingot
#

some guy called an ogg. that spooked me

tiny wadi
#

and run \mypbo\functions\myfunction.sqf

brave jungle
#

oh I read that question wrong hahha

tiny wadi
#

or if its the server you can run scripts from the server directory

fierce ingot
#

say i am running master zeus, would i still be able to use mypbo

#

can't find the mission file in documents

still forum
#

or if its the server you can run scripts from the server directory with filePatching enabled

brave jungle
#

@meager heart The function seems to be broken, or atleast others say that too, gonna create a bug thing for it

fierce ingot
#

no way to do it via listen server then i'd assume

fierce ingot
#

So if i run file patching

#

is it possible to deposit scripts into the game's directory?

still forum
#

yes

meager heart
#

looks like you have problem with respawn position, not with the menu

[player, [worldSize /2, worldSize /2, 0], "Test position"] call BIS_fnc_addRespawnPosition;
```try this ^ (and don't use modules for respawns)
#

@brave jungle

brave jungle
#

Well even so, there is a problem in there somewhere

#

i'll go try now

#

@meager heart Didn't work

meager heart
#

🤔

fierce ingot
#

odd, i made a subfolder named Scripts in arma 3's directory and ran an execvm Scripts\Subfolder\test.sqf and it said it was not found

#

did it in listen server with filepatching on

tough abyss
#

What does isFilePatchingEnabled return?

still forum
#

Whether FilePatching is Enabled

winter rose
#

^^

gleaming cedar
#

Anyone know how to make a sleeping script

#

Or animation

#

Or if there is already a script for that?

#

Just when you click sleep it goes into an sleeping animation

#

only that

still forum
#

playMove. Done.

#

Just need to find the animation

#

you can use the animation viewer in the debug console for that

gleaming oyster
#

or, playMoveNowOrElse

gleaming cedar
#

this addAction ["sleep", {jan1 switchMove "Acts_SittingWounded_loop"}];

#

When I do thid

#

this

#

It goes into animation

#

But then after 1 second it goes to just prone

still forum
#

On a AI?

#

did you try actually doing what we said?

#

playMove/playMoveNow?

gleaming cedar
#

I tried playmove

#

My person just stands still

waxen tide
#

I need an idea how to approach a problem. I've been tinkering with it for a week now and i've tried 20+ things and scrapped them. I'm trying to find spots inbetween cities for roadblocks that aren't on sideroads, deadends etc but rather on the important main roads. It seemed like an easy problem but i'm really struggling. Do not need code, just the right idea.

inner swallow
#

i don't have an idea for you, but would be nice to know the main stuff that you've already tried out, so that people don't end up suggesting those same things again. Also which map are you doing this on? I've heard the Altis road network is just way better defined than Malden or Tanoa, for example.

waxen tide
#

I'm trying to keep it map independent, but i've mainly focused on Deniland for now. Altis is much harder because a lot more irrelevant small side roads in cities, Deniland has a lot of cities that are just 2 rows of houses next to the road.

tough abyss
#

Maybe check bounding box for road segment, main roads seems to be wider

tame portal
#

I think bounding box doesn't work, but I believe going to the side of the road on one end and always measuring "isOnRoad" or whatever the command is called can reveal how wide the road actually is

waxen tide
#

That's something i didn't try yet.

tame portal
#

I just remember me having the same problem and ending up with such a solution 😛

sweet ridge
#

just a quick question but is it possiable to create a script that turns an object like a barrel into an explosive prop?

#

so you shoot it and it explodes

gleaming oyster
#

Yes.

sweet ridge
#

how would one go about this

gleaming oyster
#

hit eh or something that detects hit events. Replace barrel with explosion. Bam.

tough abyss
#

Flexible Fuel Tank both Forest and Sand explode when you shoot at them

meager heart
#

script handle will become scriptNull after scriptDone right ? 🤔

#

oh nvm... yes about ^ question... if something

noble pond
#

why wouldn't it?

#

theres no reason for it to exist any longer after it has finished

meager heart
#

yeah, probably it's time for sleeps and not for scripts here

still forum
#

@noble pond theres no reason for it to exist any longer after it has finished
scriptDone command. How is it supposed to check if the script is done if the handle doesn't exist anymore?
Or might aswell be that scriptDone is a completly useless command because it is just a isNull that only accepts a specific type..
That would be dumb. But we know Arma I guess.
But that means scriptDone would return true for scripts that never even existed and never ran. Which is also dumb.

waxen tide
#

I just tested it. If the script handle was never defined, scriptDone returns bool If the script handle was defined, but isn't done, it returns false and once the script is done, it returns bool again.

tough abyss
#

Does anyone know how to use the unconscious param for addaction as listed on wiki?

still forum
#

You put either true or false there.

#

Don't understand the question.

tough abyss
#

I mean do I have to put all those other params to use the unconscious param?

#

I have no idea what those other params are even for, I just need to check if someones unconscious, figured use the one built into the thing

#
object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint]```
still forum
#

yes you need to pass all parameters to be able to use that

tough abyss
#

Hmm

quasi rover
#

findEmptyPosition search a suitable position between minDist. and max Dist? So, minDist. < a suitable Pos. < max Dist ?
center findEmptyPosition [minDistance, maxDistance, vehicleType]
By the way, why my return value is so close to center? _spawnPos = (getposatl _veh) findEmptyPosition[20,50,"O_SAM_SYSTEM_04_F"]; 🤔

tough abyss
#

think i got it fam ty @still forum

#

Trying to hook a addaction that consumes a fak and preforms a healing animation to the vanilla revive system, hoping that works

compact maple
#

@quasi rover maybe because that the only empty position available ?

quasi rover
#

but, When I see the map at the location, there is lots of empty area.

#

and even center Pos. < return Pos. < min Dist.

still forum
#

If only available position is smaller than minDistance it shouldn't return the position. As it's not "valid"

meager heart
#

about scriptDone and scriptNull i was doing some ui/camera things with animations scripts, to make sure that the same script not running multiple times while i'm waiting for scriptDone did used just isNull _handle... so my stupid question was more related to 🛏 rather than scripting issues 😃

waxen tide
#

You're telling me my 30 second test was WASTED because you made a JOKE?

meager heart
#

😄

compact maple
meager heart
#

was particle class for that ^

#

"PlanktonEffect" < this one

compact maple
#

i clicked on that random page link and i found that func, but i didnt know how to spawn it 😃

meager heart
#

with createVehicleLocal

#
private _tacticoolPlancton = "#particlesource" createVehicleLocal _position;
_tacticoolPlancton setParticleClass "PlanktonEffect";
#

Plancton vs Plankton 🤔

#

plancton < french version of the plankton 😃

compact maple
#

eheh thanks

tough abyss
#

You can use lifeState to check if someone is unconscious, addAction param only controls visibility of this user action for unconscious player

compact maple
#

you should tag him

still forum
#

Does Arma have a function to compare strings? To return whether one string is smaller, equal, bigger when sorted.
For example
"ab" compare "ba" would return -1. Because a is smaller than b
And "ba" compare "ab" would return 1 because it's bigger.
Something like that probably doesn't exist right?

austere granite
#

no

still forum
#

K. I'll make one then. Spaceship operator
"ba" <=> "ab" and _numberX <=> _numberY and more 😄

peak plover
#

what does <=> do ?

#

-1 if smaller 0 if equal 1 if bigger?

still forum
#

yeah

#

only really useable for string,number,bool though.
And I found out I only really need STRING < STRING which I already made previously

peak plover
#

== doesn't work with string, rite/

#

?

still forum
#

it does

peak plover
#

!= as well?

still forum
#

Yeees...

peak plover
#

ohh

#

it was arrays

still forum
#
_arrayOfStrings = _arrayOfStrings sort true;
private _index = _arrayOfStrings binaryFind _needle;
_arrayOfNumbers = _arrayOfNumbers sort true;
private _index = _arrayOfNumbers binaryFind _needle;
_arrayOfAnything = _arrayOfAnything sort true;
private _index = _arrayOfAnything binaryFind {_this < _needle};

I made dis today. Dis nice.

peak plover
#

What do you mean

#

is this intercept

still forum
#

yes. Dis intercept. As always

#

wanted a faster find that's not O(N)

#

This is good for finding the index of a value in huge arrays. Like CBA hashes for example.

fierce ingot
#

Dedmen, what does execVM search for besides the mission folder?

noble pond
#

it doesn't search anything other than root mission folder unless you tell it to @fierce ingot

#

but it is capable of looking in any folder inside the mission that you want, I believe it can also look inside mod folders too

fierce ingot
#

Some where referring about file patching

#

that apparently allows you to load external scripts outside the mission folder

#

Do you by any chance know how to?

still forum
#

@noble pond please don't lie

#

it searches everything in Arma's internal filesystem.

#

Addon PBO's same as mission files.

#

atleast for the stuff i use. filePatching requires the file to exist in the same path inside a pbo. But it will load from your Arma directory instead of using the file from the pbo.
But if the file isn't there in some pbo somewhere it still errors.

waxen tide
#

It once executed a script i had on a 3,5" floppy disc that wasn't even in the drive, just lying on my table next to the pc.

vernal mural
#

@waxen tide as long as it works...

#

I wonder if the boolean returned is "true" for "stay unconscious miserable human carpet" or "true" for "I order you to stand up and fight" ?

digital jacinth
vernal mural
#

Okay, so if I add an unconscious condition containing only {true} and then I call setUnconscious on a unit, now my unit will be forever unconscious and will have no way to wake up. Right ?

digital jacinth
#

it will add it to a global variable which is ther for ALL units on that machine including the player

#

are you using basic medical or advanced?

unborn ether
#

Can anyone remind me which control can play video and how?

still forum
#

BIS_fnc_playVideo

#

that should contain the name of the display

#

combine that with AiO config and done

#

I think it's a special video control

unborn ether
#

Aw damn thanks.

#

Now just got curious, default Arma menu videos (middle ones) are visually tied to a findDisplay 0 but there is no specific display argument in function? Want to see that function 😄

vernal mural
#

@digital jacinth I use advanced medical of course 😉 but nevermind, I was working on (aka messing with) a proof-of-concept that I succeeded to do. Now, it is gonna sleep deep in my hard-drive for centuries until I find something useful to do with it.

#

Like dozens of proof-of-concept I produce each month

digital jacinth
#

tbh you should not let your proof of concepts sleep on your harddrive, I push most of mine to github and let them rot there

unborn ether
#

Im usually paranoid, I do store my local git repo on SSD which is copied to my other drive and also copied to my external linux DS.

#

Top kek

dusk sage
#

Why don't you write it on paper and store it in a lock box while you're there

gleaming cedar
#

Guys I have a portable light. I want it to not move but when I do enablesimulation is goes off. How can I stop a light from moving while still beeing turned on?

austere hawk
#

is it turning off because its daylight?

gleaming cedar
#

No

#

Because enablesimulation

digital jacinth
#

you sure it does not break/has damage set to 1?

gleaming cedar
#

No i can try allowdamage

quasi rover
#

Are these the same meaning?
!(side cursorTarget == civilian) (side cursorTarget != civilian)

minor lance
#

Anyone knows the cause of this being spammed on my rpt? (Client) 21:25:00 Object id 94453489 (1161) not found in slot 166,162 21:25:00 In last 3000 miliseconds was lost another 1997 these messages. 21:25:00 Link cannot be resolved 21:25:00 In last 3000 miliseconds was lost another 1997 these messages. 21:25:03 Object id 94453489 (1161) not found in slot 166,162 21:25:03 In last 3000 miliseconds was lost another 1997 these messages. 21:25:03 Link cannot be resolved 21:25:03 In last 3000 miliseconds was lost another 1997 these messages. 21:25:06 Object id 94254cb7 (1207) not found in slot 169,161 21:25:06 In last 3000 miliseconds was lost another 2069 these messages. 21:25:06 Link cannot be resolved 21:25:06 In last 3000 miliseconds was lost another 2069 these messages. 21:25:09 Object id 8d250d18 (1304) not found in slot 161,105 21:25:09 In last 3000 miliseconds was lost another 2279 these messages. 21:25:09 Link cannot be resolved 21:25:09 In last 3000 miliseconds was lost another 2279 these messages. 21:25:09 Warning Message: Sound debug not found 21:25:10 Warning Message: Sound debug not found

vernal mural
#

type: String - usually "EmptyDetector"

#

Do we have to understand "because BIS", or is there any other usable types ?

cold pebble
#

@quasi rover yes

quasi rover
#

thx

cold pebble
#

@vernal mural ```
The type must be a class name in CfgNonAIVehicles or CfgVehicles with simulation = detector.

vernal mural
#

Oh I see. Basically, there is only one vehicle configured with a detector simulation, and it is EmptyDetector. Alright, thanks

cold pebble
#

😃

snow pecan
#

@still forum do you have performance comparisons for binaryfind?

still forum
#

no. Wrote that at work where I don't have Arma. Maybe i find (heh.. find...) time tomorrow to test.

snow pecan
#

I'm interested

#

was half tempted to write an SQF-expansion library using intercept

still forum
#

That's what intercept-cba is already supposed to be

snow pecan
#

I wasn't aware that was something in the works

still forum
snow pecan
#

👍

lucid junco
#

hi, do someone know how to stop showing of distance on task destination marker?

tame portal
#

@still forum sure you don't wanna join Bohemia?

noble pond
#

@minor lance Is it just when you connect to a specific server? or does it spam it everywhere (even sp?). Are you on linux or windows?

#

Apparently doing integrity check can get rid of link can't be resolved rpt spam

#

nobody except BIS really knows what any of the gibberish is, or what its connected to. I'd guess it has something to do with packets getting dropped because of either bad configuration on the server end or slow internet on your end

#

-noLogs is best thing to do if it is literally filling up your hard drive every 5 minutes, that will stop it from writing anything at all into the rpt file, beyond some very simple startup information

exotic tinsel
#

how would i go about creating a function on a client from a server side addon? by that i mean how do i remoteExec it to the the client so the client can call it locally.

noble pond
#

you remote exec it to the client so they can call it by themselves @exotic tinsel

#

its a great way to confuse people trying to rip your mission off

exotic tinsel
#

@noble pond Would you be willing to give me some example code?

noble pond
#

I would if i had some on hand

#

but i'm out of town

#

trial and error is the best way to learn 😃

unreal siren
#

So I noticed when people rejoin a server, my triggers seem to go up. 43 to 83 when somebody rejoined. What's this an indicator of?

noble pond
#

'triggers'?

#

as in mission triggers?

#

it fires individually for each client @unreal siren , 3 players = 3 sets of triggers, one for each client

violet gull
#

QUESTION: Is there a way to create an image on the screen which doesn't activate a cursor, nor disable the player's movement? (Aside from PIP workaround)

meager granite
#

cutRsc

#

With a display with said image in it

#

You can create empty display and then ctrlCreate RscPicture and set it to needed image, to avoid config work

violet gull
#

gray geode
#

anyone know of a good way to count all players on each side, also making sure it doesnt count them if they leave the server?

violet gull
#

hintSilent format ["BLU = %1 --- OPF = %2 --- IND = %3 --- CIV = %4",count(playerSide west),count(playerSide east),count(playerSide independent),count(playerSide civilian)];
May count players in lobby, but shouldn't count players who leave (I think).

compact maple
#
_bluNums = west countSide allPlayers;
#

works too (wiki)

gray geode
#

well that counts playable slots i think

compact maple
#

no allPlayers doesnt include playable slots

gray geode
#

oh yeah

violet gull
#

hintSilent format ["BLU = %1 --- OPF = %2 --- IND = %3 --- CIV = %4",playersNumber west,playersNumber east,playersNumber independent,playersNumber civilian];

gray geode
#

that could have saved me some time instead of writing code to do it myself

compact maple
violet gull
#

^

compact maple
#

Is there an existing functions used to simulate a password in a static text ? like none space allowed, characters hide with " * "... ?

still forum
#

@tame portal I never said no ^^ I could move to czech.. But I can't do anything till apprenticeship is over. BIS (Not BI) already tried to recruit me but I couldn't.

@violet gull count(playerSide west) did you test that? count doesn't take side.

leaden venture
#

Does anyone know a way to have a missions description.ext read a file from an addon

#

And add parameters? Assuming this is a packed PBO inside of a server

#

I'd like to include a file, packed either into an addon or a userconfig, or something else and read them dynamically?

still forum
#

It was previously possible. But 3DEN packs pbo's improperly which break that. It might work if you pack the mission pbo manually with a real packer. No one told me yet if that really works though.
If done correctly you can just #include inside the description.ext
The file has to exist everywhere. Server only is not enough. Every player needs to have it in the same place

leaden venture
#

My community has a custom addon which we distribute to all members, so it will be present for all players.

#

Currently, I tried using one of the Bohemia parameters templates, but it broke as soon as i packed the mission using a 3rd party PBO packer

still forum
#

broke aka it crashes because "include file not found"?

leaden venture
#

Yeah

#

I tried a few different files and they all crashed

still forum
#

Then includes from description.ext are generally broken. Even if 3rd party packer. Good to know

leaden venture
#

I'll see if I can pack a file into my own addon and then include it.

still forum
#

you could put the mission into a addon pbo. Instead of a normal mission pbo in MPMissions.

#

Then you could also #include stuff from there

leaden venture
#

Yeah that'd be a bit of a pain for my group's mission developers, but its a consideration

meager heart
#

My community has a custom addon which we distribute to all members, so it will be present for all players
if so ^ maybe just check if addon is loaded and use content in your mission(s)

#

(ez way)

leaden venture
#

Right that's what we're doing. We already have a large library of functions, textures and the like added into the addon. What we're trying to do here is tie some of those functions into script parameters, and then import those paramters from an addon, into the mission.