#arma3_scripting

1 messages ยท Page 472 of 1

old glade
#

intercept looks sexy

#

not as sexy as enforce, but still sexy

gleaming oyster
#

Ouchie my eyes dedmen, why u do dis

old glade
#

lmao

#

findif is so nice

gleaming oyster
#

need colors like a kid with crayons

old glade
#

I'm too lazy to make an extension right now lol

#

also singular points of failure makes for easier debugging

gleaming oyster
#

๐Ÿ˜ฎ

still forum
#

Intercept is sexy already yeah..
But just wait for tasty Intercept-LUA or Intercept-Python :3

old glade
#

ewwwwwwwwww

gleaming oyster
#

0-0

old glade
#

LUA

#

\s

still forum
#

Pff. Go away. I don't like you anymore!

#

throws old cookies at @old glade

old glade
#

I like lua

gleaming oyster
#

Woah, throwing shade real quick. Run Jmaster

still forum
#

Yeah. The cookies throw shade too. But not that big

gleaming oyster
#

Since when did your cookies become old?

old glade
#

Also python is great

#

^ python is the best

still forum
#

I always throw away the new cookies. So the old ones lay around and get older

gleaming oyster
#

0-0, ouch. Must hurt. Like throwing a hockey puck

old glade
#

Has anyone seen enforce?

#

it actually looks amazing

still forum
old glade
#

A friend showed me a snippet

#

:0

still forum
#

yeah. Enforce "looks" amazing. But it's quirks are killing everyone who is used to real OOP

old glade
#

lol

gleaming oyster
#

mind witwawly bwown

old glade
#

tbh it's better than sqf lol

#

but that's not a high standard

#

brainfuck is probably better than sqf...

still forum
#

(โ•ฏยฐโ–กยฐ๏ผ‰โ•ฏ๏ธต โ”ปโ”โ”ป

old glade
#

lol

gleaming oyster
#

โ”ฌโ”€โ”ฌ ใƒŽ( ใ‚œ-ใ‚œใƒŽ)

old glade
#

dammit

#

Now I want to write my addon in intercept

#

but thats more woooooork

gleaming oyster
#

dwo wit

old glade
#

How's the performance difference?

#

I assume alot better

still forum
#

up to 300x faster if you don't actually use SQF commands

#

the SQF commands itself still take the same time

old glade
#

fuuuuuuuuuuuuuuuuuuuuuuuck me

#

welp

#

I know what I'm going to do

still forum
#

So pure math calculations are probably the best

old glade
#

which I am going to need to do a bunch of

#

The thought of doing a neural network in arma for the lols crossed my mind in my programming class

tough abyss
#

My issue with SQF is more just about tooling, the language issues aside any new language basically comes with a steep hill to climb to be productive. Enfusion isn't going to solve those issues. Also sounds like it doesn't introduce any multithreading of any great nature either, the performance comes from what a better jit?

still forum
#

Depends really on what you are doing.
Information gathering like positions for TFAR is also very good. As Intercept has special direct engine access for positions

old glade
#

oh?

#

What about terrain data?

#

Objects, surface type, terrain gradient?

still forum
#

That would all have to go through SQF commands

old glade
#

And those are just binds?

still forum
#

yeah

gleaming oyster
#

BC, we can't really make conclusions until we see it in action. Just like with SQF, enscript will be new to people and they'll have to learn it. ๐Ÿคท

old glade
#

So not much performance increase if any at all >.>

#

well atleast it would help with the pathfinding

#

and the math itself

tough abyss
#

For your stuff there will be a tonne of performance benefit, but for the actual calls it is still limited by the engine

still forum
#

Intercept_CBA has a special command which returns you the surfaceTexture. As opposed to surfaceType

tough abyss
#

Depends on how heavily you use maths verses the actual functions I guess

still forum
#

Because that's needed for that GRAD trenches mod to automatically support every map

#

Also with Intercept I was able to make a forEach loop that was faster than any other alternative.

#

:3

old glade
#

Niice

#

anyway g2g

astral tendon
#

@still forum

{_x in ["C2_Mag","DemoCharge_Remote_Mag","SatchelCharge_Remote_Mag","rhsusf_m112_mag","rhsusf_m112x4_mag"]} count (magazines _caller) > 0

That is the way I come up before, do you see a problem here besides its slower?

still forum
#

Like. forEach SQF command.
Biggest benefit is that you can use all the C++ standard library

#

@astral tendon nope. Only slower

tough abyss
#

Maps!

still forum
#

Hashmaps yeah! But.. With a little time you can just make a Intercept plugin to add Hashmaps to SQF itself. and then again write in simple SQF

gleaming oyster
#

Ded, you got something in your pocket that could possibly disable body movement whenever moving the mouse up and down?

still forum
#

I already read your post a few hours ago. nope

gleaming oyster
#

Dang.

still forum
#

disableInput?

gleaming oyster
#

Nah, I still need horizontal movement

astral tendon
#

is that findIf new? my notepad++ does not reconise it

gleaming oyster
#

yes

astral tendon
#

I like it, seen more usefull than the way I was doing it.

still forum
#

findIf exits after the first true

astral tendon
#

Yeah, need to be carreful if i need more than one to check true.

tough abyss
#

For multiple finds you can use select

snow pecan
#

@old glade > well what would be a good cell size for map pathing lol
10m?
That's far too excessive for ALiVE. You can sit comfortably around 50-100m.

old glade
#

Not using alive lol

snow pecan
#

two separate projects?

#

The project I'm working on is meant to fix some of the issues I have with alive
particularly with ai pathing/virtualization and map indexing

old glade
#

Well, it's a new ai virtualization/indexing system

#

It would probably be too much work to try to integrate it with alive

#

If the alive guys are interested in helping me implement it then great, if not then it will be it's own stand alone system inspired by alive

#

But I feel like the indexing and virtualization systems are such core systems that nothing short of a complete refactor would be able to change them

civic canyon
#

this true ? if (!playerSide isEqualTo independent && {player getVariable ["isEscorting",false]}) exitWith {}

#

;

still forum
#

could be true

#

but only if player is independent

#

and escorting someone

dusk sage
#
!playerSide isEqualTo independent

^

civic canyon
#

hmm

dusk sage
#
!(playerSide isEqualTo independent)
civic canyon
#

if (playerSide isEqualTo west && civillian && {player getVariable ["isEscorting",false]}) exitWith {

#

this true ?

meager heart
#

if player from west and he is civilian while he escorting someone... /s

still forum
#

no that not true

#

that error syntax

#

error syntax bad

#

false almost is it

civic canyon
#

if (!playerSide isEqualTo independent && {player getVariable ["isEscorting",true]}) exitWith {};

still forum
#

BoGuu already told you what you need to do there

old glade
#

anyone know of an efficent way to calcuate the maxiumum slope of an area?

inner swallow
#

...a regression model? ๐Ÿ˜„

old glade
#

efficently?

#

Surface normal might work

chilly hull
#

Is there a way to diagnose problems with extensions? Arma can't find my extension .so

still forum
#

.so linux?

chilly hull
#

yeah

still forum
#

go to your extensions folder and run ld myExtension.so

#

should return everything as "found"

#

where did you put your extension?

chilly hull
#

In the addons folder next to the pbo, but you're right, ld returns file in wrong format.

still forum
#

that's wrong

#

should be in @mod folder

#

not @mod/addons

half monolith
#

regarding helis with a dynamic loadout, is there a way to save the model data of a pylon and apply it on respawn the models on the pylons are the same?

_pylonPaths = (configProperties [configFile >> "CfgVehicles" >> typeOf _newV >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]) apply {getArray (_x >> "turret")};
{ _newV setPylonLoadOut [_forEachIndex + 1, _x, true, _pylonPaths select _forEachIndex]; } forEach (_data select 4);

this works but the ownership of missile (pilot gunner) doesnt get found, or applied, not sure, it always defaults to gunner.

chilly hull
#

ah, you're right

#

yay, extension loaded. Thanks

#

I've installed extensions before, I just missed which folder it goes into

queen cargo
#

btw. if you want to test extensions, i can recommend a tool for you ๐Ÿ™„ cough sqf-vm cough

old glade
#

๐Ÿ˜„

#

its working

#

kinda

meager heart
#

about "how to get slope level", friend of mine did some weird things with buildings and he used this way >

private _levelSlope = acos ((surfaceNormal getPos _origin) vectorCos [0,0,1]);
```but iirc that is not 100% reliable ^
tough abyss
#

Would #arma3_scripting be a good place to ask about creating Curator modules? They're sort of a mix of config and scripting, and as I've learned, have very poor error reporting.

still forum
#

modules are mostly scripts

tough abyss
#

Agreed, though I'm having trouble getting started with it, and its (probably) config related.

#

I'll post it here regardless, then:

I am honestly just trying to get a curator Module to work. I use the make.py CBA dev environment.
Here is my config file:

    class Spag_ModuleEnding_F: Module_F
    {
        scope = 2;
        scopeCurator = 2;
        category = "MissionFlow";
        displayName = "End Mission (Custom)";
        icon = QPATHTOF(gui\Spag_Flag_ca.paa);
        portrait = QPATHTOF(gui\Spag_Flag_ca.paa);
        function = QFUNC(moduleEndMission);
        isGlobal = 1;
        isTriggerActivated = 0;
        curatorCanAttach = 1;
        curatorCost = 0;
        class Arguments {};
        class ModuleDescription: ModuleDescription
        {
            description = "Currently should just display a hint.";
            sync[] = {};
        };
    };

And my function, contained in functions -> fnc_moduleEndMission.sqf

#include "script_component.hpp"

params ["_logic"];

hint "im a thing!";
still forum
#

what is the problem?

#

does it show up in the editor?

#

Any errors in RPT when you try it?

#

your hint is not displayed?

tough abyss
#

Saying the problem would probably be good, huh? xD
When placing the module down in Zeus, this error pops up. There is no trace of it in .rpt

 [bIS_fnc_moduleExecute] Cannot execute module, error found in "a_function_name"
still forum
#

"a_function_name" sounds weird.. Sounds like BI didn't fully implement their error messages

old glade
#

yay it's no longer crashing my game lol

tough abyss
#

Sorry its not literally a_function_name, it's just the name of my function in this case.

still forum
#

what if you leave the #include away? you don't need it right now anyway

#

I'm not sure if hint works properly in editor when you place a module

#

maybe systemChat or diag_log instead

tough abyss
#

Still no dice, and at this point the script is purely just a hint, diag, and systemchat call.
I presume at this point its related to the ace/cba/make.py environment. I'll have to look at others examples some more, but so far I'm not seeing any solutions.

Update: it's certainly related to the make.py/cba dev enviroment, as arma 3 BIS functions works.

peak plover
#
  1. player joins
  2. setvariable ['player_init',true,true]
  3. player disconnects
  4. handledisconnect - > setdamage 1(body not deleted)
  5. player joins same slot.
  6. player getvariable 'player_init' (returns true)
#

Is this normal behaviour

gleaming oyster
#

@peak plover if ai units replace the slot after disconnect then yes.

peak plover
#

they do, but setdamage 1 right away

#

I'm wondering if this is supposed to happen or I made a error somewhere in my code?

warm gorge
#

Is there any way to prevent a projectile from doing damage to buildings such as launcher missiles without directly editing the event handlers of the buildings?

peak plover
#

What

#

Why would you not want to use eventhandlers on the building?

warm gorge
#

Basically what I'm wanting to do is have a launcher do damage to vehicles, but not to buildings. I know I could do this by adding event handlers to buildings, but don't want to have to add it to every building.

gleaming oyster
#

Might be what you have to do

#

dunno if CBA Class EH can pickup on terrain objects

tough abyss
#

you could look into an event handler for the player, or the projectile. check where the rocket hits, and if it damaged any buildings, reset them, maybe?

warm gorge
#

That is true

tough abyss
#

someone who knows weapon configs pretty well might be able to help out better. I do think it's possible to check objects something collides with.

peak plover
#

๐Ÿค”

#

I don't think you can do that

#

Use CBA

still forum
#

@tough abyss is your XEH_PREP set up properly?

tough abyss
#

Yeah, I got it working. I don't actually know what was wrong, honestly, just came back to it a few hours later and it was fine.

tall eagle
#

Hi everyone 0/

I'm wondering if anyone can help me get/select a respawn point spawned dynamically so that I can do things to it (in this case sync it to a trigger). I have the code below;

// Create the BLUFOR respawn point for players
_bluSpawn = [west, _pos] call BIS_fnc_addRespawnPosition;
// Sync the respawn point to the trigger
_bluSpawn synchronizeObjectsAdd [_bluTrigger];

However this doesn't work as _bluSpawn contains the array which is returned from "BIS_fnc_addRespawnPosition" and not the created object itself.

How would I go about selecting the created respawn point?

cosmic lichen
#

So you want to dynamically deactivate respawn points right?

meager heart
#

store your position, then just add killed/respawn eh for player(s) and check condition to remove position, after eh will fire or player will respawn... also make sure you will remove that position before or after respawn menu is shown or there will be couple errors... ๐Ÿ˜ƒ

#

also you can't synchronize variable with trigger lol

tall eagle
#

Sorry @cosmic lichen @meager heart I'm not activating or deactivating them. They are placed dynamically and linked to an "unlock" log entity, which itself is connected to a sector module.

Here is a screenshot of how I placed things manually in the editor (originally). I'm now attempting to do everything via script (so it's done procedurally).
https://s15.postimg.cc/8hqdhgfcb/editor-placed.png

#

I already have the sector modules and other required elements being spawned dynamically (works really well).

#

The code here creates the "unlock" logic, which is synced to the local sector module. A trigger is also created to trigger/unlock when BLUFOR takes the objective.

// Create the lock object and sync it to the sector module
_lock = (createGroup sideLogic) createUnit ["MiscUnlock_F", _pos, [], 0, "NONE"];
_lock synchronizeObjectsAdd [_sectorModule];

// Create the BLUFOR trigger (behind the unlock logic)
_bluTrigger = createTrigger ["EmptyDetector", _pos, true];
_bluTrigger setTriggerActivation ["WEST", "PRESENT", true];
_bluTrigger synchronizeObjectsAdd [_lock];

#

Hopefully you can see from my editor screenshot, connected to the unlock logic are three triggers (one for each faction), which then unlocks a few things for the controlling faction.

#

Amongst these is a respawn point which I'm now trying to create dynamically.

#

My code posted in my first message, creates a BLUFOR respawn point on all objectives as it should do.

All I need to do now is "get" those created respawn modules and sync them to the BLUFOR trigger for each objective.

#

Once that happens the respawn points wil only be avaialble on captured objectives (as the sector modules so all of the activating/deactivating themselves).

#

All I need to do is "grab" the object (respawn position) that this line of code has created for me:
_bluSpawn = [west, _pos] call BIS_fnc_addRespawnPosition;

#

@meager heart I can sync a variable to a trigger when the variable contains an object. That is my question, how do I grab the object that the BIS_fnc_addRespawnPosition created?

tough abyss
#

press(key)(c)="dance_animation"=valid

#

"dance_animation"=Trigger(key)(c)=position=(2,2,2)

meager heart
#

bis_fnc_addRespawnPosition < will not create any logics... so there is nothing to sync, Billa [Ash]

#

bis_fnc_moduleRespawnPosition < that is logic

tough abyss
#

press(key)(c)=(animation_dance_code:212)=valid

#

valid=animation_dance_code:212=dab_animation

tall eagle
#

Ah OK @meager heart

#

Let me try that function out and see if I can get it to work (I'll probably have more issues though) ๐Ÿ˜„

meager heart
#

that is > bis_fnc_moduleRespawnPosition

lunar violet
#

Hello, ยฟwhat function i should use to make a building medical with ACE3?

torpid pike
#

hey all, is there a max RPM value or max throttle value available to detect for helicopters? (without using RTD...) ๐Ÿ˜ฎ

tough abyss
#

is possible to add ace arsenal via addaction??

still forum
#

yes

tough abyss
#

addAction ["ACE arsenal",{ace_arsenal_fnc_openBox}];

like so? I'm having issues like this, any thoughts?

still forum
gleaming oyster
#

Damn, Alganthe could've plugged the ace arsenal.

#

"Mah fancy search bars"

#

"Mah fancy accuracy"

#

:^)

meager granite
#

Is there an easy way to find out if player\unit is leaning left or right?

still forum
#

Someone else asked that about a month ago

#

tried tons of things. don't think we found a reliable way

meager granite
#

Sad, I guess I'll have to come up with a crutch then.

tough abyss
#

aceopen.sqf [player, player, true] call ace_arsenal_fnc_openBox;

addaction addAction ["ACE arsenal","aceopen.sqf"];

so then more like this?

still forum
#

Why so complicated though

#

just use the code inline like you did before

#

and use the correct code like you do now

tough abyss
#

oh duh

#

but that's the method correct?

still forum
#

yeah

tough abyss
#

ty >3

#

โค

meager heart
#

(i mean that "reticle in flames effects" ๐Ÿ˜ƒ)

gleaming oyster
#

@meager heart Whats's your depth of field slider set to? Slide it down and see if it changes

meager heart
#

lemme check...

gleaming oyster
#

I had this effect when i had it over halfway

meager heart
#

it's set to 100

gleaming oyster
#

drop it to zero

meager heart
#

yep you're right, that is depth of field mixed with bloom was making those fx...

#

ty

#

(first time saw this features*)

tiny wadi
#

Does anyone know of a fix for that behaviour?

gleaming oyster
#

yw sldt1ck

tough abyss
#

how do i get the nearest unit/player to my crosshair

tough abyss
#

I am having trouble getting any .dlls to work. I can send my mission as an example, if need be.

I am: using the 'test_extension' from https://community.bistudio.com/wiki/callExtension
through the debug, I am executing: "test_extension" callExtension ["fnc1", getUnitLoadout player];
and I am getting a return of: ["",-1,0], which is not correct.

Similarly, using "test_extension" callExtension str weapons player; returns "", also incorrect.

I am running the game in 64x, but tested it with x32 with both versions of the above dll in my mission root as well as running my game as x32
Both dlls have been rightclick->properties->unblock
I have VS 2017, both x86 and x64, installed on my operating system.
I am not running any mods
My game is up to date and files are verified

queen cargo
tough abyss
#

@queen cargo That little tidbit was missing through the four or so threads and pages I read through, thank you. That got it working

queen cargo
#

just head over to the actual wiki page for extensions ๐Ÿคท

#

that is why it is there

tough abyss
#

It didn't show up in any of my google searches, and wasn't linked in any threads, nor on KZK's blog or comments.

The wiki has a lot of articles such as that, but I haven't found a central page with links to all of them. So I only come across them when Google feels like pulling it up, or someone links me it.

#

ex I read through all of the callExtension page, and its not mentioned nor linked. edit: actually there is one link at the bottom in 'see also', which I skipped over

queen cargo
#

it is literally linked in callExtension
also, site:community.bistudio.com yourSearchGoesHere will bring you up the results only from the biki

#

Calls custom .dll also known as Extension.

#

literally first sentence in the description links to extensions page

#

on the Extension part

tough abyss
#

I honestly did not see it while reading the article.

queen cargo
#

though ... you are right in the fact that callExtension is horribly written

#

no offense here, just telling ya the possibilities to discover ๐Ÿ˜›

tough abyss
#

I gotcha.

I do search the wiki when possible. But I wish there was a central page that had links to articles like Extensions, and others. It'd be a good source to check first, and something to read and pre-emptively educate myself

queen cargo
ember flame
#

Hi everyone I'm new to this Discord group. I hope this is the right place to ask for scripting help. I was wondering if there was a way to limit the number of a specific loadout allowed per group when using the built-in Menu Inventory and Dynamic Groups. It looks like the limit you can set in BIS_fnc_addRespawnInventory are for the whole team and not per group.

still forum
#

FFS. Trying to build a Arma hack by getting help from #arma3_scripting. Some people man...

quasi rover
#

Maker and another Object name has the same variable name. Is it no problem?
e.g.

_spawnAA = getMarkerPos AAA  //AAA is Marker's variable name
...
aaa setVehicleAmmo 1;   //aaa is Object variable name
still forum
#

Makers usually don't have variables

#

atleast it doesn't make much sense to put the markers name into a variable. As you might just use the name directly

#

if you have two variables that are called the same and are supposed to contain different things that indeed won't work

#

SQF is case insensitive aaa==AAA

quasi rover
#

I mean, Init field has variable for system empty marker on Eden editor.

still forum
#

Don't understand that language

quasi rover
#

Sorry, There is system empty marker on Eden editor, and their property has Marker Init: Variable name field

still forum
#

Don't know what that Marker Init and Variable name field mean.

hollow thistle
#

I guess he is talking about "name" field in eden.

#

When you assign "variable name" to marker in eden it is not really variable but it is just marker name which should be used as string.

#

@quasi rover
So if you've markerName set in Eden as marker variable you need to access it via getMarkerPos "markerName"; // marker name is a string

tough abyss
#

Object's Variable Names are global missionNameSpace as far as I recall, so if two variables tried to exist in missionNameSpace with the exact same name, cAsE sEnSiTiVe, it would cause issues.

#

but markers should, by tradition, be named marker_yourstring anyways

meager heart
#

"name" for the markers in eden that is the same as > private _marker = createMarker ["nameFromEDEN", _pos];

tough abyss
#

actually now that you mention it, everything that asks for a marker takes a string, not an object. so that'd make sense

winter rose
#

oops, never named them "marker_*"

still forum
#

cAsE sEnSiTiVe, it would cause issues. no they are case insensitive

#

missionNameSpace -> missionNamespace ๐Ÿ˜‰

#

In general you should never use a variable called AAA. Just use tags and stop worrying about anything. And name the variable as what it does.

inner swallow
#

Yeah marker names are strings

#

And must be unique per marker

#

Object name/variable would be AAA, marker would be called "AAA", no conflicts there

#

AAA = "AAA" however is a different matter entirely ๐Ÿ˜„

hollow thistle
#

Yeah, the input field for marker name in eden is a bit misleading, as far as i remember it says "variable name"

meager heart
#

also localizations... ๐Ÿ˜ญ

winter rose
#

@STR_myMarker :^)

meager heart
#

no i mean default eden localizations...

#

for the menus, options, buttons... and everything

winter rose
#

oh! ok then =] that's why I used A2 & 3 in Englishโ€ฆ in Arma 2, both AV8-B were localised "AV8B" in French, so 1/2 chance to get the one I want

also some shaky/shady translations here & thereโ€ฆ so English to avoid any translation issue

meager heart
#

yeah... ^ same here

still forum
#

Exit Arma with the carrier rocket.
Translated from ArmaGerman back into English.
Don't know what the original english is. I think something like exit Arma and open the Launcher probably

winter rose
#

the A3 Ultimate Edition in Germany seems lit

still forum
#

Some translation bugs were fixed. And we were seriously planning to make a mod to revert the fixes. Because they were just sooo Arma.

hollow thistle
#

I should check Polish translations ๐Ÿ‘€ (if there are any), I never was brave enough to launch Arma in other lang than english

#

Things like translations should be publicly available on GitHub or something imo so community can help with it.

still forum
#

That would be next level modern tech stuff. Remember how old the engine is ๐Ÿ˜‰

#

Also then they would publish stuff before they can publish it. Strings for new DLC's/Campaign and stuff which they might want to keep secret till release

tough abyss
#

space engineers open-sourced their translations like that I believe

cosmic lichen
#

many games do

hollow thistle
#

Yeah, not many studios can afford to have professionally made translations for every language so they seek help within community.

winter rose
#

UI translations at least would be nice

cosmic lichen
#

and functions

hollow thistle
#

โ˜๐Ÿฝ

still forum
#

functions completly open source ๐Ÿคค

#

They were paying KK to update a few of the functions. Even though they could've gotten the community to do it for free

winter rose
#

Ctrl+H * โ†’ player setDamage 1

meager heart
#

setDammmage*

#

world

winter rose
#

WorldWorldRealFinal2

#

this joke never gets old ๐Ÿ˜„

meager heart
#

btw when russians hear "T-100 Varsuk" for the first time, they just can't hold laugh... it's impossible

cosmic lichen
#

The real T-100

meager heart
cosmic lichen
#

Planierraupe yeah!

meager heart
#

who is real varsuk ? ๐Ÿ˜„

#

Barsuk > ะฑะฐั€ััƒะบ > badger
Varsuk > ....

hollow thistle
#

... Borsuk ๐Ÿ‡ต๐Ÿ‡ฑ

meager heart
#

tak

hollow thistle
#

Thinking about it "badger" sounds more like a name for some small vehicle, not an mbt ๐Ÿ˜„

winter rose
#

wasn't it the radio name of the tank operator with the mohawk, in OA campaign?

#

Badger, not Varsuk ^__^

meager heart
#

varsuk that is vadger... got it ๐Ÿ‘Œ

cosmic lichen
#

Well, let's hope that we get real names back in Arma 4

winter rose
tough abyss
#

things get even more confusing when you start using callsigns even just in English. Like a Panther tank, orrr the callsign Panther? Hotel callsign or the literal hotel?

quasi rover
#

Thx guys.

astral tendon
#
[_barricate,["Damage Barricate",{
params ["_target", "_caller", "_actionId", "_arguments"];
_target setDamage (damage _target + selectrandom [0.1,0]);
if (damage _target >= 1) then {{deleteVehicle _x} forEach attachedobjects _target;deleteVehicle _target};
if (currentWeapon _caller  == primaryWeapon _caller) then {_caller playAction "gesturePoint"};
if (currentWeapon _caller  == handgunWeapon _caller) then {[_caller] spawn {_caller = _this select 0;[_caller, "Acts_Executioner_Forehand"] remoteExec ["switchmove", 0]; sleep 2; [_caller, ""] remoteExec ["switchmove", 0]}}; 
},
    [],
    1, 
    true, 
    true, 
    "",
    "true",
    3,
    false,
    "",
    ""
]] remoteExec ["addAction",0];
_barricate setUserActionText [_actionName , "Damage Barricate", "<img size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>"];

Im trying to figure how to get the action ID from the remoteexec to then use on the setUserActionText, is there a way to it or is just too complicated?

winter rose
astral tendon
#

๐Ÿ™„

#
[{
_BarricateAction = _barricate addaction ["Damage Barricate",{
params ["_target", "_caller", "_actionId", "_arguments"];
_target setDamage (damage _target + selectrandom [0.1,0]);
if (damage _target >= 1) then {{deleteVehicle _x} forEach attachedobjects _target;deleteVehicle _target};
if (currentWeapon _caller  == primaryWeapon _caller) then {_caller playAction "gesturePoint"};
if (currentWeapon _caller  == handgunWeapon _caller) then {[_caller] spawn {_caller = _this select 0;[_caller, "Acts_Executioner_Forehand"] remoteExec ["switchmove", 0]; sleep 2; [_caller, ""] remoteExec ["switchmove", 0]}}; 
},
    [],
    1, 
    true, 
    true, 
    "",
    "true",
    3,
    false,
    "",
    ""
];
_barricate setUserActionText [_BarricateAction , "Damage Barricate", "<img size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>"];
}] remoteExec ["call",0];

This is one way I figure, but I think is ugly.

winter rose
#

it would be either a remoteExec call of a big block of code,
or remoteExec setUserActionText itself

#

also your version would only "publish" the local actionId, so it is clearly not recommended
full code block it is then

astral tendon
#

Why is that a problem since the action is local? there will not be any change on the action ID unless if I need to remove it with remoteexec again.

winter rose
#

you may have added on a client an action that doesn't exist on the server

meager heart
#
private _text = "<t align='left' size='1.25'color='#FF0000'>Damage BarricaDe*</t>";
private _icon = "<img align='right' size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>";

[_barricaDe, [_text + _icon, {/* blah blah */}]] remoteExec ["addAction"]; //--- 0 default
winter rose
#

it sets a background icon*

meager heart
#

hmm

#

then

#
[_barricaDe, ["Damage BarricaDe*", {
params ["_target", "_caller", "_actionId", "_arguments"];
_target setUserActionText [_actionId, "Damage Barricate", "<img size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>"];
/* blah blah */
}]] remoteExec ["addAction"]; //--- 0 default
#

maybe that way

winter rose
#

you would need to trigger the first action before it takes effect

#

also

[{
_BarricateAction = _barricate addaction ["Damage Barricate",{
params ["_target", "_caller", "_actionId", "_arguments"]; (โ€ฆ)```
won't work as `_barricate` will be undefined (I guess)
astral tendon
#
[[_barricate], { 
params ["_barricate"];
_BarricateAction = _barricate addaction ["Damage Barricate",{
params ["_target", "_caller", "_actionId", "_arguments"];
_target setDamage (damage _target + selectrandom [0.1,0]);
if (damage _target >= 1) then {{deleteVehicle _x} forEach attachedobjects _target;deleteVehicle _target};
if (currentWeapon _caller  == primaryWeapon _caller) then {_caller playAction "gesturePoint"};
if (currentWeapon _caller  == handgunWeapon _caller) then {[_caller] spawn {_caller = _this select 0;[_caller, "Acts_Executioner_Forehand"] remoteExec ["switchmove", 0]; sleep 2; [_caller, ""] remoteExec ["switchmove", 0]}}; 
},
    [],
    1, 
    true, 
    true, 
    "",
    "true",
    3,
    false,
    "",
    ""
];
_barricate setUserActionText [_BarricateAction , "Damage Barricate", "<img size='2' image='\a3\ui_f\data\IGUI\Cfg\Actions\heal_ca'/>"];
}] remoteExec ["call",0];
#

I forgot about the the params.

winter rose
#

this ^ should work imho

meager heart
#

0 < for targets default ๐Ÿ˜ƒ

astral tendon
#

I know, im used to put 0 to remember that this option exist in case i want to change later intead of search on google again.

meager heart
#

oh i see ๐Ÿ˜„

brazen sparrow
#

anyone got any suggests on how to add a weapon to a weaponholder with specific attachments (i cant define the custom weapon in cfgs). The only thing i got so far is spawn a unit, change attachments, drop weapon, delete unit...

still forum
#

That is the only possible way

#

Or define config subclasses with attachments pre-attached in a mod. That might work.. Not sure

winter rose
#

should work, official weapons have attachments declared and can be created this way

still forum
#

Can't remember that someone asked that question in a context of a mod. Has always been asked for missions with a "can't make mod"

brazen sparrow
#

i got a ui in eden where u can change weapon attachments, need to be able to spawn them in a weaponholder. So cant mess with the configs, i got it all working, just spawning the ai and dropping isnt very elegant and gotta wait a few secs for the animation ๐Ÿคข

still forum
#

I have a addWeaponWithAttachmentsCargo(Global) SQF command ready... Sent it to Dwarden but nothing happened yet. Guess they don't want it

hollow thistle
#

How do you create commands for them? Do you implement them via intercept?

still forum
#

no

#

can't explain ^^

brazen sparrow
#

magic?

hollow thistle
#

Ok ok, with your skills I guess you might have an access to "better" arma builds :D

still forum
#

Same as I can't explain how to edit configs while the game is running

meager heart
#

top sicret ยฉ ๐Ÿ˜ถ

hollow thistle
#

๐Ÿ•ถ

meager heart
#

only for good reasons ^ btw

meager heart
#

there is no way to get displayName without accessing the configfile ? ๐Ÿค”

gleaming oyster
#

@meager heart displayName is only defined in configFile in SQF layer so I would guess so. Just make a fnc for it

meager heart
#

yeah, i thought maybe there is some faster way, that function will make it even slower

gleaming oyster
#

I thought it was more about your annoyance with it. Dunno ๐Ÿคท

meager heart
#

was trying to speed up things...

meager granite
#

@brazen sparrow I remember doing similar thing with AI few years ago, iirc to skip animation I had to move AI into vehicle.

#

Found the script if you're interested

#

(server_func_addOnEachFrame is not listed there, replace it with proper OnEachFrame mission event handler)

#

(All in all its WIP and was never fully finished but concept worked)

#
        if(diag_frameno % 2 == 0) then {
            moveOut server_unitForWeaponsWithItems;
        } else {
            server_unitForWeaponsWithItems moveInDriver server_vehicleForWeaponsWithItems;
        };

Welcome to Arma

hollow thistle
#

Such simple functionalirty... Much code ๐Ÿ˜ฑ

meager granite
#

Its even has queue and failsafes ๐Ÿ‘Œ

meager heart
#

๐Ÿ˜„

#

it's like inverted submunition... kinda more damage per bullet (+65% ๐Ÿ˜„)... sounds gud

still forum
#

LUL. All my guns fire only the actual projectile

meager granite
#

Its actually from trailer for the game

hollow lantern
#

is there a command to add a weapon attachment to a weapon that is a eden object? So already placed

still forum
#

No.

hollow lantern
#

ok

tough abyss
#

how would i force get cursortarget to ignore buildings like if a player/ai is in a building that it will get the player i am aiming at instead of the building

cosmic lichen
#

@tough abyss Don't think that's possible. cursorTarget will always return the nearest object the player points at.

tough abyss
#

or like some way to get the nearest target to my crosshair

digital hollow
#

Do nearestObjects and select for worldToScreen distance to center?

tough abyss
#

and how do i check which is nearest to my crosshair

digital hollow
#

you could worldToScreen each object and check the distance to center [0.5, 0.5]

tough abyss
#

there is no variable called center

inner swallow
#

i don't think that Ampersand was talking about a variable called center

digital hollow
#

worldToScreen returns coordinates on where that thing is relative to the screen. The crosshair is in the center of the screen [0.5, 0.5]

tough abyss
#
player addAction["Nearest Unit", 
    {
        nearest = [1000, 1000];
        nearestTarget = player;
        _units = nearestObjects [player, ["unit"], 2000];
        {
            if(nearest > [0.5, 0.5] distance worldToScreen getPos _x) then {
                nearest = [0.5, 0.5] distance worldToScreen getPos _x;
                nearestTarget = _x;
            };
        }forEach _units;
        hint name nearestTarget;
    }
];
``` whats wrong like it always is my name
#

i am quite sure that unit is false in nearestobjects but i couldn't find anything how i would get all units with nearestobjects

#

no but can anybody help me

digital hollow
tough abyss
meager heart
#

CAManBase < no animals there ๐Ÿ‘Œ

digital hollow
#

Get some parentheses in your if condition. I think the poor thing is confused.

tough abyss
#
player addAction["Nearest Unit", 
    {
        nearest = [1000, 1000];
        nearestTarget = player;
        _units = player nearEntities ["Man", 2000];
        {
            if(nearest > ([0.5, 0.5] distance (worldToScreen (getPos _x)))) then {
                nearest = [0.5, 0.5] distance (worldToScreen (getPos _x));
                nearestTarget = _x;
            };
        }forEach _units;
        hint name nearestTarget;
    }
];``` still not working
#

nobody can help me?

#

๐Ÿ˜‘

still forum
#

You guys are really helping that guy build his hack? ๐Ÿ˜„

tough abyss
#

hack?

#

are you kidding me hacks are made in cpp not in sqf how would you even hack with sqf when you can only use it on your own server or in offline

still forum
#

So being able to select a player and remotely killing him in MP. or getting the player on your crosshair is completly unrelated to your question on how to circumvent Battleye?

tough abyss
#

that was obviously a joke but looks like you didn't get it

still forum
#

Ah so you seeking help here and asking questions is a joke? That's kinda rude

digital hollow
#

After he figures this out, the sense of pride and accomplishment will enable him to not want to descend to hacking.

inner swallow
#

well, this is interesting

tough abyss
#

it's a joke that i make joke about battleye and you dont get the joke i think

still forum
#

Well. Do what you want then. I'll let a moderator decide about the joke.

tough abyss
#

so can anybody help me now pls

peak plover
#

I built a speedhack for arma

gleaming oyster
#

wowzers

peak plover
#
if (doSpeedHack) then {
    setAccTime 10;
};
still forum
#

Yeah. Me too. setVelocity on a hotkey. Actually have it on F7.

gleaming oyster
#

๐Ÿ˜ฑ

still forum
#

Oh that kinda speedhack. Mine just accelerates my vehicle. That's loads of fun when you do it in MP and someone else is driving ๐Ÿ˜„

peak plover
#

aaah ๐Ÿ˜„

#

hahahaha

still forum
#

Their screams are so soothing

tough abyss
#

I wrote a little mod for myself with stuff like that, like a hotkey for recompiling scripts

gleaming oyster
#

AAAAAAAAAAAAAAAAAAA

#

????

still forum
#

yeah kinda like that.

#

With a little more vibration ๐Ÿ˜„

gleaming oyster
#

AAAAAAAAA ?

tough abyss
#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAA

still forum
#

XD

gleaming oyster
#

๐Ÿ˜ฌ

meager heart
#

๐Ÿ˜€

#

oh sorry... HAX....

#

ok now

gleaming oyster
#

AAAAAA

tough abyss
#

how can i make that now arrrrrgghhh

meager granite
#

Indeed a cheater, his name comes up in some minecraft hacking discord servers

mint kraken
#

In a hpp file would it work if u name a class a number like ->


class Config {
    
    class ranks {
        class 1 {
            name = "Rank 1";
        };
    };

};

Atm I have a variable set as an array for my ranks but if that ^^ works I might just use that

austere granite
#

it should work but i wouldnt recommend it

#

just give it a normal name... no reason not to

mint kraken
#

well if there is a way to convert 1 -> one, I mean I could make a code for that

#

But is there any prebuilt ones?

obtuse cosmos
#

@mint kraken I don't think you can start it with a number... Something correct me if I'm wrong?

shadow sapphire
#

Is there a simple script that will make a named object fire at my cursor target?

obtuse cosmos
#

Are you building a hack too? ๐Ÿ˜„ ๐Ÿ˜›

mint kraken
#

Yeh Numbers dont work unfortunatley

obtuse cosmos
#

you can do something1

#

just not at start

round scroll
#

I'm just reading https://forums.bohemia.net/forums/topic/217778-function-spawn-error/ and wonder what's going on. My understanding is that initServer.sqf runs in scheduled environment, hence the call will run in scheduled environment and only return once finished. Then the functions he stores in global vars should be defined, but according to the post they aren't. I usually use CfgFunctions, so never encountered this problem.

mint kraken
#

Ah

#

Thanks, saved me lots of time โค

shadow sapphire
#

A hack? No, trying to figure out a way to get the new USS Liberty main cannon to fire at shit.

#

Some light naval support.

round scroll
shadow sapphire
#

Thanks for the tip! I tried dofire already and didn't have time to mess with doartilleryfire, yet. Will have to pick it up tomorrow, the wife needs some attention.

round scroll
#

Is it true that this eventhandler(s) will execute on all animals and units? class Land; class Man: Land { class EventHandlers { class UNS_DSAI_UNITINIT { init = "if (isNil 'RUG_DSAI_INIT') then { '\RUG_DSAI\RUG_DSAI\' call compile preProcessFile '\RUG_DSAI\RUG_DSAI\DSAI_Init.sqf'}; d=[_this select 0] spawn RUG_DSAI_fAddUnit;"; }; ....

obtuse cosmos
#

hmm - The most basic example and it returns -1 (n/a) - What even is that? ๐Ÿ˜• ๐Ÿค”

peak plover
#

n/a means not availalb

fossil yew
#

Are these two things the same in addAction:

"isNil ""PhotoTaken"""

and

"isNil 'PhotoTaken'"

#

checks if some var has been set as condition for displaying the action.

tulip hare
#

are predefined loadouts limited to the eden editor only or is it possible as zeus to add a script to an object?

nocturne basalt
#

Hi guys. Im running a while(alive _object) with waituntils inside it. My question is, will the script break out of a waituntil if the unit is killed? Or do I risk a script that waituntil forever?

winter rose
#

@fossil yew same yes
you can switch singlequotes โ†” doublequotes where needed

inner swallow
#

The second is easier to read and troubleshoot, of course

winter rose
#

I kinda never use single quotes, but I can get that having a

onLoad = "this addAction [""Action"", {hint format [""your name is """"%1"""""", name player]; }];";``` is not the perfect stuff ๐Ÿ˜„
gleaming oyster
#

0_0

inner swallow
#

I mostly only use them inside of double quotes, or if I'm lazy

#

Using them in init boxes is probably good too, since the SQM becomes more readable

#

And in briefing text of course, when using markers and images

delicate lotus
#

Hey guys, im currently making an script which creates an marker on the map when a player looks at them and presses an defined key.
I got the key check working but now im facing the problem that I dont know how I can get the current entity the player is looking at.
I can't use cursorTarget because that requires knowsAbout to be > 0 + that their not enemy units (comment from Pierre MGI on https://community.bistudio.com/wiki/cursorTarget).
cursorObject would return the unit but it could also return that tree the player is currently also looking at which is kinda bad...
Is it somehow possible to get the position a players cursor is currently pointing at? Or something like an raycast that returns all entities hit by it?
lineIntersectsWith sound usable for that purpose, but it really isnt because it only has a maximum range of 1000m and it also needs an ending Position...

still forum
#

0.5,0.5 get's you the world position corresponding to the center of the screen

delicate lotus
#

wow... how did I not find that?
thanks ^^

brave jungle
#

Some of my scripts just refuse to work in dedicated by using {//Code} remoteExec ["BIS_fnc_spawn", 0, false]; however typing the exact same thing into the debug console, it works.

winter rose
brave jungle
#

Yeah

#

But using bis_fnc_spawn

#

You just use {} right? so the remote would be {{//Code}} remoteExec ["BIS_fnc_spawn", 0, false]; - no?

#

THe problem I have though is that the EXACT same code that works in the debug console, doesn't work in the file

vague hull
#

why exactly do you want to spawn it.. its already sheduled. Its also better to have a function you can safely whitelist bis_fnc_spawn is used for many hacks as its there by default. if thats not a point then why not [[],{ CODE }] remoteExec ["spawn", 0, false] (although thats not ideal too)

#

I assume it doesnt work because you blocked remote Exec

austere hawk
#

@shadow sapphire AI artillery fire is limited to weapons that are setup for ballistic computer functionality (means no airfriction) and only allows to calculate solutions from gun elevation angle >45ยฐ to 89.9ยฐ. Also it only works properly with turrets that can rotate 360ยฐ.

#

for doFire i think the target has to be in vision/ detection range.

winter rose
#

@brave jungle

[nil, {/* myCode */ }] remoteExec ["spawn"];``` โ†’ ?
meager heart
#
#include "fn_call.sqf"

BIS_fnc_spawn ^

params [["_args1", []], "_args2"];

// --- input format: {code} or [{code}]
if (isNil "_args2" && _args1 isEqualType {}) exitWith {[] call _args1};

// --- input format: [param, {code}]
if (!isNil "_args2" && {_args2 isEqualType {}}) exitWith {_args1 call _args2};

// --- error and suggest supported format
[_this, "isEqualTypeParams", [nil, {}]] call (missionNamespace getVariable "BIS_fnc_errorParamsType");

nil

BIS_fnc_call ^

#

so... just spawn and call ๐Ÿ‘Œ

shadow sapphire
#

@austere hawk, thanks for the tip! Thatโ€™s good stuff to know! Now to figure out what the detection range is for that cannon... it should have been longer than what I was attempting to make it fire upon.

tough abyss
#

Does anyone know a good guide or video about creating Zeus modules? The biki page isn't written the best.

Been reading through various BiS module scripts and RSCs and still am not really quite grasping it.

#

How do I disable vehicle animations?

tough abyss
#

Why do so many people make external mods for ACE3? I mean this as a legitimate question. Do they just not submit it to the git? Or is ACE3 really strict about pull requests?

surreal sedge
#

people all have little things they'd like to tweak about the mod

#

therefore it's easier to make those small externals, than add stuff that means more boxes people have to check or uncheck to get things how they want it

tough abyss
#

Some externals are pretty sweet, though. Like using the ground texture for trenches, or ragdolling when going unconscious to prevent metagaming the animation. More externals means more shuffling for server admins

peak plover
#

@tough abyss I submitted a ticket about stuff I've done, they just don't want some things as features, like resetting revive lives if using a PAK in medical facility or PAK time when used in medical facility is always 5 seconds

#

etc.

#

It's mostly just everyone doing their own version, which they like, but not everyone wants the same thing

tough abyss
#

You're right. I guess I'm a fan of more options and more optionals to pick or leave.

peak plover
#

Well, you still have an option to edit it

#

It's great, super customized

#

I've even overwritten the medical damage EH

#

just for a specific mission 'tho

#

Without mods

#

It's nice to be able to do it

tough abyss
#

It is, I agree. But I don't run my group, so every new mod has to go through an approval process, and then each update has to be pushed to the server. We also use steam workshop, meaning updates are forced, making more mods mean more maintenance. Our personal mod is also on workshop, meaning we can't just include other mods in it without getting the modder's permission.

It becomes a process, when it (could) just be a checkbox, you know?

tough abyss
#

Does Arma 3 undefine all #define macros on launch, or is that a CBA thing?

digital jacinth
#

@tough abyss Hey, probably talking also a bit about my mod. The reason I do not do pull requests for ACE because it is a hassle to set up the project. On top of that iirc ACE already experimented with the ragdolling like I did, but decided against it because of several reasons. I do understand the problematic with mods updating spontaneously on the workshop and version control is not a thing there.

digital jacinth
#

The next script I will be releasing in the SW will be pretty much the same deal, it will built ontop of aces overheating feature, but i highly doubt many people want such a script

peak plover
#

I think actually many will ๐Ÿ˜„

#

These things are genius

digital jacinth
#

nah, why would you want your freshly picked up gun explode in your face?

still forum
#

@tough abyss most people don't even ask if ACE want's it. Now after the fact other people are remaking stuff like ACE Splint directly for ACE and get it integrated.
Like using the ground texture for trenches GRAD_Trenches is currently waiting to be integrated into ACE. There are still small quality issues they want to fix before it get's into ACE though. We even have a optional Intercept Plugin to automatically get the ground texture on any map. Even ones that aren't directly supported as currently all ground textures are kinda hardcoded.

Also ragdolling for unconcious doesn't help with the animation metagaming.
Without it you snap into the unconscious animation.
With it you ragdoll. Lay in ragdoll for 5 seconds. Then teleport away to the spot you are really laying and snap into the same unconscious animation.
So If you come around a corner you will still see the guy laying in the same animation as before. Only the first 5 seconds are different.

#

Does Arma 3 undefine all #define macros on launch, or is that a CBA thing? You haven't understood how the preprocessor works if you ask that.

#

ACE already experimented with the ragdolling like I did, but decided against it because of several reasons. Same what I just said. Doesn't really change anything past the first 5 seconds. And it isn't synced over MP meaning when ragdolling ends people will teleport around.

digital jacinth
#

Yeah which is real shame tbh (ye syncing ragdolls is not the network friendliest thing) since I am using BIs own command for that, I will probably start requesting some help and add more "death/unconscious" animations so the meta gamins is a bit less.

still forum
#

More unconscious animations would be LIT.

digital jacinth
#

well I will make a post later today in #creators_recruiting asking for someone who might want to do some animations, good thing they only need one keyframe, so that shouldn't be hard I believe.

#

oh no, that means I gotta do some math stuff again so figure out if the unit lies on the back, side or front. hoo boy

#

prolly going to use mempoints for left and right shoulder for this.

brave jungle
#

@winter rose I tried [nil, {/* myCode */ }] remoteExec ["spawn"]; and it doesn't load anything

#

at all

still forum
#

try [[], {/* myCode */ }] remoteExec ["spawn"];

#

passing nil to commands can make them be silently ignored

brave jungle
#

ok

#

Yep

#

that was it ty ๐Ÿ˜‰

#

now to test to see if it works on dedicated :3

peak plover
#

hmm, RemoteExec is not very reliable, is it?

brave jungle
#

no :c

still forum
#

it is. if you use it correctly

peak plover
#

I tried setting player roles by the server.

#

IT didn't work well

still forum
#

probably a problem with the player role setting command stuff and not with remoteExec

#

didn't hear of anyone having problems with specifically remoteExec yet

peak plover
#

I think it mite fuck up a bit when it tries to send 30 unique RE in like less than 0.1 seconds

#

And every one of those asked RE back

inner swallow
#

Not had an issue with RE itself

peak plover
winter rose
#

there's a BIS_fnc doing such a thing

digital jacinth
#

I prefer using cba's player func to get all players. Seems to be reliable so far

winter rose
#
(allUnits + allDead) select {isPlayer _x}```
velvet merlin
#

When used on player, it only has an effect on third person mode. First person LOD is still visible. (A3 Dev 1.33)
comment for hideObject

#

is there still a way to have this work also on 1st person view/some other approach?

digital jacinth
#

depending on uniform you could set the textures of it to either an invisible one or ""

#

gun would be still visible

velvet merlin
#

well thats quite ugly

digital jacinth
#

also check out if hideObject allows you to run through solid objects. I noticed this when being invisible using ares/achilles

velvet merlin
#

well it has been used in scripted camera scene to keep the player next to the camera with a dummy unit that was hidden

#

(for sound, direct radio chat, special camera stuff)

brazen sparrow
#

@meager granite ty for that code the other day, using the vehicle helped ๐Ÿ‘

warm gorge
#
private _dropPoint = getPos player;

private _vehicle = createVehicle ["B_T_VTOL_01_vehicle_F", [0, 0, 0], [], 0, "FLY"];
_vehicle allowDamage false;
createVehicleCrew _vehicle;

_vehicle doMove _dropPoint;
_vehicle moveTo _dropPoint;
_vehicle flyInHeight 500;

waitUntil {moveToCompleted _vehicle};

_vehicle doMove [0, 0, 0];
_vehicle moveTo [0, 0, 0];

So I have a script which creates a VTOL at [0, 0, 0] and then orders it to move to a given position before waiting for that move to be completed and then moving back to [0, 0, 0]. For some reason it doesn't always work properly. Sometimes the VTOL will just fly around an area over and the moveTo is never marked as completed with moveToCompleted.

austere hawk
#

propably typical AI pathing issue - cant get the position just right, so it always loops around

warm gorge
#

What would you suggest I do instead?

meager heart
#

moveTo < low level command

#

i think in this case better just 2 waypoints

warm gorge
#
private _dropPoint = getPos player;

private _vehicle = createVehicle ["B_T_VTOL_01_vehicle_F", [0, 0, 0], [], 0, "FLY"];
_vehicle allowDamage false;
createVehicleCrew _vehicle;

private _group = group (driver _vehicle);

private _waypoint = _group addWaypoint [_dropPoint, 0];
_waypoint setWaypointType "MOVE";
_waypoint setWaypointSpeed "FULL";
_group setCurrentWaypoint _waypoint;

_vehicle flyInHeight 500;

waitUntil {moveToCompleted _vehicle};

_waypoint = _group addWaypoint [[0, 0, 0], 0];
_waypoint setWaypointType "MOVE";
_waypoint setWaypointSpeed "FULL";
_group setCurrentWaypoint _waypoint;

Like this? @meager heart

#

Forgot about the moveToCompleted part

meager heart
#

yep, also you no need that moveToCompleted and setCurrentWaypoint

warm gorge
#

Is there a way I can check for the waypoint completion?

#

Other than a position distance check

meager heart
#

with currentWaypoint maybe, kinda ez way

meager heart
#
0 spawn {
    private _dropPoint = getPos player;
    private _startPos = [0, 0, 0];
    private _vehicle = createVehicle ["B_T_VTOL_01_vehicle_F", _startPos, [], 0, "FLY"];

    createVehicleCrew _vehicle;
    _vehicle flyInHeight 500;
    _vehicle allowDamage false;
    _vehicle doMove _dropPoint;

    waitUntil {
        sleep 5;
        unitReady driver _vehicle
    };

    _vehicle doMove _startPos;
};
``` works too
shadow sapphire
#

@meager heart, could you use waypoint statements to throw a variable when a waypoint is complete, then pass that onward, or something?

meager heart
#

sure ^

shadow sapphire
#

Could you share an example of how that would work? I don't actually know how it would work. Would it be more simple than your previous example or more complicated?

meager heart
#
_wp setWaypointStatements ["TRUE", "missionNamespace setVariable ['wpCompleted', true, true]"];

private _isWaypointCompleted = missionNamespace getVariable ["wpCompleted", false];
#

lol

shadow sapphire
#

What is the missionnamespace variable? How does that work?

meager heart
#

mission global namespace

shadow sapphire
#

Very cool. Thanks.

#

Do you know if BIS_fnc_ambientAnimCombat creates additional logic when it's used?

meager heart
#

no idea... you can check it, just look in that function^ script

shadow sapphire
#

Where might I find the function script?

meager heart
#

looks like no logics there BIS_fnc_ambientAnimCombat > https://pastebin.com/ir0g2CXT

Where might I find the function script?
Arma 3 root folder\Addons\functions_f.pbo

#

also functions viewer ^

shadow sapphire
#

Hmm... very cool. Thanks a ton... one more question at the moment... Do you know where I would find the dialogue scripts that are used in game for when a player is leading an AI group, and they say things like, "hold fire," "move two hundred meters," etc.

meager heart
#

huge maybe but i think you can check characters_f < i know danger fsm is there and there is some of formation... something fsm's ๐Ÿค”

shadow sapphire
#

Okay! Thanks for the tips!

meager heart
#

np

inner swallow
#

@shadow sapphire careful about using ambientAnim and derivatives in multiplayer, the last i tried it had a lot of issues. Some animations didn't work on a dedicated server. When i went through the function, it didn't look like it was MP safe either.

mellow obsidian
#

Can drawIcon3D handle variables as its text?

gleaming oyster
#

sure.
format it

mellow obsidian
#

Ahh, cheers!

shadow sapphire
#

@inner swallow, thanks for the heads up. Noted. I was sure hoping it would work out for me... Dammit.

#

I've been trying really hard to make an "off duty" behavior as part of a larger script, that seemed like a silver bullet of a solution, but I guess it wasn't meant to be. Will have to test it before continuing.

#

My objective is to have a security patrol make a sweep along a randomized route near their base, return to base, go "off duty" for a random amount of time (like six hundred to twenty four hundred seconds), then leave their idle animations and conduct another randomized perimeter sweep, repeating this cycle indefinitely until interrupted.

inner swallow
#

How about the dismissed waypoint?

shadow sapphire
#

Several problems with that one. The script practically exists for reconnaissance elements, and dismissed isn't very immersive, very interesting, and IDK how to "complete" it so that they would conduct their next sweep.

vernal mural
#

Hey guys, just arrived on this discord, with a disturbingly hair pulling question. Actually it's more like a general wondering exploration than a precise question :
I'm playing around with ropes at the moment. I'm trying to figure out what can be attached to what with ropes. After many hours of experiments, I can say these things :

  • any physx object can be attached to any physx object, as long as simulation is enabled for both
  • a rope can be attached to an object hidden with hideObject command
  • a rope cannot be attached to an object itself attached to anything else with attachTo (which probably disable the simulation of the attached object)
  • a rope can have one end not attached to anything

With that in mind, I'm trying to do a very simple thing : attach a boat to a pier. The boat is a physx object with simulation enabled, fine. The pier is a static object. Currently, I'm able to attach a rope FROM the boat TO any point on the pier, but if the boat is slowly moving, as soon as the rope gets stretched, the boat wank around in a very dangerous way. Over the internet some are advising to do the contrary in order to avoid wanking behavior. But if I try to create a rope FROM the pier TO the boat, the command have no effect. If I try a workaround by creating a physx object (let's call that an anchor), the rope can be created. But if I disable the simulation on the anchor, or if I attach it to the pier, here again the rope cannot be created.

Hence the final question : is there a way to properly attach a boat to a non-moving object in order to stop it from drifting, but avoiding this dangerous-looking wanking behavior ?

young current
#

From the top of my head I would say no. But I may be wrong

#

Arma physX is rather wonky..

gleaming oyster
young current
#

is probalby what hes using

gleaming oyster
#
a rope cannot be attached to an object itself attached to anything else with attachTo (which probably disable the simulation of the attached object)

This makes me think otherwise

vernal mural
#

I'm indeed not using ropeAttachTo, but directly ropeCreate instead. I assume it is the same, isn't it ?

gleaming oyster
#

Either way, it is possible to attach the boat to a object with a rope and disable breaking

#

Attach vehicle to rope with optional offset
^^ ropeAttachTo desc

vernal mural
#

struggling to see your point... For now :

  1. FROM boat TO pier works, but is wanking
  2. FROM pier TO boat is not working at all

What do you suggest ? Creating a rope FROM the boat TO nothing, and afterward attaching the rope to the pier with ropeAttachTo ? Will it be different from the first use-case ?

meager heart
#

Currently, I'm able to attach a rope FROM the boat TO any point on the pier, but if the boat is slowly moving, as soon as the rope gets stretched, the boat wank around in a very dangerous way
setMass for the boat maybe

vernal mural
#

Already tried, hoping to increase the inertia of the boat and mitigate the wanking behavior. Sadly, it didn't change much. The boat was still wanking (hardly less, that said), but was now way more dangerous to human beings around. And increasing the mass again just make it sink. I also tried changing the center of mass in order to see if it can modify the wanking behavior in a more acceptable way, but no it cannot.

#

Creating a rope FROM the boat TO nothing, and afterward attaching the rope to the pier with ropeAttachTo ? Will it be different from the first use-case ?
Just tried, nope. It works well, but the behavior is strictly the same

vernal mural
#

ArmA is all about workarounds, right ? I think I have one. The idea is to create the rope FROM the anchor TO the boat, as expected it prevent the wanking stuff. But as our anchor must be a physx object, we have to find a way to prevent it to move when the boat is drifting. Disable its simulation will not work, obviously. But one way to make the boat move instead of the anchor is to make the anchor super heavy. That way, it doesn't move at all, while the boat gently reach the max stretching of the rope and come back to the pier slowly. Excellent.

For now, I succeeded by using a Titan AA turret as an anchor. But it's not the best on a pier, not very immersive. The goal is now to find the smallest physx object I'm allowed to create a rope on, and then give it a ridiculously enormous mass. Very small object, very big mass....... yep, in ArmA when you want to anchor your boat to your pier, you have to create a Black Hole. This is fine.

winter rose
#

You can still hide it AND make it heavy, right? ;-)

#

@vernal mural

oblique vale
#

Is there a way to change the texture of a building? Tried setObjectTexture / setObjectMaterial but looks like they don't work on buildings?

vernal mural
#

@winter rose Haven't tried yet, because I keep the object visible for positionning purposes. But I assume yes, hiding it will not cause any trouble. However the problem with static AA is not only the bad look, it's rather the difficulty to place it correctly without making it fall down in to the sea. That's why I'm currently seeking for a more stable object, something without this big tripod messing with the ground twice in three.

sinful sparrow
#

Could anyone give me a script on a vehicle spawner or a guide to it please?

vernal mural
#

@sinful sparrow what do you mean by "a script on a vehicle spawner" ?

sinful sparrow
#

@vernal mural I mean a script for a Vehicle Spawner

#

I almost never scripted before so it will be a pain for me

vernal mural
sinful sparrow
#

Problem is i tried scripting before

#

I never got into it, and I've been playing ArmA since its full release in September 12 2013

restive leaf
#

Uh, maybe stick to playing. No disrespect but if you are not into scripting running a server and maintaining scripts means that you have to get into it

gleaming oyster
#

I would guess that it got hard and you gave up, you need to continue to train yourself in something you want to succeed in even when it's hard

restive leaf
#

Being able to search on google helps too. Have found many ARMA scripts that way that were either used or modified

vernal mural
#

@oblique vale those commands are able to set the texture for existing surfaces defined directly in the model, call "hidden selections". If your vehicle (either car or building or whatever) have defined hidden selection, then you can retexture it with setObjectTexture. If it has not, then you can't. AFAIK, very few buildings in the vanilla game have hidden selections. This can be checked in the config file, I guess.

sinful sparrow
#

@restive leaf I want to try to stick to it but I end up dropping it

oblique vale
#

@vernal mural Thank you will check it out

gleaming oyster
#

Logan, continuing to practice when something gets hard is the only way you get better at it. Simple.

restive leaf
#

You have to persevere mate! Once you get over the hump you may be fine

gleaming oyster
#

you can ask as many questions as you'd like here

#

a lot of people, even if they may not know the answer right off the bat. May find a solution with discussion

restive leaf
#

Yeah, check out the script that was linked above

sinful sparrow
#

@gleaming oyster I play computer so much but I never learned fully and in depth on computers

gleaming oyster
#

okay, isolate your interests to SQF in Arma 3.

#

you don't need to be a wiz at everything to learn SQF

vernal mural
#

@sinful sparrow if you don't have coding experience or a dev background, learning the scripting language might be hard, indeed. One interesting thing you might consider is to take an existing simple scripted mission, and have a deep look inside. You can open the very basic file for mission scripting, which is init.sqf and browse for the code lines you find into it. That way you will learn new commands, and sometime you will get into something that interest you more than usual. That's the key, when the interest is there, so is the motivation.

waxen tide
sinful sparrow
#

@waxen tide thanks

#

@vernal mural Thanks, only 1 person in my family is really interested in computers. I put over 10,000 in computers and I still dont fully understand files and that stuff. (I have a bit and of course common sense)

queen cargo
#

Learning sqf should be easy tbh.. Was Designed to be usable by the most rookie Idiots ๐Ÿคทโ€โ™‚๏ธ๐Ÿคทโ€โ™‚๏ธ

vernal mural
#

@sinful sparrow sadly, when it comes to ArmA, common sense is more like a burden that anyone have to carry around, wandering deep into the darkest and strangest jungle ever explored : BI's one. Have fun ! ๐Ÿ˜‰

#

@queen cargo Bushnell's law applied to scripting, uh ? "Easy to learn, hard to master"

queen cargo
#

There is nothing hard either
You just have to understand how it works ๐Ÿคทโ€โ™‚๏ธ

#

It is even easier for those, with no coding background

#

Sqf is operator based

#

Literally everything down to the control structures is an operator

vernal mural
#

yeah maybe for a complete beginner it is easier to learn, that way. Having a coding background I remember I had to forget some of the things I know before, in order to acquire the right understanding. Now I have left coding and SQF is basically the language I use almost everyday, but still learning things from times to times !

gleaming oyster
#

difficulty is relative. Although SQF is definitely easier than a regular OOP language, it isn't instantly apparent

vernal mural
#

@sinful sparrow anyway, we all wish you the best ๐Ÿ˜‰ If you know your goal, if you have the proper ressources like the official documentation, this channel, etc, you have all you need to nail it. ๐Ÿ˜ƒ

queen cargo
#

@vernal mural things like that there is some sqf emulator?

#

@gleaming oyster mostly because tutorials teach it wrong
If they would tell you that literally everything is just a math expression instead of trying to bring in actual control structures, beginners might have it easier

gleaming oyster
#

Most tutorials do it wrong absolutely, but most I see anymore barely touch on actual SQF. It's mostly working with BI modules and triggers.

#

rarely any of these tutorials ever cover the effects and usage of any commands.

queen cargo
#

๐Ÿคทโ€โ™‚๏ธ

#

I started once writing some sqf guide

#

But got Stuck in writing ๐Ÿ™ˆ ๐Ÿ™ˆ

#

Somewhere in chapter 1

gleaming oyster
#

Well, you should continue and finish it. For the greater of the people

queen cargo
#

Got a Ton of projects to finish...

#

Maybe I will continue tomorrow evening ๐Ÿคทโ€โ™‚๏ธ

gleaming oyster
#

No. Right now, I demand it. PepeHype \

queen cargo
#

Sure @gleaming oyster
Will you then continue learning and write my exam tomorrow ๐Ÿ™ˆ๐Ÿ˜‚๐Ÿ˜‚

gleaming oyster
#

Yes! ๐Ÿ˜„

vernal mural
#

@queen cargo I do know there is some (at least I know one of them), but never felt the need of using one.
But if you have a well aimed guide incoming, you should definitely improve it 'til beginners can use it to effectively progress ! ๐Ÿ˜ƒ

queen cargo
#

Iirc the guide is right now in german
Not sure though... LรครŸt time I touched was a year Ago

#

Gimme a Minute, will Boot my pc

#

yup
in german and most of it could be said is just some extremly early draft

#

and stopped at FSM

gleaming oyster
#

EEek

queen cargo
#

translating it is no problem ๐Ÿคท

#

funny part: the preamble is two pages long ๐Ÿ˜„

gleaming oyster
#

๐Ÿ˜„

sinful sparrow
#

@vernal mural Thanks, I mean't 10,000 hours not money

#

Im like when you were younger you played a game so much but you didnt get into the stuff you can use or important things. Im still like that when im older... so it sucks for me and I could really use scripting

waxen tide
#

it is called "being lazy"

vernal mural
#

@waxen tide it might also be called "having other priorities". Let's not be rude.

waxen tide
#

pfff everyone is lazy

gleaming oyster
#

Definitely not true.

sinful sparrow
#

@waxen tide I don't find that stuff much fun anymore. I really have nothing to do so I just go on my computer

waxen tide
#

?

sinful sparrow
#

Im trying to make a scenario for my server I bought, working on that with a TS. Managing a Discord, Website and Steam group for a just starting out ArmA 3 unit, but you may call me lazy.

waxen tide
#

WELL MAYBE IT IS JUST ME BEING LAZY D:

#

you guys could at least pretend to be lazy to make me feel less bad

#

so did you make progress with that vehicle spawning?

sinful sparrow
#

Oh jcd its fine im taking my time on that stuff, doing it easy. plus only work was the server

#

@waxen tide I did it on purpose, and im actually really lazy since im not motivated

queen cargo
#

And so, i decided it shall happen ...

#

more info on that, later (roughly 24 hours)

sinful sequoia
#

I have the CUP RG-31 GC (M2) but the camera is not equiped with the laser marker, how would I add one?

vernal mural
#

@sinful sequoia I'm not sure it's possible, but I'm sure you can't do it by scripting. You will have to mod the mod itself, to the best.

arctic veldt
#

Considering you can add 30mm cannons to practically anything, you can add the laser to it ๐Ÿ˜‰

meager heart
#
0 spawn {
    private _vehicle = "B_MRAP_01_gmg_F" createVehicle (player modelToWorld [0, 10, 0]);
    _vehicle addWeaponTurret ["cannon_120mm", [0]]; 
    _vehicle addMagazineTurret ["32Rnd_120mm_APFSDS_shells", [0]];
    _vehicle addMagazineTurret ["30Rnd_120mm_HE_shells", [0]];
    _vehicle addWeaponTurret ["Laserdesignator_mounted", [0]];
    _vehicle addMagazineTurret ["Laserbatteries", [0]];
};
```into debug console ^
#

@sinful sequoia

waxen tide
#

I need a bunch of random, flat, empty spots around a random town, say in a circle with like 500-1500m radius to spawn some prefabricated fortifications. I've looked at half a dozen commands like "isFlatEmpty" but it seems they always only provide one spot and some do not seem to handle large searches well :/ Anyone having a good idea with what i should start out?

compact maple
#

hello everyone, is there a way to force an spawned animal to stay close to the place she spawned?

#

@waxen tide i think there is a safePos function from BIS that actually does that

waxen tide
velvet merlin
#

forceFollowRoad true => AI truck gets stuck at intersection ๐Ÿ˜‘

waxen tide
#

but it seems to only always generate one

#

i need multiple and preferably reasonably regularly spaced out

waxen tide
#

jesus findsafepos with 750m radius runs for like half a minute

peak plover
#

๐Ÿ˜ฎ

#

That's why you are better off generating those before hand and saving them to an array into the mission file

#

(not mission .sqm) just as a file inside the pbo

round zenith
#

How to add a button to the next slide, the tablet "ExileMod" has 14 windows for scripts, I would like to add more scripts 14 to the next page.

waxen tide
#

Nah can't really do that i wanted random positions for a random city or POI fetched from map cfg thats tens of thousands of permutations even if i pregenerate it and save it gonna take hours

peak plover
#

        private _pos = [0,0,0];
        while {true} do {
            _pos = ['ao_2'] call CBA_fnc_randPosArea;
            private _isFlat = !((_pos isFlatEmpty [2,-1,-1,1,0,false,objNull]) isEqualTo []);
            private _isLand = !(surfaceIsWater _pos);
            private _isHouseNear = ((nearestBuilding _pos) inArea [_pos,15,15,0,false]);
            if ((count _pos == 3) && {_pos  inArea 'ao' && _isFlat && _isHouseNear && _isLand}) exitWith {};
        };

        player setpos _pos;
#

I did sth like this

#

I had the same issue

#

This was a lot faster

#

Bear in mind this is only for scheduled

#

Repalce while with for loop if you are doing it in unscheduled

#

I wanted a position near a house which is flat

meager heart
#

also we have > selectBestPlaces

wind nexus
#

Its possible to force the advance flight model for all pilots on the server, that they can`t change to the regular flight model?

waxen tide
#

thx @peak plover

hollow thistle
#

@wind nexus mission can force it via description.ext

meager heart
#

also you can do that ^ from the server.cfg

wind nexus
#

ok thx all

carmine maple
#

I'm having trouble fetching the laser target object from vehicles ( Rhino, Nyx Recon,...), for players and UAVs and Jets / choppers it works fine though.

laserTarget _veh;
laserTarget gunner _veh;
laserTarget commander _veh;
--> all returning <NULL-object> for Rhino and Nyx
Did i missed something?

cosmic lichen
#

Has anyone got an idea what function is called by the function viewer to fill the listbox controls etc.?

#

rscfunctionviewer.sqf is empty

meager heart
#

bis_fnc_help afaik ^

cosmic lichen
#

Right, but that doesn't do much except opening the functionviewer correctly

meager heart
#

don't get the question tbh lol

#

to fill the listbox controls etc
where ?

peak plover
#

Check the code for bis_fnc_help

#

IF you wanna know how it was made

cosmic lichen
#

Got it. There are serveral functions

#

One is called rscFunctionViewer.sqf

#

Which contains only

#

_mode = _this select 0;
_params = _this select 1;
_class = _this select 2;

#

But there is another one called rscDisplayFunctionViewer.sqf which contains all the code.

meager heart
#

ohh

cosmic lichen
#

bis_fnc_help just makes sure the actual display is opened correctly e.g., opend from eden or debug console

#

When looking through \a3\ui_f\scripts\gui one can see quite a mess

#

Alot of empty scripts and stuff.

meager heart
#

ohh x2 lol

meager heart
#

it's like uhhh... can i get uhhhhhhh... ๐Ÿ˜„

#

vanilla ui configs is so fun

cosmic lichen
#

yeah, fun, totally

modern sand
#

I've been scratching my head at this for a while now, played around with it as well. Can't really find anything online either, is there anyway to remove a keyword from a string? For example string="THISisastring";, is there a way to find if "This" is in the string, if so then remove it?

#

Just found BIS_fnc_inString, but don't really know how to then select the keyword and remove it.

winter rose
modern sand
#

Yer, I just found that and am currently playing around with it. However I'm pretty sure it's like splitString and doesn't filter the keyword, just the individual characters

winter rose
modern sand
#

Split string only uses individual characters, not full strings. So if I was do do "This is a string" splitString "This" it will return with [" "," a ","tr","ng"] instead of ["is a string"]

winter rose
#

split with a space then ;-)

or
"myString" find "mySearch"
splitString
deleteRange

modern sand
#

I can't use a space, seeming the entire goal is to remove a keyword whether or not it's spaced as it's own word (in this case selection).

brave jungle
#

How can I detect if the pause menu is open? I tried watching the esc button but it was unreliable. Perhaps grabbing the menu ID? (How?)

cosmic lichen
#

IDC is 49 so far I remember

brave jungle
#

Oh is it?

cosmic lichen
#

Try it.

brave jungle
#

So just findDisplay and thne work from there :3

#

Yep

cosmic lichen
#

findDisplay 49 in allDisplays

#

or isNull display

warm gorge
#

Is it possible to find the positions of default map markers such as petrol/gas stations around a map? Such as are they stored in a config or is there a scripting command I can use

cosmic lichen
#

isNull (findDisplay 49) (is faster)

modern sand
#
if !(isNull (findDisplay 49)) then {// ESC IS OPEN//};
#

That's only if the ESC menu is 49.

brave jungle
#

Yeah it works

#

Cheers :3

cosmic lichen
#

Your're welcome

brave jungle
#

IS there a list where I can see what each display is?

warm gorge
#

I know @still forum had a nice list ^

cosmic lichen
#

Not sure, but I use [] spawn {while {true} do {systemChat str allDisplays; uisleep 1}}

austere granite
#

not all displays show in allDisplays

#

(i know, dont get me started)

cosmic lichen
#

That might by true, but it works for most cases

modern sand
#

There you go ๐Ÿ˜ƒ

cosmic lichen
#

display3den is missing ๐Ÿ˜‰

brave jungle
#

Cheers

cosmic lichen
#

Just a question: If you could get a new function viewer, what feature would you like to see?

warm gorge
#

Search function

cosmic lichen
#

That was expected, anything else?

modern sand
#

Even though it's not needed, coloured syntax?

cosmic lichen
#

Not possible most likely

meager heart
#

you could get a new function viewer, what feature would you like to see?
fix it < this ๐Ÿ˜„

cosmic lichen
#

What's not working?

warm gorge
#

Ability to view it's attributes would be pretty cool, like preInit, postInit... etc

meager heart
#

maybe export also ๐Ÿค”

cosmic lichen
#

Export how?

warm gorge
#

Copy to clipboard?

cosmic lichen
#

Clipboard?

meager heart
#

yes ?

cosmic lichen
#

right?

#

because CTRL + A and CTRL + C is too much ๐Ÿ˜‰

warm gorge
#

People are lazy

cosmic lichen
#

Nah, I can understand that, I don't see why it wasnt implemented

modern sand
#

I loaded up the function viewer and thought the same idea, however ctrl+a ctrl+c is easy

cosmic lichen
#

Should it be fullscreen?

#

Or like it is now?

modern sand
#

I prefer if it was kept the way it is now.

warm gorge
#

Use Eden menus ๐Ÿ˜ƒ

modern sand
#

Wouldn't make a difference really though

cosmic lichen
#

I'll stick to the Eden Editor's style, so not fullscreen then.

#

The question is, functions in a ctrlListbox or ctrlTree

warm gorge
#

Depends how you're sorting it all

cosmic lichen
#

Sorting doesn't matter that much when you have incremental search in my opinion

warm gorge
#

I personally would say ctrlTree, I reckon would come out a lot nicer

cosmic lichen
#

My thought, too. Gonna see how it goes.

astral dawn
#

How would you guys implement in a mission taking a little array of text data from an external file?
We need to store a little list of server members in a file we can maintain without repacking the mission's .pbo.
The method must work both at linux and windows servers.
I think that file patching almost satisfies this, but it requires a -filePatching parameter to be passed to executable, but our hosting service (Nitrado) doesn't allow us to do that.
Another option is the INIDBI2 mod, but it only works on Windows.
Are there any other ways?

waxen tide
#

why external file?

still forum
#

you could also put it into a serverside pbo. but then you have to repack that pbo everytime

waxen tide
#

you can save variables into the namespace of the server's own profile. they'll survive restarts and can even be used across missions

astral dawn
#

@waxen tide Yes but then we can only add new members through the game itself

#

Or do you mean that we could also edit it manually through a text editor?

waxen tide
#

idk the encoding of the file in which that is stored, it is half gibberish half readable. i guess there is a way out there to edit it with an editor.

#

but if it is just a short list you can just write yourself a little gui to edit it ingame

astral dawn
#

@still forum Thx we are also considering this option. But even if we learn how to make addons it will probably be hard for other server maintainers.

waxen tide
#

profileNamespace is elegant because it exists, it works cross plattform and it is persistent outside your missions.

#

shrugs

astral dawn
#

Yeah but but making the GUI for arma...

#

Maybe there is some addon like inidbi2 I just don't know about

waxen tide
#

you can also just use commandline. appending an element to an array is simple

still forum
#

otherwise. use filePatching on linux and iniDB on windows

waxen tide
#

ewww

hollow thistle
#

also you can #include hpp files from userconfig folder even when filepatching is disabled. (I've read about this somewhere, needs to be tested.)

#

But if file will be not available it will crash your game.

still forum
#

even when filepatching is disabled huh? sure?

#

If that's true then that's a bug

hollow thistle
#

hmm... I've read about it somewhere. Might be not true.

still forum
#

That's because userconfig doesn't exist

#

it's a thing people made up

delicate lotus
#

Hey guys, I again got an question,
Many BIS Functions in the function viewer have "#include "defines.inc" at the top of the function.
How / Where can I find the content of this defines.inc file?

still forum
#

it's next to where the script file is

delicate lotus
#

okay nice

#

thanks ^^

nocturne basalt
#

Also tried example 2

#

Hoping for something better than "if nearestObject is a fish" ๐Ÿ˜„

austere hawk
#

whats wrong with underwater check?

#

https://community.bistudio.com/wiki/getPosASLW - if it's negative by "drowning height" then you are underwater... you can also put a memorypoint in the model and get the memorypoints position and compare that. You can animate the point

mellow obsidian
#

Hey!
Having an issue with setPos and getPos

test1 = createVehicle ["Land_PowerGenerator_F", position player]; 

_dir = getDir player; 
test1 setpos (player modelToWorld [0,1,0]); 
test1 setDir _dir;

test1Pos = getPos test1;
test2 = createVehicle ["Land_Portable_generator_F", test1Pos]; 

So when I move the position of test1 with setpos and then getPos of test1 its the original position, not the position I've moved it to.
Sombody know away around this?

nocturne basalt
#

@austere hawk underwater returns true when parts of it is above water. Gonna try getposaslw. Thanks

austere hawk
#

propably because it just gets some arbitrary point it thinks is underwater

meager heart
#
tag_fnc_isUnderWater = {
    (aimPos _this) select 2 < 0
};

_object call tag_fnc_isUnderWater;
``` maybe ^
austere hawk
#

aimpos should be somewhere in the middle of the vehicle

meager granite
#

@mellow obsidian add CAN_COLLIDE

mellow obsidian
#

Will try that, cheers Sa-Matra

nocturne basalt
#

@meager heart thanks

meager granite
#

@nocturne basalt How precise you need it to be? What you're checking for actually?

hollow thistle
#

Is there any place where can I get information what all the names in the diag_captureFrame tree mean?

meager granite
#

@nocturne basalt Do you check if vehicle is drowning?

mellow obsidian
#

You are a genius Sa-Matra, it works. Many thanks!

meager granite
meager heart
#

๐Ÿ˜ƒ

mellow obsidian
#

Haha yeah missed the last parameter there, didn't even think about it. My bad ^^

torpid pike
meager granite
#

True, there is no hitpoint in getAllHitPoints either ๐Ÿค”

cosmic lichen
hollow thistle
#

Yeah I know how to open profiler. I wanted to know what every node means. One of the Liberation players is having some severe fps drop after few hours after the mission start and I'm trying to find the cause.

#

In his profiling log only suspicous thing I saw is (part of tree):

total
  wSimu
   waitBG; 84.60422; 362.65869;""
     3dSwp; 84.61671; 362.64536;""
#

but as I cant find any description what for ex. is "waitBG" node I have no idea what it means.

cosmic lichen
#

I see

hollow thistle
#

Also it looks like some background thread so it might be irrevelant.

cosmic lichen
#

Ask @still forum , he knows alot about that stuff.

hollow thistle
#

Hes streamin now so maybe ltr he will take a look at the channel ๐Ÿ˜„

verbal knoll
tough abyss
#

Today, my make.py enviroment will nnnnnooooooottt launch the dev build pbos. But I didn't make any fucking changes from last time WAT

#

whatt the fucccckkk

rotund cypress
#

You are doing something wrong, it should grey out. @verbal knoll

#

Is this some custom texture on it?

verbal knoll
#

fixed it already XD had to do ctrlShow false aswell...

#

thanks anyway

rotund cypress
#

Even then, what happened when you did ctrlEnable false was weird.

#

@verbal knoll

cosmic lichen
#

ctrlShow false; should hide it completely. Make sure you haven't placed two controls on top of one another.

#

Does anyone know the IDC a edit box has to have to be detected as search control for a ctrlTree?

rotund cypress
#

In your tree, just put

idcSearch = IDC_OF_CTRLEDITBOX;```
#

@cosmic lichen

cosmic lichen
#

Ah right, that's how it was. Thanks!

rotund cypress
#

I don't think this is even on the wiki.

cosmic lichen
#

It will be in a minute ๐Ÿ˜ƒ

rotund cypress
#

Great. Yeah back when the tree was implemented I had to go check Bohemias code.

cosmic lichen
#

That's what I did, but I was looking for something different ๐Ÿ˜ฆ

nocturne basalt
#

@Sa-Matra#6180 Im making a mech that can walk under water. I wanna disable ejection functionality while under water + hide muzzleflashes

still forum
#

@hollow thistle waitBG waitBackground. Wait for other threads to complete.
3dSwp DirectX Framebuffer swap.

hollow thistle
#

Ty. So can 300ms framebuffer swap cause low fps?

still forum
#

well... yeah...

#

300ms frametime is like.. 3fps

hollow thistle
#

I have no idea what causes that.

still forum
#

graphics driver glitch could be

#

or BI is hiding more inside there than it should be.
3dSwp should be 3D Swap. Maybe they are doing other stuff inside there

#

Can you reproduce it?

hollow thistle
#

It happens to one liberation player not me.

#

He says that after few hours of playing he gets massive fps loss.

still forum
#

Sounds like sound bug though

hollow thistle
#

I told him to get profiling exe and send me the captures.

#

But theres nothing interesting here.

still forum
#

well if he has latest profiling that fixes sound bug.. So probably not that then ^^

meager heart
#

if that happens on the client, after "some time" (also just for 1 player), probably not related with mission... at all... ๐Ÿค”

austere granite
#

Does anyone know what's up with some hud elements automatically fading out

#

fadeIn / fadeout are on 0, duration is on 1e9, cutRsc with 0 time :/

sonic belfry
#

-__

austere granite
#

i ran into it before but cant remember wtf caused it, just that it was retarded

sonic belfry
#

//Fades it out 100% instantly.
_control ctrlSetFade 1;
_control ctrlCommit 0;
//Fades it back in over 1 seconds
_control ctrlSetFade 0;
_control ctrlCommit 1;

austere granite
#

not using ctrlSetFades or anything

#

pure config, even just doing "FRL_Prep_uiLayer" cutRsc ["FRL_Prep_prepIndicator", "plain", 0, true]; fades it out right away again

sonic belfry
#

("AnyHUD" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; //remove
("AnyHUD" call BIS_fnc_rscLayer) cutRsc ["AnyHUD","PLAIN"]; //show

#

thats how i do it

#

works fine

#

but put it in a While do

tender fossil
#

Should I use 'getIn' event handler or a loop if I want to keep track of a vehicle that given player is in? I mean that the script should monitor the vehicles that player uses during match

#

I guess a loop would be better?

austere granite
#

imo more reliable to use a scripted EH, that checks if vehicle player

#

scripted getins dont trigger and some other issues with it

meager heart
#

duration = 1e+011; < in the config, Adanteh ?

austere granite
#

wtf lel, checking config viewer it says duration = "1.#INF";

#

๐Ÿค”

meager heart
#

lol

austere granite
#

okay the two ones that had broken both had a duration of duration = 1e+1000;

#

... and here's the best thing

#

it works fine in SP / local Host, but not on dedicated

#

configs are now* dependent on playing on dedicated servers ๐Ÿค”

hollow thistle
#

So the fps losses happen not only to the guy that i got profiling data from but also to his friend. One of them has nvidia and another one has amd so I would rule out driver issues. Maybe I'm missing something so I could send you the profling captures @still forum if you have the time to check them out.

tender fossil
#

@austere granite Is there any info on how to create scripted EH?

austere granite
#

you using CBA?

tender fossil
#

I'm not, without mods

round scroll
austere granite
#

its not ๐Ÿ˜„

round scroll
#

lol

tender fossil
#

I assume scripted EH's can only exist with help of CBA? ๐Ÿ˜›

austere granite
#

nah, i just dont know the vanilla function names :/

round scroll
#

the f/a-18 script by @split nebula uses BIS_fnc_addStackedEventHandler and BIS_fnc_removeStackedEventHandler

austere granite
#
tag_vehiclePlayer = objNull;
["tag_customEvents", "onEachFrame", {
    _data = vehicle player;
    if !(_data isEqualTo tag_vehiclePlayer) then {
        [missionnamespace, "vehiclePlayerChanged", [_data, tag_vehiclePlayer]] call BIS_fnc_callScriptedEventHandler
        tag_vehiclePlayer = _data;
    };
}] call BIS_fnc_addStackedEventHandler;
#

that should be in

round scroll
#

there's aslo addEventHandler

austere granite
#
tag_vehiclePlayer = objNull;
["tag_customEvents", "onEachFrame", {
    _data = vehicle player;
    if !(_data isEqualTo tag_vehiclePlayer) then {
        [missionnamespace, "vehiclePlayerChanged", [_data, tag_vehiclePlayer]] call BIS_fnc_callScriptedEventHandler;
        tag_vehiclePlayer = _data;
    };
}] call BIS_fnc_addStackedEventHandler;

[missionNamespace, "vehiclePlayerChanged", {
    params ["_newVehicle", "_oldVehicle"];
    systemChat "Changed vehicles"
}] call BIS_fnc_addScriptedEventHandler;
#

there

#

now you have a scripted event system

#

i think

#

@tender fossil

tender fossil
#

Thanks! ๐Ÿ˜ƒ @austere granite

tough abyss
#

How should I pass the client's character to a server-side script? Ex.,
Client calls:

[player] remoteExec ["fnc_foo", 2];
dusk sage
#

You could do that if you so wish

#

You could also fetch their object via ID server side

#

Whatever floats your boat

tough abyss
#

If the above works, that sounds easiest to me. Thanks

tough abyss
#

How could I wait for a remoteExec script to finish?

thin pine
#

Broadcast a variable back to the player. Have the player waitUntil that var is received (or time out?).
Or perhaps use an event-like structure and have the server remotely call a function on the client once it's done.
Just some ideas

chilly wigeon
#

alternatively make whatever you want to do a function, and just remoteExec back from the server

#

You already have the player object to use a target

brave jungle
#

anyone able to give me a hand real quick?

#

Got a variable not being detected, but i'm sure i'm doing it right

#

From a dialog, i'm sending:

action = "Time = ctrlText 1400; [Time] execVM ""Curious's Framework\scripts\misc\features\countdownTimer.sqf""; closeDialog 0; StopTimer = false;";
cosmic lichen
#

I am sure ctrlText 1400; doesn't work

brave jungle
#

Well that's where it's wrong

cosmic lichen
#

You need the display too

brave jungle
#

Because

#

hold on

#

because when I don't use spawn

#

this script works fine

#

It's a bit big, wanna see what I mean?

#

Syntax: String = ctrlText idc

#

1400 is the rscEdit idc

#

class RscEdit_1400: RscEdit { idc = 1400;

cosmic lichen
#

Did you try ctrlText (_disp displayCtrl 1400);

brave jungle
#

I have not

cosmic lichen
#

Because working with idcs only can be a bit strange

brave jungle
#

Ah

#

quick copy and paste and report back then?

cosmic lichen
#

Sure.

brave jungle
#

Same thing, undefined variable in Expression

#

So i've got ```sqf
//Dialog
action = "_CountTime = ctrlText ((findDisplay 321) displayCtrl 1400); [_CountTime] execVM ""Curious's Framework\scripts\misc\features\countdownTimer.sqf""; closeDialog 0; StopTimer = false;";

winter rose
#

ah yes! time is a reserved variable ๐Ÿ™‚

brave jungle
#
//Countdown Script
[[], {
StopTimer = false;
_TimerAmount = _this select 0;
sleep 1;
_TimerAmount = parseNumber _TimerAmount;

sleep 1;

"CUR_Countdown" cutRsc ["CountdownNotification", "PLAIN", -1, true];
playSound "Beep_Target";

_displayM = uiNamespace getVariable "CUR_CountdownVar";
_control = (_displayM displayCtrl 1000);


for "_i" from _TimerAmount to 0 step -1 do {
    if !(StopTimer isEqualTo true) then {
    if (_TimerAmount < 60) then    {
        _control ctrlSetStructuredText parseText format ["%1 seconds!" , _TimerAmount];
    } else {
        _control ctrlSetStructuredText parseText format ["%1 minutes" ,floor (_TimerAmount / 60)];
    };
    if (_timerAmount < 15) then { _control ctrlSetStructuredText parseText format ["%1 seconds!" , _TimerAmount]; playSound "Beep_Target"; };
    _TimerAmount = _TimerAmount - 1;
    sleep 1;
    } else {
        ["<t color='#ff7635' size = '.8'>THE CURRENT COUNTDOWN HAS BEEN CANCELED BY ZEUS!</t>",0.01,(safeZoneY + 0.05),10,1,0,90]spawn bis_fnc_dynamicText;
        "CUR_Countdown" cutFadeOut 2;
    };
};

playSound "Transition3";
["<t color='#ff7635' size = '1.2' font = 'RobotoCondensedBold'>THE TIMER HAS ENDED!</t>",0.01,(safeZoneY + 0.05),3,1,0,90]spawn bis_fnc_dynamicText;
"CUR_Countdown" cutFadeOut 2;
}] remoteExec ["spawn"];
#

I don't get it

#

Without using remoteExec

#

it works perfect

winter rose
#

time is a command

brave jungle
#

Oh

#

so it';s reserved

winter rose
#

it's as if you did setDamage = 5

brave jungle
#

Right

#

Yeah

#

It worked before though?

winter rose
#

assignation should raise an error

brave jungle
#

I'm probs doing something wrong in my detection of the varible though, could you have a quick look, i'll adjust the _time too

#

Same error undefined variable in expression: _TimerAmount

winter rose
#

of course: your argument is empty: [[], (โ€ฆ)

#

so _this select 0 is nil

brave jungle
#

I put that there because you suggested to try it yesterday not suggesting its your fault I should ahve asked yesterday ๐Ÿ˜›

winter rose
#

๐Ÿ‘€

brave jungle
#

So i'm putting my _CountTime there

digital jacinth
#

I do have a question about publicVariable. Is is possible to publivaraible compiled code? I do have a function compiled with cfgFunctions and essentially want to fill the same variable name from the server to all clients and jips.
The purpose is to make a script/mod of mine server only.

still forum
#

yes.

#

you can publicVariable any variable

digital jacinth
#

okay, i did read on the wiki that it is not possible to transfer references such as "scripts" and "script handles". So I was not sure. I've seen people compile their code or simply assign code to a variable during runtime and then publicvar'd those, i wondered if that was posisble for cfgFunctions compiled as wlel

brave jungle
#

@winter rose Found a work around. Told the script to close the dialog instead, therefore forcing it to grab it there. It's a bit messy but will work, thank you for the help, you too @cosmic lichen

winter rose
#

๐Ÿ‘

quasi rover
#

When building is destroyed by our side's attack, Is there a way to find out who did it?

winter rose
#

with an eventHandler I think ๐Ÿ™‚ @quasi rover

still forum
#

references true @digital jacinth
scripts are not references though.
And.. Not possible is also not quite true. You can transfer script handles but they are useless because the script only exists locally.

I've seen people compile their code or simply assign code to a variable during runtime
i wondered if that was posisble for cfgFunctions compiled as wlel That is EXACTLY what cfgFunctions is doing. compiling the code and assigning it to a variable during runtime.

digital jacinth
#

good to know. I prefer asking before wondering why itis not working

cosmic lichen
#

Interesting, tvCollapseAll _ctrlButton crashes the game ๐Ÿ˜„

cosmic lichen
#

Has anyone worked with ctrlTextWidth? It seems to return some very abstract values for me, which are in no relation to the actual text width.