#arma3_scripting
1 messages Β· Page 540 of 1
Nah, one door of the hangar is initially closed on the Land_Airport_01_hangar_F then i have an addAction that open the door closed AND close the second
yea i did this for an unreleased asset,. i had to bind them together with condition/statement in the useraction in config
have a look at this - https://pastebin.com/MEPiUTnW
I skipped the use of BIS_fnc_Door entirely as it is only useful for door setups which follow BI's standard door setups.
it's not on a custom model
but it is not configured either,. which leads me to believe it wouldnt work in the fasion you want with BIS_fnc_Door anyways
yeah, buy looking thourght the config i coticed BIS_fnc_Door
but
just to clarify, i want to animate the sliding doors of an apex hangar, but when run the function/command to animate the second door, the first one keeps moving but witout its respective geometry LOD part
in other words, i can walk throught the first door
@elfin inlet first noticed this, i managed to repoduce it on my end
Then sounds like the model is broke
i managed to reproduce the same on Land_Dome_Big_F
which let me think it's not related to structure itself. But i need to test on more building to be sure
ah interesting,. the hangar you mentioned does have the correct selections in the geo lod (door_1/2/3),. unless something funky is happening when that script/function fires
for my use i needed them to open both doors at the same time, so went the old school tried and true and just wrote conditional statement bind in the user actions
although config for that BI hangar has no useractions for doors 2 & 3 and only function through eden attirbutes
I have the problem only when both doors do not the same animation ( One opening the other closing)
To clarify, i have the hangar and i closed the door 2 on the editor.
Then i have an addAction that do this:
Hang1 animateSource ["Door_3_sound_source", 0];
Hang1 animateSource ["Door_2_sound_source", 1];
iirc I think i had that with my hangar too, so with those statements in pastebin^ i bound them to use the same trigger in model.cfg
its funny that BI model is missing the useractions though
the initPhase of the doors are 1 (open), did you try Hang1 animateSource ["Door_2_sound_source", 0]; after pre-closing the door in eden ?
you could use animationSourcePhase on the door to report its anim phase after each action, then at least you would know what its doing phase wise
Those really the only animation sources on the doors?
there are controllers for locked, open and another (i just closed arma, woops π ), for each door
Yeah i did a test without pre-closing the door.
Spawned a hangar, executed : hangar animateSource ["Door_3_sound_source", 0];
Waited for the animation to finish then executed
hangar animateSource ["Door_3_sound_source", 1];
hangar animateSource ["Door_2_sound_source", 0];
Problem still here.
here is a console ready script that reproduce the issue 100% for me ;
[] spawn {
// first close the right door
hangar animateSource ["Door_3_sound_source", 0];
sleep 16;
// once the right door is completly closed, start to close the left door
hangar animateSource ["Door_2_sound_source", 0];
sleep 4;
// 4 seconds later, we open the right door
// the geometry LOD of the left door wich is currently closing will stop
// and remain at its position until the animation of the left door is completely done
// during that time you can walk through the door and collide with the "stuck" geomety
// at the position the left door was when you started the second animation
hangar animateSource ["Door_3_sound_source", 1];
}
Notice that if you don't do the SLEEP between the to commands, the geometry LOD will not move at all even after both animation are finished
sounds more like a bug now with animations of the geo lod specifically
the animation time for those doors is 15 btw, so your sleep 16; is perfect π
^^
it could be house simulation class is limited running simultaneous animations, or at least if one is running and another fires it becomes discombobulated.
perhaps it always has been like that, the big and slow doors just make it obvious
yeah i did have some wierd stuff happen rigging my own dual hangar doors, put it down to tiredness, may have been the same issue
i'd definately report it on the feedback tracker though, at least then if anything it is noted somewhere for BI
Just tested on Land_i_House_Big_01_V2_F. Same bug
@elfin inlet found an even worse case where geometry/FireGeometry LOD are completely ignored and won't return in position once the animation is complete
[] spawn {
hangar animateSource ["Door_3_sound_source", 0];
sleep 16;
hangar animateSource ["Door_2_sound_source", 0];
hangar animateSource ["Door_3_sound_source", 1];
}
you end up with Door_2 visually closed but you can get and shoot through and Door_3 visually open but you hit an invisible wall if you try to pass/shoot
and it is reproductible on any building
@patent estuary https://feedback.bistudio.com/T142302
When a player join my server, i need to run some basic code, and this includes some heavy nearObjects functions. Since this is the first time nearObjects run onh client, it takes lots of time to conclude, because things on map are not cached, i believe. There is a way to make this firsts nearObjects function don't take that much to conclude?
First batey of nearObjects takes 13 seconds to run. If you run it again, than it takes only 45 ms to run π²
Hi there! Im trying to generate a List of Gear Types to use in a loot spawn script. I have found this script made by Grumpy Old Man but have no idea how to actually get it to work i.e. to f.e. return a list of arrays with the different weapon / backpack / attachement types etc. for me to use. I could use some help in getting anything useful out of this please! https://forums.bohemia.net/forums/topic/169386-read-weapons-from-cfg-and-sort-them-according-to-firepower/
ctrl press state for onMapSingleClick (and the mission EH) would be nice
ctrl+click is now used for map free hand drawning, however onMapSingleClick has return value to block native engine functionality anyway (which applies to shift click too)
hey, is it possible to make a mod where a specific vehicle will always spawn with a script in the ini ?
yes, cba
would it be easy to do if youre not too experienced with modding? i know how to use the basic arma 3 tools and stuff just kinda lost with scripting
nice thanks!
do i need to do the whole bulldozer work drive thing do view the config file for the falcon uav ?
i tried to view it there but i wasnt able to copy the whole thing to a text document, is it possible to do that?
Never tried that.
Guess for that a AIO config would be better
hm does this look right?
class Extended_PreInit_EventHandlers {
class My_pre_init_event {
init = "this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]";
my game crashes when i try using it
oh wait might have used the script for events instead of objects
ok i basically have no idea what im doing but could it look something like this?
class CfgVehicles {
class BB_T_UAV_03_F{};
};
class Extended_Init_EventHandlers {
class B_T_UAV_03_F {
init = "this addEventHandler ["Fired",{(_this select 0) setVehicleAmmo 1}]";
};
};
};
Is there a stackable version of inGameUISetEventHandler?
how do i convert this to allow me to use a string var with html in it, instead of a url
disableSerialization;
private _display = (findDisplay 46) createDisplay "RscCredits";
private _group = _display ctrlCreate ["RscControlsGroup", -1];
private _html = _display ctrlCreate ["RscHTML", -1, _group];
_group ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_group ctrlCommit 0;
_html ctrlSetBackgroundColor [0,0,0,0.8];
_html ctrlSetPosition [0, 0, safeZoneW, safeZoneH * 3];
_html ctrlCommit 0;
_html htmlLoad _url;
I think thats not possible. But you can add a html-file into your mission file and load it.
@solemn token the issue is im dynamically creating some content and i really like that dialog. is there another way to get a dialog like that one?
If you need hyperlinks, no.
Otherwise maybe structuredtext is what you need?!
https://community.bistudio.com/wiki/ctrlSetStructuredText
@exotic tinsel
it can be local as he-man said which is nice
structuredtext is typical and pretty good
could even have a uri
try this as the url:
data:text/plain;charset=utf-8;base64,PGRpdj4gb29ibGUgZm9vYmxlIGhlbGxvIDpEIDwvZGl2Pg==```
@solemn token i went with this. thank you for pointing me in the right direction.
disableSerialization;
private _display = (findDisplay 46) createDisplay "RscCredits";
private _ctrl = _display ctrlCreate ["RscStructuredText", -1];
_ctrl ctrlSetPosition [safeZoneX, safeZoneY, safeZoneW, safeZoneH];
_ctrl ctrlCommit 0;
_ctrl ctrlSetBackgroundColor [0,0,0,0.8];
//_ctrl ctrlSetPosition [0, 0, safeZoneW, safeZoneH * 3];
_ctrl ctrlCommit 0;
_ctrl ctrlSetStructuredText parseText _Server_Roster_ALL;
general question about variables:
do variables save absolute values or can i have automatically updating variables?
f.e. _varLIST = [_var1,_var2];
will _varList autoupdate its values if _var1 and _var2 are changed or will it stay the same?
if you can change the variable by reference, it will auto update
but you can only do that with arrays
_var1 = [];
_var2 = [];
_varList = [_var1, _var2];
//_varList is [[],[]]
_var1 pushBack "test";
//_varList is [["test"],[]]
"by reference" means with a function like pushback instead of _var1 = ["test"]?
yes
= puts a new value into the variable
_varLIST = [_var1,_var2];
here _varLIST doesn't know what variables are in the array.
But it knows what values these variables point to.
_var1 = x
basically changes what the variable points to. _varLIST doesn't know about that change and still only stores what it previously pointed to
okay thank you. will use reference functions then
hi guys. for the past three hours, i've tried to edit a simple mission where a single artillery piece fires a salvo at a house, nothing else. i don't know shit about scripting and i can't get it to work, i've tried it for over three hours, watched countless youtube videos but it just doesn't work. i'm really desperate, could someone make a mission for me that I could copy paste?
real artillery piece or "virtual" (a.k.a you don't see it) artillery?
real artilley piece
what have you tried so far? @silk radish
The commandArtilleryFire script
https://community.bistudio.com/wiki/doArtilleryFire does it immediately if you want
@winter rose i can't get that to work either
how am I supposed to know all the ammo types
and it won't fire when I try to play
how am I supposed to know all the ammo types
in-game config viewer, in Eden while playing > Escape > Config Viewer
or using the wiki
You can also use https://community.bistudio.com/wiki/getArtilleryAmmo instead of manually entering ammo if you aren't looking for a specific round.
I would guess a sub-group is the part of group, such as 6 & 7 follow 2, 4 & 5 follow 3, 2 & 3 follow 1
is there a quick way of preventing a script-spawned unit to be passed to a headless client ? Something like myUnit allowHC false ?
not setOwner it?
I would guess a sub-group is the part of group...
dont think so
I wonder why there is no locality information on addMissionEventHandler. How does it work ? Local only ?
I would say, yes
wat, I've never heard of that command π€
ah really, it does exist. Might look again tomorrow
β¦which one? subgroup?
ye
(I was scared for a moment you didn't know about addMissionEventHandler :DΒ )
yes it local
https://community.bistudio.com/wiki/Arma_3:_Event_Handlers/addMissionEventHandler updated
@vernal mural @still forum
@Hippo#0619 for a mortar:sqf myMortar doArtilleryFire [getPosATL player, "8Rnd_82mm_Mo_shells", 3];
β¦oh
Hi, I am looking for some help explaning a question for me. I've recently started scripting, so far I've made a poor Vehicle spawn script that using the command menu and a automatic loadout script, that also has a manual selection w/ setUnitTrait for medics and engineers. I'm getting script errors in my vehicle service script. if ( _vehicles == ["landVehicle", "Air"] ) then { hintSilent "Repairing..."; sleep 5; _vehicles setDamage 0; hintSilent "Refuelling..."; sleep 5; _vehicles setFuel 1; };
Getting errors on the _vehicles == ["landVehicle", "Air"] bit. can anyone tell me what I'm doing wrong?
== can't compare array
isEqualTo can, but string comparison in there is case sensitive
Something strange happened : "marker_submarine" setMarkerPos (destroyer getVariable "submarine");
this fails with an error like "type object, array expected"
but the wiki says that Object is allowed as parameter. Outdated wiki ?
I think tthe litttle dash after Array means an Object can be inside the array
@ruby breach AH. Outdated Cheitan then, not outdated wiki.
is there an Eventhandler that fires if an ACE gesture is used by a player? Wanna use it to trigger the ACIM civilian interaction script to stop civilians if i perform the ace "freeze" gesture.
i could write my own EH but im retarded in terms of performance impact reduction so i would like to avoid that π
calling in the expert @still forum
already on it
thats fine. will look into it
https://cbateam.github.io/CBA_A3/docs/files/events/fnc_targetEvent-sqf.html
is slightly inconclusive for me. What exactly can i do with
[QGVAR(playActionNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
the paramater passed is the unit, thats cool but how do i get that parameter and where?
how do i notice that this specific cba target event has happened/fired? is it like a vanilla eventhandler function that i define somewhere?
peeerfect, thats exactly what i was looking for
now, i start to understand the CBA eventhandler stuff. it seems there is already an eventhandler by ACE 3 that fires whenever an ace animation is played (which makes sense). it is that one:
//orignial ace eventhandler
[QGVAR(playActionNow), {(_this select 0) playActionNow (_this select 1)}] call CBA_fnc_addEventHandler;
now, first of all that name (which should be a string accoridng to cba ) is not a string. i have no idea what it actually is, some wierd global variable.
hint str QGVAR(playActionNow)
returns an error "missing ;"
i need the name of that eventhandler to be able to read it tho.
if i rip the original ace eventhandler and globally run it with my own script (just to see it it works), it returns an error "missing ]" which is obviously not missing.
//slightly altered ace eventhandler run by me globally from debug console
[QGVAR(playActionNow), {hint ("Eventhandler fired, Gesture"+ str _this)}] call CBA_fnc_addEventHandler;
I strongly assume the problem is the events name.
Hi! What command should I use to make AI group to disembark?
@lofty rain
(driver _tank) action ["getout", _tank];
https://community.bistudio.com/wiki/driver
aha
in your case "ace_common_playActionNow"
@spark turret Thanks!
@pure raptordmen awesome it works now!! learnign something new from you every day
for everyone else:
If you want to run a script if a player performs an ACE gesture, run this globally with your own script stuff added, its an eventhandler that fires every time an ace gesture is performed.
_id = ["ace_common_playActionNow", {hint (str _this + "Eventhandler fired, Gesture");}] call CBA_fnc_addEventHandler;
new #perf_prof_branch 1.92.145888 with fixes, performance improvements (yep script caching is back) and more admin features
im curious, have anyone had the issue "not being able to move below 50%hp" with mocap melee mod? im not sure this is the right place to ask, but you never know if someone has and have a clue on what is causing it.
probably #arma3_questions would be the place to ask about mods
private _cases = {
case 1: {"a"};
systemChat "past case 1";
case 2: {"b"};
systemChat "past case 2";
case 3: {"c"};
systemChat "past case 3";
default {"default"};
systemChat "past default";
};
private _res = switch 2 do {
[] call { [] call _cases; systemChat "past cases inner" };
systemChat "past cases call outter";
};
systemChat str _res;```
output?
past cases inner
past case 1
past case 2
past case 3
past cases call outter
default
@queen cargo
- past case 1
- past cases inner
- past cases call outter
- "b"
@exotic flax w8 wut?
Urgh
going to use a public var, systemChat has a limited amount of lines
makes sense, since the switch is called within 2 calls... so why would it still have the "case 2"?
and to be fair... instead of asking, why not executing it in-game π
because @queen cargo doesn't have access to an Arma instance @exotic flax ;-)
["past case 1","past cases inner","past cases call outter","""b"""]```
using ```sqf
X39 = [];
private _cases = {
case 1: {"a"};
X39 pushBack "past case 1";
case 2: {"b"};
X39 pushBack "past case 2";
case 3: {"c"};
X39 pushBack "past case 3";
default {"default"};
X39 pushBack "past default";
};
private _res = switch 2 do {
[] call { [] call _cases; X39 pushBack "past cases inner" };
X39 pushBack "past cases call outter";
};
X39 pushBack str _res;
copyToClipboard str X39;```
ye .. crapload of shiat
@exotic flax did you get the results from Arma?
no, it was an educated guess based on programming knowledge
@exotic flax ah ok! I thought we had a conflict based on different versions of Arma π
@queen cargo not what you had?
Anyone know if when Remote Executing a file does it make a network traffic difference to a dedicated server if RE'ing an isolated group or everyone? Like does all clients receive the RE regardless of target then the clients determine if that is intended for them? Or does the server only send the packet to those who are listed as targets and no one else receives that RE request? If that makes sense? I'm assuming it only goes to intended targets specified... However, I could see it just carpet bomb everyone and then the client determines if they're the intended target...
more like no fucking idea how BI pulled that one off
unless they store the result in the switchdata
@steady jungle by "remote executing a file", do you mean this?sqf [[], "file.sqf"] remoteExecCall ["execVM"];
but yeah remoteExec-Call only target the "target machines"
Like..
params remoteExec [functionName, 0, JIP]```
VS
```sqf
params remoteExec [functionName, [3,5,6], JIP]```
yes it sends only to the said targets, saving bandwith
https://community.bistudio.com/wiki/remoteExec
2nd right-argument, "targets"
private _cases = {
case 1: {systemChat "inside 1"; "a"};
systemChat "past case 1";
case 2: {systemChat "inside 2"; "b"};
systemChat "past case 2";
case 3: {systemChat "inside 3"; "c"};
systemChat "past case 3";
default {systemChat "inside default"; "default"};
systemChat "past default";
};
private _res = switch 2 do {
[] call { [] call _cases; systemChat "past cases inner" };
systemChat "past cases call outter";
};
systemChat str _res;```
@winter rose
Yeah, I wanted to know if actually saved bandwidth or not
@steady jungle it does π
Ok, like I said I could see it carpet bombing then the client determining if they're 3,5,6
nay, clients shouldn't decide
Haha, thanks
@queen cargo converted to
X39 = [];
private _cases = {
case 1: {X39 pushBack "inside 1"; "a"};
X39 pushBack "past case 1";
case 2: {X39 pushBack "inside 2"; "b"};
X39 pushBack "past case 2";
case 3: {X39 pushBack "inside 3"; "c"};
X39 pushBack "past case 3";
default {X39 pushBack "inside default"; "default"};
X39 pushBack "past default";
};
private _res = switch 2 do {
[] call { [] call _cases; X39 pushBack "past cases inner" };
X39 pushBack "past cases call outter";
};
X39 pushBack str _res;
copyToClipboard str X39;```
result sqf ["past case 1","past cases inner","past cases call outter","inside 2","""b"""]
anything else?
is there a performance difference between "sleep" in sqf and fsm's ""sleep"" by constantly checking current time?
constantly checking current time in script is more expensive than checking current time once (or less) per frame in engine yes
ok thanks, just as i suspected...
One provides some guarantee for timing one is not
Sleep only guarantees your script will be suspended for not less than set amount but for how long is undefined
ok good to know - luckily timing isnt critical - i'm running more in the "check every couple minutes" - though iirc it was mentioned sleeping very long is bad as well...
i'm just looking at some cti/warfare missions and there appear to be several fsm running in loops that dont consist of more than a hand full of states... But executed for one of each town and other stuff
wonder if its worth it to put the loop and sleeping in sqf and only call the fsm periodically
You may want to consider a trigger, sort of middle solution between sleep and checking time each frame. You get +- 0.5 sec precision if you put time check in condition. Alternatively you can activate trigger with setTimeout, dunno how precise it will be. You can also make a cron type extension to dispatch your timed tasks via ExtensionCallback
Also keep in mind that mission time time is flexible and does not keep with the actual time. It can be slowed down and speeded up and even if you do not alter its speed directly it can lag behind under heavy load
i see. but i think i'll avoid extensions for now ^^ thats new grounds entirely (as is mission stuff)
hey guys, i'm making a mission where you can take on "contracts". each "contract" has a set difficulty (1 through 5 stars). on each mission, i'm spawning a certain amount of units, but currently the amount of spawned units is random. what kind of math should i do to allow the difficulty to influence the amount of units? i don't want it to get too crazy around 5 stars and my math is pretty poor so i'm unsure how to proceed
currently, i'm spawning GROUPS of units via a for loop, checkign the amount of houses in the nearby area like this:
_nearHouses = nearestObjects [_position, ["House"], 200, true]; for "_i" from 0 to ((round ((sqrt (count _nearHouses)) * 0.5)) max 2) do { _enemyGroup = [_position, 7, 200, nil, "bandit"] call MISSION_fnc_spawnEnemyUnit_Group;};
each argument in that function is (center to spawn group at, amount of units in group, radius to spawn units at, the group's patrol radius (setting it to nil makes them not patrol), and unit type but most of these arguments don't really matter here in this context
wouldnt it be more logical to just say how many units (min max) you want for each respective level and then distribute them in random locations?
that's not a bad idea lmao i don't know why i didn't think of that
i just wanted to try and make it completely random idk
its still random even if you decide a max amount for each level
and then randomize it
complete random is bad - controlled random is what you want in gameplay
Sb. knows the command to deactivate a listbox ui control?
ctrlEnable
thx
π
but does not work with listboxes it seems
@frigid raven it does
@frigid raven check the wiki for syntax and make sure you're using it correctly
hi im looking for someone to teach sqf im a game developer and wanted to add another language to my belt
@heavy lichen well this language only applies to this engine, but you're welcome
see the following for starters:
https://community.bistudio.com/wiki/Code_Optimisation
https://community.bistudio.com/wiki/Mission_Optimisation
https://community.bistudio.com/wiki/Multiplayer_Scripting
thank you
@winter rose Don't we have a Arma 3 related "getting started" page for scripting?
we do!
is there something like {} forEach 5 where it iterates 5 times. range or somethinh?
thx bud
I got a question, is there a way to reference all vehicles class names? Let's say for a spawn script and instead of manually writing all class names, I would use something like LandVehicles to get all ground vehicles?
there is a way to get them all yes
https://community.bistudio.com/wiki/configClasses
Ahh thanks, didn't think of that
@gloomy basalt maybe more https://community.bistudio.com/wiki/configProperties given some user notes
Awesome thanks, I think that would work with the idea I had in mind
@winter rose you wouldn't know if there was a way to get faction specific vehicles from that config would you?
you would need to get the config "faction" value of the class
Alright, thanks again
π
How do i hide the list of players in a squad for squad leaders? the thing that runs across the bottom.
@exotic tinsel I would try showHUD, or findDisplay 46 and find the subdisplay
Yup, showHUD 7th array item
@winter rose thank you so much mate
Anyone have any ideas on how to modify damage taken by AI while using ACE? In vanilla A3 I used to use "this addEventHandler ["HandleDamage",{damage (_this select 0)+((_this select 2)/15)}];" and it got the job done but it doesn't seem to work with ACE. Anyone know of a workaround?
i googled this and wasn't sure, but is it possible to add Structured Text to a listbox?
Could getMissionConfigValue https://community.bistudio.com/wiki/getMissionConfigValue be used to setup a virtual description.ext via default values? I've got a mission template tool but it currently requires players to have a description.ext to make virtual zeus work properly, i'm thinking I'd be able to just default the values and set it up for them?
@brave jungle it's not a setMissionConfigValue so nope
(unless it is your custom Zeus, but I would need more details about your setup)
This is the function for the template tool
I wanna use the virtual entities as Zeus
and the tool to set everything up properly
however for them to work correctly, you need this in the description.ext:
respawnTemplates[] = {"MenuPosition","Tickets", "Spectator"};
respawnTemplatesVirtual[] = {};
well you need to write the description.ext properly yes
Zeus cannot guess which data you want in your file, just write a proper description.ext
https://community.bistudio.com/wiki/Description.ext , you need an overview pic anyway ;-)
that or edit your Eden options I guess
Well the whole aim of that tool is to not have mission makers use a description.ext π They're alot of them don't know how to xD
Are there not variables I can set that deal with it?
I'm sure those attributes only guide scripts anyway
engine-side scripts like respawns but yeah
respawn templates are not engine side, they are normal functions/scripts.
the whole respawn is 'just" setPlayerRespawnTime 0 and move him somewhere (big simplification)
respawn tempaltes can also be set in mission attributes
so it should be accesible via eden attribute commands
sorry if I misguided you btw; I didn't grasp the full concept
If (count _moveMkrArr > 0) then {
{
_movePoint = [_x,_grp] spawn fn_Move;
} forEach _moveMkrArr;
};
Can anyone explain why _x is undefined in this case?
_moveMkrArr might contain undefined values
That was it. Appreciate it.
how does one create five lists via ctrlCreate to cover 20% width to work with any screen size and scaled font size - whats the best/most simple approach for it?
or how to display text in multiple lines/entries in five columns dynamically best (no interaction - just display)
is there a way to detect if someone is loosing connection? people are using it to abuse shops, etc.
@analog inlet you could try to send a constant ping (pV "dummy") and if its not getting received you disable userinput/lock menus
forgive me, what is pV "dummy"
if the player needs to demine an area of mines, and if i have an array of mines called MissionSpawnedObjectsArray, and i want to do a waitUntil check to see when all the mines have been destroyed/demined, how should i do that? because when you explode/demine a mine, the entry in the array turns to objNull
i had something like this: waitUntil { sleep 10; (count (MissionSpawnedObjectsArray select {_x isEqualTo [objNull]} isEqualTo count MissionSpawnedObjectsArray )) }; but this causes an error and i know it's wrong, but idk what the correct condition would be
never mind i figured it out, waitUntil { sleep 10; {mineActive _x} count MissionSpawnedObjectsArray == 0};
im trying to add a condition to an addaction to only show when looking at a closed door. the action is on the player. im having trouble finding an example online. i have found plenty for adding the action to a door but not on a player. Can someone point me in the right direction?
@plain urchin you should look into triggers instead of waituntil, for performance improvements
@exotic tinsel you want the action to be available to every door in the mission ? basically you take a door example, replace all references to the door with player, then in the condition you check for cursorTarget being a closed door within distance. Should do the trick but will have a performance cost. If only a limited set of doors, you should get every door and repeat a classic example in a loop.
@mighty rain im not sure i understand. please explain further regarding this part of your reply "basically you take a door example"
You wrote you found a lot of example adding the addaction to the door. It is the intended way of using addactions (add action to objects which players shall interact with). If you only want some doors in you mission to have the action available, you addaction to them in a loop (similar to examples you found).
If you want the action to be available to any door for a given player, you can do it opposite way but that's not the intended way of using addactions add will hit the performance
@mighty rain trigger < waitUntil + sleep
My world collapsed. BI has been doing something very wrong then ...
Triggers check every 0.5s (hardcoded) ; with waitUntil + sleep you can check every 10s if you want
triggers also have overhead, because they try to grab all the units in trigger area and such
is there a better way to reveal friendly units on the map out side of view distance that doesn't require changing profile or using reveal command? im using this and its not producing the results i was hoping for.
while {true} do {
{ if (side _x isEqualTo west) then
{
player reveal [vehicle _x, 4];
};
} forEach allUnits;
sleep 0.3;
};
if objectparent statement is not needed
vehicle _x will return just the player if the player is not in a vehicle
idk why you doing _x isKindOf 'man' because allUnits should only return men
while {true} do {
{
if (side _x isEqualTo west) then {
player reveal [vehicle _x, 4];
};
} forEach allUnits;
uiSleep 0.3;
};
it was a copy paste job from a post i found.
also idk why you loop it every 0.3 seconds and instead of creating a new thread, i'd suggest using bis_fnc_loop
it doesnt solve the fact that reveal doesnt produce results im looking for. id like to see the units direction with out the flashing on the map. like when your in front of them and you see them move on the map flawlessly.
Oh, i'd just use the draw EH on the map
And draw the units like you would with a map esp
hey was wondering if anyone would know how to get an object to play a sound when hit by a projectile, having issues figuring out how
@exotic tinsel u could give this a go, i can't test it rn, but it should/might work: https://paste.fini.dev/anak.nginx
@plain current i will test now
@marble basalt if you have the sounds added properly to your mission then i would create an event handler for hit on the object and check if the projectile type is correct for playing sound.
@marble basalt you could give this a go
player addEventHandler ["Dammaged", {
params ["_unit", "_selection", "_damage", "_hitIndex", "_hitPoint", "_shooter", "_projectile"];
if (!isNull _projectile && !isNull _shooter) then {
playSound3D ['roblox\oof.wav', player];
};
}];
@plain current works good. ill tweak it for proper icons. thanks mate.
np mate
didnt seem to work im trying to set up a target that plays the firing drill sound when hit and yes i changed the name of the .wav
@plain current improved, what do you think?
findDisplay 12 displayCtrl 51 ctrlAddEventHandler ["Draw", "
{
private _sideColor = [side _x] call BIS_fnc_sideColor;
private _vehicle = vehicle _x;
if (player knowsAbout _vehicle < 3) then
{
_this select 0 drawIcon [getText (configFile/'CfgVehicles'/typeOf _vehicle/'Icon'), _sideColor, getPosASLVisual _x, 24.0, 24.0, getDirVisual _x, '', 0, 0.04, 'TahomaB', 'right'];
};
} foreach (allUnits select {side _x isEqualTo west});
"];
Hi guys. Does anyone know how the RyanZombies actually attack? I can't get any info wih HandleDamage and Hit Event Handlers, the logs are just empty or filled with data from general shootouts between normal people as in: "HandleDamage: bf2 / head / bf1 / B_65x39_Caseless / 1.20173 / head curent damage is 0 diag health is 100" and "onHit: bf2 / bf1 / 1.01 / bf1"
I bet they set damage directly through player setdamage _n π¦
@exotic tinsel you could move the knowsAbout check into the select, but it doesn't really matter
@plain current so, how would i go about adding same to the gps?
You need to get the display and the control of the gps map
How can I assign new class for a vehicle from Description.ext? If it's possible.
cant
D'oh. Thanks.
@plain current on it. thx
I'm trying to tweak a mod's .sqf file. Done, saved, restarted Arma. But still code is not changed (according to the ingame functions browser that doesn't show my code and diag logs outage). I bet I mess with wrong folder (!Workshop/@Modname) or it needs to be somehow repaked. Any advices on that? Thanks!
Yes you need to pack it back into the pbo if you want to edit the file in the pbo
Hi guys! I've placed a house in the editor. Gave it few empty markers and synced those for a random location... Is there a way to detect nearest road and rotate my house at the same time? So I could place house the way that front door is pointing towards nearest road.
https://community.bistudio.com/wiki/nearRoads @lofty rain
Houston, I got a strange problem.
player addEventListener ["HandleDamage", {0}] - no damage, can shoot myself with a rocket launcher and be healthy.
player addEventListener ["HandleDamage", {(_this select 0) setDamage 0;}] - close shots are tolerated, while 1 shot straight under legs == instakill.
What am I doing / understanding wrong?
@dull drum the returned value is the "full damage" you should get. on the second example you are not overriding the damage system, you are just doing a setDamage when you get shot. the thing is you get damaged then healed, if it's an insta-kill, you're dead
also, addEventHandler* ^^
Sry about that, got a mesup of coding languages in my head
Javascript Hell π
ja-ja
In code it's ok. But, how should I completely remove the damage still having EH available for my simpler Health model magic?
Put my custom logic to another EH? Like literally
player addEventHandler ["HandleDamage", {0}]; player addEventHandler ["HandleDamage", {// mystical stupid coding}]
?
Yeah, it actually did the job done. Still feel awkward about this.
how should I completely remove the damage still having EH available for my simpler Health model magic ```sqf
player addEventHandler ["HandleDamage", {
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
_newDamage = "my simpler health model magic calculation of damage to be taken";
_newDamage
}];
Overrides whatever damage would have been taken, replaces with whatever you want the damage to be from 0 to 1
Bear in mind, that will run for each part of the body that takes damage
Also relevant, as of the last time I toyed with handleDamage, insta-kills are treated as >1 damage to "" hitPart
yeah, I've already passed the shitgate of "", it was so much fun!
_newDamage, you... you just leave it here without any ; or function calls?
It's the return value
Whatever the return value in handleDamage is, will be applied as though it came from the damage source
It should be a number, and not a string, obviously. Having a semicolon or not shouldn't make a difference, but I'm fairly sure that it's just good practice to exclude it from return values
@ruby breach the "no semicolon for a return statement" is incorrect or has been for a long time now, at least Arma 1 if ever
Ahh. Good to know!
Now I can have my semicolon! (while it still works without it though)
ACE/CBA standard is to leave semicolon away, as it's not needed and is used to signify a return value
booo to them
Everyone knows that each simicolon gives you 0.0002ms speed boost, you just make your return slower for nothing!
having issue with the error no unit bug. our server requires players to go back to lobby to change role or squad. what am in doing wrong that allows this to keep happening. is there something i need to do on player disconnect to ensure all is well when they come back?
its breaking all my foreach for lists of players
Hello, trying to get an AI to throw smoek, doesnt work. so far i ve tried:
_ unit forceWeaponFire ["SmokeShellMuzzle","SmokeShellMuzzle"];
[_unit, "SmokeShellMuzzle"] call BIS_fnc_fire;
any suggestions? the AI has a smoke grenade
scratch that, seems like the grenade from bw mod isnt recognized as smoke
Question, I need to add an action to an object to open a door that is locked, meaning that computer needs to be spliced to open the door
Figured I can do the enableSimulation deal for the door so it is no longer locked, then open said door
When was the "B_Patrol_Soldier_Pistol_F" added? it broke the check for the 4-five pistol that was "hgun_Pistol_heavy_01_F"
Lol, like with any of those named classes it just has the preset loadout for that unit. I really doubt it changed any config name of the heavy pistol 1 class.
Its a diferent weapon, currentMuzzle checks that.
Hi guys! How can one avoid being kicked by Steam when debugging a dedicated multiplayer with two test players with the same Steam account?
make sure doubleIdDetected is commented out
There is a localhost only setting/startparameter thing
Can't find it on the parameter wiki page π€
also add
loopback = true;
I'll try all of that, thanks guys!
Is there a way to detect a line break with splitString?
Seems like linbreaks are ignored and leave an empty space.
what "empty space"?
depending on how you log it, linebreaks might simply not be displayed
for example debug console output shows line breaks as spaces
hint it out
?
(to be sure about the linebreak, as opposed to what Dedmen said)
It's a linebreak
You donβt detect with splitString
I guess noone here really understood the question ^^
would \n not work?
If you want to split string on line breaks can try "\r\n"
Or toString [10,13]
Or endl
Gonna try that
Doesn't seem to work.
Just to make sure you get the issue. I am logging classes to the clipboard by _text = _text + tostring [13,10]+ tostring [13,10];
But now, when I want to covert it into an array with splitString ",; " it leaves an space infront of each classname " B_someClassName"
And before you ask, the logging function was not written by me, and I cannot modifiy it.
Why did you not add any if it to splitString?
Are you sure they are spaces in front not line breaks?
I did it wrong the first time.
endl is string
hello, looking for new methods to check arrays.
i have an array with multiple positions that each look kind of like that: ["MarkerAlpha1-5-6",[14300,1300,0],["AT","MG","MG"],8]
i want to check the if a certain position f.e. [14300,1300,0] is in the main array but
_value in _array
doesnt work as it seems to not be able to check in mulit level arrays
and
_array find _value
has the same problem, only compares exact values, not multi level array capable.
Any other way than to do a
{_value in _x select position }foreach _big array
?
ahyes
You add str string?
splitString (",; " + endl)
So it works?
yes
Have some β
It's funny that the default log function in Eden editor will actually break the default attribute controls.
Thanks for you help π
@spark turret findIf
will check it out, thanks dedmen
What is the best convenient way to execute functions to a number of players from server?
I've tried to use array of Variable Names from editor (example works just fine but looks clumsy)
_allPlayers = [bf1, bf2, bf3, bf4, opf1];
{
_x remoteExec ["handleDamageFnc", 0, true];
_x addMPEventHandler ["MPRespawn", {(_this select 0) remoteExec ["handleDamageFnc", 0, true]}];
} forEach _allPlayers;```
Tried playableUnits (doesn't work)
```java
_allPlayers = playableUnits;
Tried BIS_fnc_listPlayers(doesn't work either)
_allPlayers = call BIS_fnc_listPlayers;
Everything was executed from server.
All playable units.
remoteExec can take an array as target
It's likeforEachis not needed?
To reset variables and handlers if unit was killed
you'll get dozens of remoteExec calls which all fire their code globally...
Yeah but why the MP variant?
Don't see any reason
just add a normal eventhandler, locally
Well, I wanted all the crucial logic to run server side. This code controls the damage model, so I didn't want to give it to players.
Probably I just didn't get well with Biki on MPRespawn π
You can have serverside respawn handleres too afaik
with MP eventhandlers you aren't running the logic serverside, you are running the logic everywhere
I need a deeper understanding of the client-server things. I hope it will come in time with all the traps I continue to step into π
Is it possible to override a mod's function with my code if I don't want to change other modders source code?
depends on the mod
the answer is generally "yes"
though with vastly varying difficulty
It's zombies & demons, as far as I want zombies to participate in my damage model
I can see Ryan's functions through the viewer. I did modify the mod's code and it works just fine, but I want to have this part standalone from his .pbo
you can probably overwrite his CfgFunctions entry (if he's using that) and use that to redirect to your pbo
Oh.
if you see his functions in function viewer then as Dedmen said you can overwrite his config and change the path to compile your function instead.
eg. cba does that for some vanilla functions:
https://github.com/CBATeam/CBA_A3/blob/667299c473a1f9f03e9fe2e42b828b1fe091550b/addons/jr/CfgFunctions.hpp#L3
Quick question for you all, I'm having a brain fart - I'm using onPlayerKilled.sqf to check if every player on one side for a PvP scenario is dead. What's the best way to go about doing so?
something like sqf allPlayers select { side _x == blufor && alive _x } isEqualTo []
if it's only PvP though
AI not included in this ^.
It is, I've already discovered there's no way to track AI deaths reliably for a small-scale PvP op
allUnits?
Yeah, but then I need to figure out respawning them, and setting up behaviour... it's a lot of faff.
I assume in this case isEqualTo [] means 'equal to null'?
means equal to empty array
allPlayers is an array, select applies a filter, isEqualTo [] says "is it empty"
Ta
I'm running this on a headless client:
{_x addCuratorEditableObjects [mainAOUnits, true];} forEach allCurators;```
And for some reason the units aren't being added to zeus
@wispy cave Server Only command.
oh yea, crap
So the script I'm writing is a soft reset, which will be called at the end of every round (5 rounds to a game). Is it best to write it as a new script, or a function?
both are ok; if you read a script make sure you load it in memory⦠as a function
How would I do that?
either sqf _fnc = compile preprocessFileLineNumbers "myScript.sqf"; or declaring it in CfgFunctions
CfgFunction can be declared in description.ext, right?
Ah, excellent. Thanks.
https://community.bistudio.com/wiki/isPlayer
Does isPlayer work reliably in multiplayer? Note at the bottoms thrown me off a bit.
not fully reliably as noted, but I would say fairly reliably
Alright, cheers. β€
hey. we are trying to solve what seems like a simple problem. i am using a respawn dialog with custom roles, and these roles are reflected in the arsenal with a save/load for each role.
the problem we are trying to tackle now, is adding the saved roles, to the respawn loadouts list in the respawn dialog. which is also working, the problem is, they are added upon click the actual role, and when click the role a second time, it adds the arsenal loadouts, again, and again.
i have nailed it down to doing a check in
BIS_RscRespawnControls_invMetadata to see if the loadout has already been added..
if !(_nameLoadout in (uiNamespace getVariable ["BIS_RscRespawnControls_invMetadata",[]])) then
{
systemchat str (BIS_fnc_saveInventory_data select _i);
_pic= 'A3\ui_f\data\Map\VehicleIcons\iconParachute_ca.paa';
_metadata = [[_RoleText,format['missionNamespace:%1', _nameLoadout], _pic],[format['missionNamespace:%1', _nameLoadout], _nameLoadout,[missionNamespace,_nameLoadout]]];
["set",_metadata] call BIS_fnc_showRespawnMenuInventoryMetadata;
};
but it doesnt seem to be doing the trick. i do have a short video showing the "problem" im not sure i can post it here though
really basic question, how can i execute a script on every client ? so far ive always used init.sqf and then sorted by if !(isserver) exitwith etc.
remoteexec comes to mind, but dont know if applicable for scripts
initPlayerLocal.sqf?
i need to run in during the mission from a script running only on the server.
Yes, remoteExec with the target being -2
and how would the remoteExec lΓΆook?
_unit execVM "IRON\Script.sqf";
//will become
[_unit, "IRON\script.sqf] remoteexec ["execVM", -2]
?
[_unit, "IRON\script.sqf"] remoteExec ["execVM", -2];
Only missed a ". Should work other than that.
okay thanks will test
but i have to say, that looks to easy to work as intended π
π€
The Deleted event isn't supposed to fire when a unit gets inside a vehicle right?
unfortunately, it does @torpid grail
There doesn't seem to be a ticket for that yet, at least not one that I could find
And I can reproduce it reliably with the code I have right now. With the event handler added to me on the server and a HC, every time I enter the vehicle the deleted event fires
It also seems to trigger for AI, I just haven't checked if they are owned by the server or the HC
With this you can reproduce it:
{
_x addEventHandler ["Deleted", {
params ["_entity"];
(format ["Entity deleted: %1", _entity]) remoteExec ["systemChat", 0];
}
];
} forEach (allUnits + vehicles);
Steps:
- Spawn in a dedicated server and run that on the server.
- Spawn a car or whatever and get in it.
- You'll see the message saying you were deleted appear after you get in the car.
I also had that with spawning units via zeus. They would spawn->ire delete EH->stay in world.
Really caused trouble in ace, we ended up just waiting a frame and checking if it's really gone now
what would be the best function to get static objects/houses in a marker? i have use:
_houses = nearestObjects[getMarkerPos "marker_0",["House"],100];
but that uses a radius, i wanna use inAreaArray f.e.
vehicles inAreaArray "mymarker" select {_x isKindOf "StaticWeapon"} ```
problem: i cant seem to find a function returning objects, like the
```sqf
vehicles allUnits```
etc functions but for static objects
Hey can anyone help me I made a vehicle and I can get out of the vehicle but can't get in?
might wanna check config editing ?
ok
Running a mod on a server for the first time this appears:
Item str_coopr_task_recon_title listed twice
is this something to take care of? It's the stringtable.xml loaded twice by client and server right?
ah ok thanks
is there any way to see if an object is in sunlight or shade?
nope, beside calculating shadow of other objects around with sun position but that would be hell of a pain
is there a way to get the sun's position with a script?
I thought there was, but it seems not.
i was just thinking about making a little script for solar panels
but i guess there's no way to do it easily
or maybe even do it at all
You could see how much sun there is in general: https://community.bistudio.com/wiki/sunOrMoon
And perhaps there are some functions to get the forecast, and make a calculation yourself
@torpid grail @still forum @winter rose noted thanks
^ this command is only for sun to moon transition, 8am or 5pm will be 1 @exotic flax
Well, at least you'll know it's not night π€£
And functions like overcast can be used to make a decent script
I don't know why, but I was convinced a command to get the current astral object (sun or moon) position was added back in A1 π€
@winter rose you are right, although it was in OFP
https://community.bistudio.com/wiki/Operation_Flashpoint:_FAQ:_Mission_Editing#Formulas_used_in_OFP_for_tide_levels_and_sun_and_moon_positions.
Perhaps a nice project to pickup and build in ArmA3 (if it doesn't already exist somewhere hidden in the code)
maybe something for @still forum to introduce ^^
I believe there was a script published which does exactly that. Did you google that?
that link contains the script π which is in C++
Im trying to create a vehicle spawner area, how can I check if the place is clear of objects and players before allow to spawn a vehicle?
w have sunOrMoon which once returned their position, but was recently changed to just flip between 0 and 1 -.-
Before that it returned 1 at noon and then gradually reduced -.-
How would I pass a selected object on to the rest of a function?
For context, letβs say I have an array of objects: _stuff = [t1, t2, t3];
Which is followed by: _stuff spawn fn_delete;
Current fn_delete:
{
If ((count _this > 1)) then
{
deleteVehicle (_this deleteAt floor random count _this);
uiSleep 5;
_this spawn fn_delete;
};};```
My goal instead of just randomly deleteVehicleβing the object, Iβd like it to first select one of the objects (figured BIS_fnc_selectRandom or something like it in the function), pass the selection on to then attachTo an arrow to that object, and finally after a delay delete both object and arrow. Then repeat the process until 1 is left.
_vehicle = selectRandom _this
then createSimpleObject or createVehicle the arrow, attach it, sleep, delete, next.
How can I add to links to a structured text control ? Can either be <a href='https://community.bistudio.com/wiki/BIS_fnc_textTiles'>BIS_fnc_textTiles</a>, or <a href'https://community.bistudio.com/wiki/BIS_fnc_textTiles'>BIS_fnc_EXP_camp_SITREP</a>. Doesn't seem to work. The first link is showing fine, the second not.
the second one is clearly missing the = after the href
and also the link doesn't point to what the name says
π€¦ Need a coffee. Thanks
Thanks, @still forum! I think I got it working, however a question extension to your solution. Does selectRandom exclude deleted objects of an array? Or how would I selectRandom from only remaining objects?
selectRandom selects a random object of the array
if there are deleted vehicles in there will be objNull in there, which selectRandom will also select
you need to remove the object from the array too
Okay, that makes sense. Iβll have to devise a solution for that later. Appreciate the knowledge passing.
If I set the owner of an unit created by a zeus to a headless client will this HC then do all the calculations for this unit?
yes
tnx
groupOwner or just owner?
By _obj setOwner (owner HC1) in an CuratorObjectPlaced EH
check your rpt it should complain about not using setgroupowner
I haven't done it yet so it's not going to yet π
calculations are done where unit is local. Unit is local on it's "owner"
How does one open the debug console in Eden Editor with CBA? as the key got changed
ah, Ctrl+D.
It is not `?
not with CBA
Do you already know how to make GUI without pixel grid system?
This should be useful then https://community.bistudio.com/wiki/Arma_3_Pixel_Grid_System
It is $15 + the cost of new game
Earlier or later BE will catch with exploit, then ban wave then new exploit etc etc
Hey, I am currently trying to create an Arma faction as a mod. So basically just readjusting loadouts. I am not that used to scripting though and I am not sure were to put the CfgPatches and the Full Faction script I extracted from the Orbat creator. Could anyone help me out`
config stuff is #arma3_config
Good point. Livonia will be another one
who knows
@rancid pecan your question makes no sense. Try again.
whats was the way to turn a variable name into a string again? this format call compile hackery?
Question: why bother make a function for a script if you can just writhe the hole thing in one file and call/spawn it since functions have some extras steps like define it and make .hpp files.
@velvet merlin variable name is string, you have to be more specific what you wanna do
want to i++ a GV
Because A. You donβt have to compile it every time you wanna call it B. Function variable is final and cannot be overwritten C. It is available everywhere and everywhen
missionNamespace setVariable [str _index,_index];
Which namespace it belongs to?
this obviously doesnt work - a function should dynamically count up a GV passed to it
compile it every time?
Why it doesnβt work? Looks legit variable 10 will be 10
Yes, you cannot call or spawn text file you can call or spawn code therefore you need to compile the text @astral tendon
yeah there's absolutely no advantage to using execVm etc, except if you just want to run something once and never again
inwhich case it's 'easier' for you to setup
Like
sayHi = {systemchat "hi"};
call sayHi;
To make something like this as a function is time consuming, so why just not use that?
This is not what you asked, there is no file here, you define function in code. You still have 2 problems, security and availability
Lets say if I drop that at initplayer.sqf and make a action to use the call sayHi, why should I worrie about security and availability since is intended to local players?
Because someone can just pubvar malicious code and overwrite your unprotected variable and when you use your action someone elseβs code will run
How they can even do that? and what if I need to change that variable later in mission?
I told you how, pubvar new value for this variable. You might not even be able to change it later if they finalise it, which I am more than sure they would
What about performance?
What about it?
Is it better make it a function or just as a simple scriptΒ°
function
I donβt know what simple script is, function could also be simple script. If you are planning to use own file and compile it every time you call it like you said originally, with script caching now removed probably for good you will be adding extra times to your execution.
I'd avoid execVM except for quick testing.
Functions added via function library have small overhead added by default, which you can opt out of when you define them in config
simple script is make it all in one file while function requires a extra step, I need to define in description.ext, make a .hpp file, then make a file for that script.
Functions are for when you want reusable code, hence it makes sense to invest in building own library of subroutines. You probably donβt even need a function by the looks of it
why not just call it normally as I already defined the variable with the code in it?
how can one wreck init_functions with cfgFunctions definitions?
Error in expression <",_x] call bis_fnc_logFormat;
_function = [] call (uinamespace getvariable _x);
>
Error position: <= [] call (uinamespace getvariable _x);
Error Generic error in expression
File A3\functions_f\initFunctions.sqf, line 499```
Why even bother defining variable if you can just call code directly
Lets say its a pack with allot of codes in it?
If it's alot of code, split it into different functions and use the functions library. Makes finding errors much easier later on.
But honestly, without an example what "alot of code" is to you, it's kinda hard to judge
You can call a lot of code directly
Thats the thing, im used to make codes in single file instead of make functions of it since it requires extra steps for the same result.
Anyway I gave you all the good reasons for using function library already. Take it or leave it I couldnβt careless
Sure, thanks for the help.
@velvet merlin preinit?
i am using preStart and preInit (was necessary to get it working in the main menu)
for some reason its breaking though if i am changing some things - cant tell the relation yet
Have you altered initFunctions in any way?
Why result of calling a function is assigned to _function?
Is this a vanilla code? Looks suspect
I suggest you use headerType -1 only for functions you need to call each frame, otherwise you remove useful debug information
Why not add all those functions to library they will be defined even before preinit
the functions werent the prob, but to execute something to run in the main menu
@velvet merlin there is no way to get the variable name from a variable. Because a variable value might have tens of thousands of different names, the magical game engine that reads your mind doesn't know what to choose.
At the point where a variable enters a script command, the command doesn't know the variable name, which is why you need to pass a string to params and such.
And you cannot pass a variable to a script even. You pass it's VALUE, but not the variable itself
ty
Kerc also suggested to pass as string and then use getVar on missionNamespace
wasnt quite sure as someone recently said in sqf land all is by reference in some sense
yep it is
and yeah passing as string is the correct way
You could do it if we had a "increment" script command, but I already talked about the terrible outcome that would cause.. would essentially break everything
there is no way to get the variable name from a variable.
Thought kju asked how to turn variable name into string
yeah I assume he meant how to turn varName into "varName" which you can't really
maybe that would be a useful script command for some π€ though... No.. you write the name down in the script manually anyway π€
Might be useful for people who don't know that quotation marks exist
variableVarName
Though I dont see any use for it
bad design requires weird commands
It's just so that people who can't think beyond 2 corners can type variableVarName myVar instead of "myVar"
Just like the people who write call compile "myVar" instead of getVariable
My favourite is if (true) exitWith {} at the end of the script
this shold be a command
nowLetsWasteSomeShit
optional number param to define how many iterations you want
nowLetsWasteSomeShit 10;
scriptOptimizer 10;
error
thanks
This code is giving an zero division error in _forCount mod _stepOpenBRPVP_createWallAround = { _angleStep = 360/_wallCount; _stepOpen = _wallCount/2; _forCount = 0; _ignore = 0; for "_a" from 0 to (360+_angleStep/2) step _angleStep do { if !(**_forCount mod _stepOpen** < _opensSize) then { (...)this means _stepOpen is zero... and if _stepOpen is zero then _wallCount in _stepOpen = _wallCount/2; should be zero. And if _wallCount is zero the line _angleStep = 360/_wallCount;must have give the error first, but it did not.
@still forum above, the line _angleStep = 360/_wallCount; is not suposed to give an error?
"this means" "and if" "then" "and maybe" "or this"
Add logging. And CHECK.
@still forum the problem is the error happens one time a week.
no problem
i will add logs and wait
the code is more complex
i just simplified it
and when the problem happens, log increase and eat all HD
but it did not
how do you know?
Do you have rpt?
@tough abyss yes i have the RPT
this is the error:
if !(_forCount mod _stepOpen < _opensSize) then {
_posP>
0:00:49 Error position: <mod _stepOpen < _opensSize) then {
_posP>
0:00:49 Error Zero divisor
0:00:49 File mpmissions\__cur_mp.altis\server_code\servidor_funcoes.sqf, line 294
and before that?
i have just this error
repeated over and over
until the rpt reachs 22 GB and crash the server
it must have errored before it started repeating
and obviously it will repeat over and over if step is 0
it is infinite loop
yes
then look at the very top of the file
where it first happened
i got the first error
how do you make step infinite?
Were are the saves for the GUI editor?
_angleStep is 360/_wallCount; it can't be zero.
I don't know the name I saved for some
@tough abyss make all values in this functions visible for you. Add _wallCount, _angleStep, _stepOpen and so on in RPT by diag_log command. So you can see what value is wrong and broke your script
@lost copper @tough abyss thanks. I will add logs and wait for the error again.
It not happens allways.
That's a normal. Sometimes one of your value is out of range.
_angleStep is 360/_wallCount; it can't be zero.
It can and it is
What is a possible value of _wallCount to make _angleStep zero?
0
This should give an error then, and there is no error related to that.
I am pretty sure there is error you just cant see it
_var = 360/0 makes _var equal to 0?
nope, it throws an error @tough abyss
so....
only if you have -ShowScriptErrors flag of course
Dang!
error + zero yes
More like a warning then ; unless it stops the script afterwardsβ¦
If I wanted to create a camera which people can place, and then use to look around with (kinda like Valkyrie camera from R6 Siege), would I be best using camSetDir with bound keys, or is there a nicer way to do it?
camCommand "on" maybe @cold pebble
manual on you thinking?
it would allow it to be moved around with WASD though; think about it too (like loop-placing it maybe)
else I don't like maths enough to tell you how to play with camPrepareDir/camPrepareBank etc.
hmm, i'm just wanting it to be able to turn with WASD, rather then move
or
turn with mouse would make more sense lol
this ^ would happen yes
Looking at the note on the page
_camera = "CamCurator" camCreate [0,0,0];
_camera camCommand "maxPitch 89";
_camera camCommand "minPitch -89";
_camera camCommand "speedDefault 0.1";
_camera camCommand "speedMax 2";
_camera camCommand "ceilingHeight 5000";
_camera camCommand "atl off";
_camera camCommand "surfaceSpeed off";
If you loop-place it it's a "not clean" yet valid solution
Maybe I can use this, but make speedDefault and speedMax 0?
Let me know the outcome plz!
Cheers for direction to camCommand, would've probably missed it
Changing speed values to 0 stopped it from moving, but no rotation currently, trying to sort that
Was using
private _camera = "CamCurator" camCreate ((getPosATL player) vectorAdd [0,0,5]);
_camera cameraEffect ["internal","back"];
_camera camCommand "maxPitch 89";
_camera camCommand "minPitch -89";
_camera camCommand "speedDefault 0";
_camera camCommand "speedMax 0";
private _camera = "CamCurator" camCreate ((getPosATL player) vectorAdd [0,0,10]);
_camera cameraEffect ["internal","back"];
_camera camCommand "speedDefault 0";
_camera camCommand "speedMax 0";
This produces what I want @winter rose
what happens if a checked value returns true in two cases of a switch structure?
@spice axle only the first encountered one is used
Thatβs the wizardry I was worried about Lou π
Β―_(γ)_/Β―
Hi Bob!
why is createSimpleObject giving me error about 3 elements provided since wiki cleary says that I can put 3?
need an expert opinion on locally created particales. Im using a heavily modified version of goon dust script which creates a dust cloud ring locally on every client 800m radius around each player, restricting their view on distant stuff. i modified it to create 3 rings in 400,800 and 1200 m so if you re on a mountain cant look above the edge of your ring. Problem is, if you zoom in with right click or scopes the alpha of the particle seems to be 90% ignored. Any way to fix that (besides diable zooming)? kinda pointless to have a sandstorm you can zoom through. Pictures for comparison:
is there a better way for a 50/50 random then
switch (floor random 1) do {
case (0): {
//code
};
case (1): {
//code
};
};
String = str ["stuff",1];
String; //returns "[""stuff"",1]"
why is "stuff" doubled stringed?
@astral tendon to escape the quotes
if you hint it, it will display just fine
@spice axle sqf if (selectRandom [true, false]) then // or if (random 100 > 50) then // or if ([true, false] select random 1]) then
Im trying to use select and the double string keeps
@astral tendon show usage plz
why is "stuff" doubled stringed?
because that is how str of a string works. String in a string have to be double quoted
Lou thanks
{
_displayName = getText (configFile >> "CfgVehicles" >> _x >> "displayName");
_vehicleClass = _x;
_price = (((_VehiclePrices select {(_x select 0) == _vehicleClass}) select 0) select 1);
_priceTXT = str (((_VehiclePrices select {(_x select 0) == _vehicleClass}) select 0) select 1);
_indexLB = _VehicleSelectionMenu lbAdd (_displayName+" ("+_priceTXT)+")";
_data = str ([_vehicleClass,_price]);
_VehicleSelectionMenu lbSetData [_indexLB, _data];
} foreach _VehicleList;
RTG_vehicleBuy_VehicleSelected = ((lbData [1500, (lbCurSel 1500)]) select 0);
RTG_vehicleBuy_VehicleSelected ; //will retrun ""LIB_UK_Willys_MB_M1919""
Any ideas?
Yes and I need that string.
This code run on clients and may be not logical in some aspect, but it represent the problem i'm havingsqf player addEventHandler ["Respawn",{ params ["_unit","_corpse"]; _unit spawn { [_this,true] remoteExecCall ["hideObjectGlobal",2]; }; }];when the player respawn, i hide the new player object (_unit), but sometimes the old player object, the corpse (_corpse) also get hidden. This is a strange behavior. Any way to fix that?
May be the server still don't have the corpse object when the hideObjectGlobal arrives on it so when it creates the corpse it is from a hidden _unit?
since u already have a spawn in there, just uisleep a second or so and see if that fixes it
whats the most simple way to show some information persistent in the main interface these days?
are there some functions from BI, or do you have to ctrlCreate it yourself?
@astral tendon lbData returns a string, you are doing select 0 on a string. It looks like you're thinking it will be an array but it isn't.
parseSimpleArray will turn it into an array
@velvet merlin what do you mean show some information persistent in the main interface?
think of user action menu duplication that doesnt disappear
seems ctrlSetPosition needs safezone or pixel grid system, right?
ctrlSetPosition needs an array with numbers, whether or not it's a pixel precise position or a safezone depends on the situation.
what situation?
Pixel precision makes only sense if you want multiple controls to be aligned perfectly. Like in Eden editor.
On the other hand, safezone should always be used to guarantee that the control doesn't leave the screen space.
You are talking about the main menu right? I believe that uses GUI_GRID macros.
so far i used the A2 style safezone with percentage design, and getResolution to scale the texts
Which should be fine in most cases.
but ive done my dialogs statically and not scripted (for the most part)
for ease of creation, ie some test/demo missions, i am looking into ctrlCreate and fully scripting them, but seems not convenient to work with
so probably gonna use advanced hints and FM instead
I also usually don't script my dialogs, too.
Just use the gui editor
I very rarely touch the safezones/grid positions in the .hpp files, no point, just use the gui editor
When wo rking with safezones only, it's quite nice, that's true.
I use "static"/"hpp" dialogs instead of ctrlCreate, cuz of security. I've dabbed ctrlCreate into cfgDisabledCommands and scripts.txt filters, stops some hack menus
Also stops most people from putting porn on streamers' screens
You are running you servers without BattlEye? Putting porn will require remote execution, if they can do that you are already screwed
@tough abyss well yes but actually no
@tough abyss you just need to run infi "anti-hack"
Lmao π good luck with that my naive friend, and please donβt tag me with every reply
@tough abyss Sure, stay in ur bubble, and DO NOT have a look at infi's allowedHTMLLoadURIs or your little bubble might burst XD!
Thatβs a server option. Now I have to block you, congrats
Oh no!
@tough abyss @plain current be nice to each others
anyway this is not a server admin channel (#server_admins is)
and I am not sure but infistar may not need BE to be disabled, so why not use both.
On this, back to scripting!
@winter rose you can run infi and battleye, it's just infi writes scripts/confs that are slightly sloppy and allow you to remote exec and dab any images on every players screens. Sserver/scripting security related topics supposed to be on #server_admins ?
infi and BE conversations sure go there.
regarding CfgDisabledCommands it is related to here, even if technically it would be #arma3_config (but hey, #arma3_scripting or #arma3_scenario is good enough)
10-4 on that, a server/mp security channel would be useful
Make no mistake though, I am not a moderator. Just a long-time user of this Discord, who wishes everything goes well
Is there a way to add structured text to a control button via scripting so it opens a website?
_ctrlBiki ctrlSetStructuredText parseText format ["<a href='https://community.bistudio.com/wiki/%1'>Show on Biki</a>",_fncName]; Is what I tried.
The text is set, but nothing happens when I click the button. It works with a structured text control though.
is there a way to get what exactly an AI knows about an enemy unit besides the abstract "knowsAbout" value?
using targetsquery atm but that tends to be performance heavy and a bit wierd sometimes.
any function like "_unit knowsAboutInformation _target" //returns [nameoftarget, assumedPos, weapons, side, vector, danger]?
Hi guys, is there any way to check if the Curator interface is on? Something like a specific display number or something?
Is there a way to check if a player has the action menu open? not afraid of hacky solutions
what's a good way to "wait until OBJ is fully initialized"
as per warning on https://community.bistudio.com/wiki/setObjectTextureGlobal
@plain current thanks for the idea.
@ornate sky i'm not sure but you could just sleep a second or try something like waitUntil {netId _object != '0:0'} or waitUntil {!isNull objectFromNetId (netId _object)}
I haven't tested those and I don't know if they work, but i'd assume a netid gets assigned after the object is available on the network? no clue tbh
I don't know is there's a isInit or something
doesn't look like there is
So far I was using the if isServer then setobjecttexture
remoteExec on every machine
So I'm looking for a more elegant way
Of using loose mission specific textures
create the vehicle on the server and setobjecttextureglobal on the server?
are you using the init eventhandler?
no no
it specifically says on wiki
setobjecttextureglobal might fail if ran from the init eh
If setObjectTextureGlobal is executed from init of a vehicle, it may be too soon and fail to broadcast to other vehicle instances on network and become JIP compatible. The workaround is to delay setting the texture until after the vehicle is fully initialised
@ornate sky do it on the next frame
Yes, that's the reason for my asking how to wait for full init
what it says on the wiki is you need to only worry about it if your callingsetObjectTextureGlobal from the init eh
@tough abyss what can I use for that? Preferably in init field
Yea @plain current i thought you were refering to something else
Spawn
I'll give it a try
How many objects are you looking to do this on and what are those objects?
So far I've been using remoteExec of local command
I have groups of units that need to use my custom texture that's in the mission folder
Packing into a mod is not an option, they need to be throw away
I already have it working, I'm just trying to see if I can use setObjectTextureGlobal in init for this
Instead of remoteExec of setobjecttexture
sure, just put the setObjectTextureGlobal into a function and spawn it or something, tho i've never had an issue with setObjectTextureGlobal in init tbh and i've got 117 of those in my mission
I already have it working, I'm just trying to see if I can use setObjectTextureGlobal in init for this
yes you can just use setObjectTexture then you dont have to worry about that note on WIKI
I know, just looking for a nicer, shorter script
Thanks for the help, I'll try spawn
Spawn seems to be the way to go on a dedi server
I've got 117 of these in my mission.sqm and i've never had issues with +100 players on a JIP mission
class CustomAttributes
{
class Attribute0
{
property="ObjectTextureCustom0";
expression="_this setObjectTextureGlobal [0,_value]";
class Value
{
class data
{
class type
{
type[]=
{
"STRING"
};
};
value="Core\sign.paa";
};
};
};
};
idk what the wiki is on about but i've never personally had a problem on any servers
Hmm, I had
Could be because you're loading the texture from the mission? Mine is in a mod
Probably
You could just do _this spawn {_this setObjectTextureGlobal [0,'sometexture.paa']}; and the scheduler should execute it on the next frame
This might do redundant commands because init happens on every machine
If I understand correctly
Anyway, I think I got it covered now
Has anyone made an 3den attribute listbox that populates from an allmissionobjects select method?
I have an event handler that is added to a vehicle. That EH is fired when the vehicle is damaged, and a function is called when the vehicle's damage is 1. Once the function is called the EH should be destroyed to prevent it being repeated. The problem is, the function is called 15 times.
_vehicle = vehicle player;
RR_airCombatEHIndex = (vehicle player) addEventHandler ["Dammaged", {
if (!((_this select 2) < 1)) then {
[_vehicle] call RR_fnc_airCombatVehicleReturn;
_vehicle removeEventHandler ["Dammaged",RR_airCombatEHIndex];
};
}];
So the issue is with the removeEventHandler command, however I can't figure out why
Likely the result of the EVH firing multiple times for multiple hitParts (my first guess anyway)
I'm crashing a jet into the ground
_vehicle being the jet
Fixed it
I declared _vehicle inside the scope as (_this select 0), which is the unit, and it seemed to work
(vehicle player) addEventHandler ["Dammaged", {
params ["_unit", "_selection", "_damage", "_hitIndex", "_hitPoint", "_shooter", "_projectile"];
diag_log format["Unit: %1 - Selection: %2 - HitIndex: %3 - HitPoint: %4 - Damage: %5",_unit,_selection,_hitIndex,_hitPoint,_damage];
[_unit] call RR_fnc_airCombatVehicleReturn;
_unit removeEventHandler ["Dammaged",RR_airCombatEHIndex];
};
}];``` try that and see what it logs. Also doubt that your `_vehicle` variable exists in the scope of the EH
cheers for the help anyway
also what kind of function are you calling? "RR_fnc_airCombatVehicleReturn"?
@eager mesa are you aware that EH need to be added to every client locally otherwise they wont fire?
it's added to a vehicle when they enter a trigger
the function is then called on the player, does various checks before remoteExecing another function on a headless client
May i ask why so many people are running headless clients?
to free some server resources? that's what they are for
@slim oyster Has anyone made an 3den attribute listbox that populates from an allmissionobjects select method? What's the issue?
I have a question, if I were to have a vehicle spawn on a helipad, how would I go about doing so? I've tried getPos "VARIABLENAMEOFTHEHELIPAD"; but that didn't work
Is the helipad an editor placed object or map object?
Try it without quotes " "
Did, didn't seem to work much either
Are you trying that inside Eden Editor?
No, the helipad has the variable name "helipad", everything else is in the SQF file
That didn't answer my question. Are you executing that script during preview or from within Eden interface?
Because variable names do not exist in Eden Editor
Multiplayer previeww
It tells me it's expecting an object
so
unsafeCVL=0;also seems to block creation of "#lightpoint" objects?
It has not been removed???
@gloomy basalt It does. Seems you variable name is incorrect.
Yeah, I fixed that, now the getpos works. But when I try to createVehicle on that position, it doesn't show. No errors
How are you creating vehicle
π
Never seen anyone use ββ for placement
Weird it fails silently
special: String - "NONE", "FLY", "FORM", "CAN_COLLIDE". "CAN_COLLIDE" creates the vehicle exactly where asked, not checking if others objects can cross its 3D model.
There is no " " in there π
createVehicle ["B_Heli_Transport_01_F", _position, [], 0, "NONE"];
This does't spawn it either
It is still a placement param and since it looks like you seen wiki you should know what are acceptable values and not just put anything you want there
Then your position is invalid or not where you think it is. The only way to find out is check what create vehicle returns
"B_Heli_Transport_01_F" createVehicle _position
that's faster anyway.
if " " is used as placement parameter it seems to automatically revert back to CAN_COLLIDE
The whole parameter is actually optional as it seems.
It is enum and there should be enum error if value does not exist, however the command is ancient so anything could happen
I thought so too, expected the same behaviour as with unit disableAI "TEST"
Maybe worth a report?
I need to have a look first, if some default value is assigned then it is a different story and has to be documented so you can make a note on wiki channel so I donβt forget to check it tomo
I already checked it and updated the description π
Ok
Q: I would like to place multiple objects at the same height, but at uneven terrain.
Currently I use something like this:
_tempHeight = _aslHeight - 8.5; // modify height
_newPos = ASLToATL [(_markerPos select 0), (_markerPos select 1), _tempHeight ]; // create new position with updated height, and place back to ATL (relative to terrain)
However sometimes the height is not the same, and/or the position (x,y) has a small offset.
Is there something I'm doing wrong, or is there some engine quirck I'm not taking in account?
Well your _height is undefined so no idea how this even works
that was a typo in the example (since my script is a bit too long to post here)
but edited the example
@exotic flax all the same ASL altitude regardless of the terrain or all the same above the ground?
the same ASL altitude
I'm placing runway navigation lights (Land_NavigLight), which should all be placed at the same level (regardless of terrain)
get one ASL altitude (getTerrainHeightASL _markerPos),- 8.5, setPosASL objects, profit?
no need to go back to ATL
Using setPosASL seems to fix the height issue, but it still has x,y offsets at certain locations. However this seems to be a different issue, and related to getPos (with [distance, heading] to get new relative position)
@exotic flax if it's a runway, it is possibly oriented N or E so you could maybe simply edit x/y.
If not, you can set the direction of some object and use getRelPos on it
Well, the runway I'm currently testing it on has a weird direction (Z = 39.936), and has some small hills on one side of the runway.
I also use some code to calculate the position of each object, which is all relative to the center of the initial marker and it's direction.
This marker is placed over the runway (until I manage to get a better method to get the location, size and direction of a runway).
I guess I'll have to figure out a way to "quickly" calculate the relative position without using getPos/getRelPos, because those seem to return some unwanted results when the height is changing.
because getPos/getRelPos work perfectly when both the current and new position have an equal Z value, but seem to create an offset on the X and Y axis when Z changes
I'm trying to attach a dead body to a living player, but the dead body don't get attached. This is normal behaviour?
I found the solution, i just run this code before: _body setPosASL getPosASL _body;
And then attach works.
Hi guys. Is it a good way of knowing the id or name of the object that was just spawned by Curator or selected (mouse click) by Curator?
Oh, wow! Thanks, I never had an idea to look into handlers
createsimpleobject its broken?
y do that : createSimpleObject ["a3\misc_f\helpers\sign_arrow_large_f.p3d", _x,true]; And say that it expect 2 elements and i provide 3
What version of Arma you have?
last?
What number?
hint str productVersion
["Arma 3","Arma3",192,145639,"Stable",true,"Windows","x86"]
1.92 but 3 rd param is available since 1.95
i have the last version on steam
thanks
i can't create a localobejct with can_collide
1.95 is the development build. You can't access it via steam. Only through game updater.
Didn't know that, is that new?
No
lmao

I am sure that wasn't possible during alpha, and I've never checked that again afterwards π
it was possible since I can remember
hi i created nuw gui (player menu design) with arma 3 gui editΓΆr bu i have a problem
my screen size 1920x1080 but different players screen 1280x720 1160x513 etc. etc.
my problem player menu Under 1920 pixels appearance is distorted
i have worked with "safezone"
how can i check where its this error ? No entry 'bin\config.bin/CfgVehicles/Default.scope'
can't
perfect, just removing addons and check where its it right?
disable mods/pbo's one by one, till it goes away
Its a config that has a class default inside cfgVehicles.
So the editor is like a fully working development tool? Doesn't that mean someone could actually remake all the DLC missions and send it to steam workshop for others to play for free?
What do you mean for free? It will still be subject to owning DLC
not if you rebuild everything
oh well
besides the DLC missions which require DLC terrains
You can't make your own terrain?
you can just not in Eden
and if you make one with terrain editor you will need to distribute it as a mod for others to download first before they can use it
what text function did the vanilla campaign (East Wind) use? Is it BIS_fnc_typeText2?
depbo it and see
I like BIS_fnc_typeText2, but I'm not sure how to make it resolution friendly
I can set text offset, but it only works on 1920x1080
it's messed up if someone uses a 4:3 res
which is rare I guess
Well if you'd make custom models like the jets or tanks, you'd have to do the same @tough abyss
So no difference overall
What is the function for the "Edit vehicle appearance" in the editor?
BIS_fnc_garage
its a diferent screen
https://community.bistudio.com/wiki/BIS_fnc_garage . Larrow has provided var names for centering, if that's what you're missing.
I meam, I just want the modification screen from the editor, not the garage
it's the same exact thing
Yo, Can someone teach me how priority works in https://community.bistudio.com/wiki/Post_process_effects because my effects don't show up.
_hndlWet = ppEffectCreate ["WetDistortion", 400];
_hndlWet ppEffectAdjust [1, 0, 1, 4.10, 3.70, 2.50, 1.85, 0.0054, 0.0041, 0.05, 0.0070, 1, 1, 1, 1];
_hndlClrCorr = ppEffectCreate ["ColorCorrections", 1500];
_hndlClrCorr ppEffectAdjust [0.1,1,0,[0, 0, 0, 0],[1, 1, 1, 0],[0.299, 0.587, 0.114, 0],[-1, -1, 0, 0, 0, 0, 0]];
[_hndlWet, _hndlClrCorr] ppEffectEnable false;
[_hndlWet, _hndlClrCorr] ppEffectCommit 0;
[_hndlWet, _hndlClrCorr] ppEffectEnable true;
[_hndlWet, _hndlClrCorr] ppEffectCommit 0;```
It is the same exact thing, the only thing you're missing is using the vehicle as the target. No idea how that works, but it's literally the same exact thing.
That looks like a totaly diferent function.
Its a mode then?
Maybe, look at the biki link.
Yup well it's not for me ...
I execute them in a function would that impact em ?
Doubt it, unless your function doesn't exist
maybe the rscLayer of https://community.bistudio.com/wiki/BIS_fnc_dynamicText could be fucking em up ?
I just executed it locally in the debug console
I actually have this
[_hndlWet, _hndlClrCorr] ppEffectEnable true;
[_hndlWet, _hndlClrCorr] ppEffectCommit 0;
private _size = 1.5 * (getResolution select 5);
[format["<t color='#800000' font='PuristaBold' shadow='2' size = '%1'>Bug exploit will get you banned</t>",_size],-1,0.885 * safezoneH + safezoneY,9999,0,0,3001] spawn BIS_fnc_dynamicText;```
That's your entire script?
no
issue:
Text is displayed
but not the effects
_bool = _bool or (_int == 0); π€
Actually, that may work without throwing an error. Just looks...... weird.
{ }
so it's a quick fix
@high marsh ?
I mean everything is working and supposed to work
but for some reason, by postprocess effects don't display
Could it be because they are not seen by the onEachFrame ?
would I need to add them as arguments of a stacked EH
i'll try that
Ahh, I was overthinking it. Simple: Private variables defined outside of onEachFrame scope are not inherited: