#arma3_scripting
1 messages ยท Page 265 of 1
deep down
that is the difference
I also misread what Akryl wrote
It makes no sense to me now
(or up, rather ๐ )
semantics
Hahaha
It just works, and not real impact
'''
[] spawn {
while {true} do {
if(eventHandlerVariable) then {
[] call fancy_function;
eventHandlerVariable = false;
};
sleep 0.3;
};
};
'''
Shit
it's the key left of 1 ^^
but it would be much better if you don't poll "eventHandlerVariable"
but instead call the event handler directly in the place where you change "eventHandlerVariable"
also you don't make listenable events by just calling one function
there is no point
it's just a polling loop
exactly what should be avoided by using events
if you really need polling
for something very deep down
or up or whatevr
then you make it a listenable event
so many functions can be called by the one event
so you don't need multiple loops that check essentially the same thing
I think what @icy raft is aiming for is a scheduled event "system", maybe?
or whoever asked the initial question
true
I used that concept to create a few easy-to-use screen effects that get stacked, so each time for example you open a GUI, it add an "showBlur = true", each one gets stack, and when you close that GUI, the counter goes --. If counter > 0, keep blur, otherwise remove blur
engineer in progress
so actual engineer? Not with computers
computer engineer
ok
Why's that?
I was just wondering if I chose the wrong profession
I'm getting same math and physics as other engineering degrees...Typically people misunderstand...
I might be wrong but I feel a pissing contest coming ๐ฆ
Nah, it's always the same, until someone tries to go to comp. engineering and see it's not that easy hahaha
It's not about easy or hard
Probably harder to become a comp engineer
But still
I hate you hackers
pfff
I get to study all the engineering design process... It's a hassle, but it's necesary
What we did to you? We are nice people ๐
@little eagle define hackers ^^
Yeah, also there's that
Comp-sci is easier than you think
Basis of all algorithms is discrete logic and some more advanced math.
comp-sci != comp-engi ๐
Applied Computer science or applied physics
@halcyon crypt tru fakt
yay, I can google ๐
Hate the random positions function
for "i" from 0 to 99 do {//randomly probe locations till found//};
BIS_fnc_findSafePos?
well, it does have to test for the filters given
Yeah bruteforcing is now I know why this code is slow
I know about Quicksort but in what context are you refering?
It still has to probe locations
till it finds a valid one.
That the time to do that get reduced waaaaaay much in comparison to bruteforcing it
#Akryllaxout
Everytime BIS_fnc_randomPos runs
it has a chance of failing to return a value
and gives back [0,0]
And then your entire code just fails
Wow the random script doesn't even check if an area is Empty
Ha
Writing Queue data-structures functions was easier than I thought.
Now I can integrate that into my garbage collection system
so, getPosVisual returns a position in render time scope. is it always faster to use it rather than normal getPos, regardless?
doubt that
@tough abyss Anything on unscheduled has a chance to fail, as each script gets only 3000 execution cycles before aborting
getPos is still kinda slow
But... Why would you bother?
Some high end stuff
Isn't noticeable at all
if you need to compare two locations you dont have info of before getPosASL is much faster than getPos
one could say O(nยฒ) isnt noticeable until you find out that your system processes 500 elements instead of 5
getPos is slower than ASL\ATL\World, yes
its just about that tiny bit it is faster.. it could add up to a mess
Spending so much time improving that stuff... Not worth it usually
getPos does some manipulations with bounding center, finds surface under it, etc. - does plenty of pretty much useless stuff.
well if you know it its easy to use
Well, never mind that ๐
@meager granite I had that question left yesterday:
if I use modelToWorld then AGLToASL and setPosWorld +hightoffset
would that work proberly? (since World appears to be ASL to 0,0,0 of the object)
modelToWorld [0,0,0] is the same thing as AGLtoASL getPosWorld, so it should work
thanks alot :)
GeekyGuy5401: Wow the random script doesn't even check if an area is Empty
@tough abyss that's what BIS_fnc_findSafePos is for ๐
FindSafePos however is really slow (and tends to select the same position over and over again (if its empty))
its better to approach it with some maths (mapcenter +- random worldsize/2) which might need to be adjusted and then just isFlatEmpty (which takes the same params because findSafePos uses it)
and leave out the most useless stuff that findsafePos does
it can be slow if you have very restrictive filters and it only really matters when you use it like every frame
in unscheduled it's probably negligible due to it being way faster than scheduled and in scheduled it doesn't really matter
it's not like it's going to take 10 seconds ๐
Ohh it can
I had it a few times due it uses static filter params, so if you mission has been online for a while and the map/are might be crowded then it will run the full 1000 attemps for even a small set of filters
then you just need to run it again and again
this is what makes it so expensive.. it returns the default at way too high costs
might be only my opinion
your alternative wouldn't be any faster since it still has to do the testing, in fact it's pretty much the same thing as what BIS_fnc_findSafePos does
except for the fact that you're doing it from the mapcenter instead of a custom position
I'm more than happy to change my opinion with some benchmarks though ^^
Yaaay
I'm 1/4 done into my plugin ๐ ๐
I feel so happy
That satisfaction when your code starts to work out of nowhere and you don't have a clue why. But it's still hapiness.
Coffee always tends to be a magic wand too
I guess I will benchmark it today just to see for myself (the idea with the mapcenter can be replaces by params)
for really small areas it should be the same, but as soon as we search the map (which I guess is the common use for it) we will run into trouble
hey people,
would it be possible to make a script that displays the range (in centimeters) between the weapon's muzzle and the camera view? i would need something like this for making fine adjustments in the field of sound modding
not sure how you'd do it for the exact muzzle position but screenToWorld, eyePos, lineIntersects - those commands should help
Could it be tied to fired eventhandler? when fired get position of the bullet and calculate distance between that point and eyepos? Although now that I think about it, the bullet does spawn into the "chamber" memorypoint soo scratch that
ofcourse... i just want to be able to measure the exact distance between the eye pos and the point where the firing sound gets created - if it spawns along with the bullet to the chamber, thats good for me
maybe look at the BIS bullet tracing function and see how that does it
I wonder if the gun sound actually has a point of origin like that. Have you gone through sound configs if theres anything that points to a memorypoint or selection in a model?
no, im not fond of configs ๐
i just experimented with triggering certain sounds only when you are firing while aiming down the sight
and the "curve" you set for one weapon doesnt work with another one
Hi, is there a way to get inventory dialog positions?
I want to put some buttons on them and need to know where to place it in relation to the inventory menu
Hola muchachos!
I wondered if it's possible to place a speaker object and to talk through the microphone, and make the speakers output your voice so other players can hear you through the speaker.
Any ideas how to do that?
Thanks a lot @tough abyss
It doesn't work. It's possible to do this in editor right? @tough abyss
I think i got it working
Ok I got it working @tough abyss
Is there a way I can open this up with the GUI editor? Or export it as classes?
thanks
is it x, y, w, h?
In that order for positions?
ah thanks
anyone uses TFAR in here and knows how to configure (volume & toggle speakers) a radio via script?
One of these functions can probably do if for you https://github.com/michail-nikolaev/task-force-arma-3-radio/wiki/API:-Functions
@native hemlock I found this [call TFAR_fnc_ActiveSWRadio] call TFAR_fnc_setSwSpeakers;
it says that the first parameter is string - radio
I don't know what to do with that. Or do I just put it like this in the init?
Is there a way you can prompt a player with a dialog that says yes or no, and if you click yes the script will continue otherwise it will exitWith?
yes
there is a dialog tutorial which teaches you how to do exactly that
1st result for "arma dialog tutorial" on google
I know how to make dialogs lol
I want a dialog that say ok or close or yes or no or some shit
I have seen a default command before
I just cant find it
just make one, you know how
who's good at maths?
i'm trying to tile hexagon markers. i think i need to use pythagoras to figure out the width of hexes. but i am bad at maths
Could your original problem be solved with
https://community.bistudio.com/wiki/inArea
https://community.bistudio.com/wiki/inAreaArray
?
who, me?
yes
i dunno, how?
idk
player inArea "hexagon_marker"
nah i'm trying to cover the map in tiled hexagons
but can't figure out how to do the x axis tiling part
Regular hexagons? i.e. all sides the same length and 120ยฐ between them?
pointy topped hexagon height is always whatever the "radius" of the map marker is, but what's the width?
the same as the height if it's a regular hexagon...
Oh. I think I know what you mean
yeah it's not as wide as it is high, only the points of the hex would touch the outside of a same size circle
i think you can do it with pythagoras' theorem but i am bad at math
the edge is on the top?
yeah
height being more than width?
yeah
like this is a 10 radius hex inside a 10 radius circle http://i.imgur.com/y6CyVbt.png
nice one, let me test that
there are 6 triangles in a hexagon
the width is basically the height of one of them
so the height of the hexagon is the hypotenuse of that smaller triangle
the angle in the middle of one half of one of the triangles is 60/2
Eh, trig in highschool for many
yeah well i'm shit at maths
civilizarma coming right up http://i.imgur.com/2uH9m48.png
I was thinking about the same thing lately with release of civ 6 lol
CTI - Extended
do it samatra
my thinking is to process each terrain in to hexes, then make the mission on VR terrain and load in that data
it will allow everyone to get 60+ FPS in the tanoa jungles
then make the mission on VR terrain <- ?
Minus the terrain height?
minus ground Textures
I wish we had terrain modification commands from VBS
+1
yeah process terrains in to hex tile data, create hex map on vr terrain
Converting Cartesian coordinates to draw a hexagon on the map
Might be easier to make a custom GUI component
To draw a hexagon..?
I've no idea what you're getting at
It'd have to be made of compound shapes
see what the other guy said above
It's probably most efficient if you were creating a trigger on a marker.
Why would you convert to polar to deal with hexagons
No make it hexagon
Think we're in different books
And why will polar coords help
Can make any coordinate system you wish
I don't see how it would improve performance though.
if you're smart enough ๐ฎ
Nobody talked about performance with using a different coordinate system ๐
Civ 6
Did you read what you were saying to read? ๐
just did it for a laugh. will probably dick about making some 2d mission
ah k.
On that subject
Anyone seen BMR insurgency before?
All 1200 instances of scheduled scripts?
on the server-side?
yup
it won't melt it, but nothing will work or take forever.
e.g. opening the esc menu to escape the server
Yep.
It used EOS a lot.
I've improved I&A creating my own specific Queue data-structure functions
Now I can manipulate the queue.
Translated Python Queue to SQF
can you manipulate the sceduler manualy ?
yea 3ms time that he spends on each script.
What?
can you manipulate the sceduler manualy ?
you can add more pseudo threads xD
@little eagle "pseudoThreads " good one
Thats what they are.
that is what they are though
They're very similar to Java threads
all the problems of asynchronous programming
Virtual Machine managed
none of the benefits
I think we all do, every time we code
It's why execVM is exactly (Execute in the virtual machine)
the missing benefits, thats whats bugging me
I don't use PFH whenever possible either
when i think about it, BE Filters
It's a case by case thing with Scheduled vs unscheduled
Time critical stuff e.g ACE3 requires the unscheduled
SQF is cushy for async business
I'm fine if missions use the scheduler. It's just that mods shouldn't use them
otherwise adding mods to a mission will change the mission behaviour
But BMR with 1200 is a bit extreme.
well fuck that word, You are right though
and the mission would change the mod behaviour
"Why does AGM not work with mission X?"
I don't want to deal with that
anymore
Because:
Has anyone tried out the Intercept library?
Because: shared scheduler space
Because: Arma.
facedesk
Everything is because of Arma arma is the new 42
regarding intercept: as far as i heard: The benefit will be screwed by extension connector (time)
One of the massive problems life-servers have when the callExtension is put under massive stress
is although the callExtension is unscheduled
and sends to a database thats multi-threaded
and blocking
It defeats the purpose when you can't parallelise the data fast enough
And it's blocking.
120 people + database
erm, ExtDB is has Workers, soo... maybe an old version that had Problems with it.
= massive load times.
Asking @tough abyss might be the better choice
thats what i wanted to say
Yeah extDB as far as I know has a data queue?
it works astonishingly well
And thats why it's called fn_asyncCall.sqf
i think so
its just the name Geeky
as far as i know, esxtDB instantly returns something
Yeah but I did for a while scripting on Life.
I once made some tests with multiple inputs to the DB, no probs with 100 Requests/s
so it breaks the block, and then you keep looping and asking back till you get the result
And found out that extDB2 supports Async and Sync calls
i think iniDB
extDB2 in general had nice features and worked well, in the later versions
@noble juniper 3 was even better.
never worked with 3
One of the massive problems life-servers have when the callExtension is put under massive stress
No life server is going to be querying 100's of times per second
i got out of AL with like V2 7X
Yes
@dusk sage Believe me, there are some ๐
140+ players
defently.
thats life
badumm tss
100 players != one query per second per player
thats why you can say RIP
@dusk sage I've seen things, back in the days... you don't wanna see.
e.g. one guys asked me, why his Server was so slow... checked the code -> Updating Coords every 2s...
You seem to underestimate how fast extDB returns
@jade abyss best horor story ?
๐
If I had my way
it was saving every 5 sek ?
Everything every 5s
it was called life_fnc_queryRequest ?
No
oh jea, that was the recieving one
queryRequest was linked to the button
what was the saving one though
It was a spawned handle for each connected player with a direct CallExtenstion in it -.-
The performance boost from using predefineds in something like extDB, won't make a noticeable difference
it was the " query everything" function
...
Because extDB isn't whats blocking
Yikes
It just makes it safer @dusk sage
^
Indeed
Yes
But, regardless
Sanitize data
It's all bound, so it really doesn't matter
i heard i t was astonishingly easy to drop DBS in AL
i heard Ehem cant say more Ehem
anyone remember that mess with erm... call compile ?
No clue
How do you expect to run a custom query, when you can't directly call asyncCall ๐ ?
its like 3 month ago
Too long ago, i tend to forget horribly times (life-coding-times ๐ )
what? That was about about 1 1/2 years ago
some fagot jumping servers, and using some very old sync code to get all serverside functions
@tough abyss Yeah, i wen't in the background, just coding for fun... when the fun stopped -> Another project ๐
after Gihuib was taken down, he opened up his own Website
Yeah my first real project was a weather code system
You talking about Arma Leak Team?
@noble juniper And thats why you don't give the MySQL/ExtDB User full rights ๐
I lost interest in it.
@dusk sage yes
Think it was a combination of just pure exploits in the end
I can't remember
Wasn't mod specific
This is my first pet project
It's been through a few periodic re-writes since it was released
some admin had just a bit in his BE Logs and it was a very old map and marker based MP Exploit
well, how did you hear about them ? @dusk sage
The code never did what I wanted so. I abandoned it.
I know the guy behind it
#define CONSTANT24 24
#define STRESSRELIEF 0.000002
#define CONSTANTINVERSE -24
skipTime CONSTANT24;
sleep STRESSRELIEF;
skipTime CONSTANTINVERSE;
sleep STRESSRELIEF;
LOL
ahhhhhh
One of my first "public" scripts. Boy.. 1 1/2 Years ago.
What a mess in the code... oO
http://pastebin.com/dW72W82B
@dusk sage you are fucken kidding me
As I said it went through the re-write a few times.
Files got re-partitioned a few times.
initialWeather = 1;
switch (initialWeather) do {
๐ค
xD
Makes alot of sense ๐
This was before I refactored it massively.
Oh boy... armaholic history :D
http://www.armaholic.com/page.php?id=27067
๐
Hey @dusk sage We all had to start somewhere.
I dropped ArmA 3 scripting for a while
For sure
Started C++ / Python
I'm just confused with the switch ๐
Learned a ton
Same Geek, we scrapped 2017, then making my first steps in UE4 atm. But.. thats offtopic.
maybe that was intendet to get changed by context change
dead probably
Oh right, they wanted to make their own game, right?
yes
Ohh that InitialWeather = 1; it was a hard-coded entry.
Yeh they raised crazy money for it
more then 30K
To publish a weather value at the beginning of the map
?
#offtopic_arma @dusk sage Better to switch over there
i just face desked when i saw 180k
HandeRemoteThread = [] spawn {[] remoteExec ["RS_fnc_WeatherUpdateSetter",2,false];};
...
guys, check the channel pls =}
Self ๐คฆ
guys, check the channel pls =}
the channel description is invalid SQF. using==on a boolean
D:
Might end up re-writing this entire thing.
My biggest problem with the script was the cost of updating each frame every 5 minutes
to try to achieve smooth transistion
@little eagle oh myyyyy
consider me triggered
is that better than being while looped?
๐ต
@rancid ruin Debatable creating smooth change in arma 3 weather by
script is a pain in the ass.
half of the comands to do so are broken. especially when auto weather is enabled...
I was trying to eliminate the "frame-skip" effect you see.
Tortesote or whatever his name is
Use a really funky hack
of taking skipTime currentTime / slices
and each of the slices were small enough to not notice.
Need to change it to isEqualTo, because SQF. @little eagle
of course
It literally should work
if (script) then {
โ
that is what I'm talking about
inb4 isEqualTo false is faster than !
It is? oh my
Hey @dusk sage
Would it be faster to pre-compute all spawn location for vehicles / infantry
and then spawn them
or spawn them on the position after it's retrived.
?
MP?
I'm slightly confused and what you're getting at tbh. What do you mean by or spawn them on the position after it's retrived.?
spawn them at [0,0,0] and then use setPosASL
or setPosWorld
well . that is rather difficult with vehicles with unknown model center
true
you don't want them to be stuck or floating
Not sure it's answering his question though
Wich Pos does modelPosition give you? asl/atl/world?
too many... AXL
yup
AGL yeh
I always translate everything to ASL and then back to AGL if the command requires it
also, this exists https://community.bistudio.com/wiki/setPosASL2
...
or he takes those MemPos, modelToWorld/WorldToModel -> setPosWorld ๐
modelToWorld doesn't have anything to do with set/getPosWorld!
That smiley was meant as an indicator for a "joke"
ok
You see: modelToWorld / WorldToModel ๐
Yeah. the names are confusing as usual
Yep
no excuses this time. the commands are new...
Wew
I think the absolute worst thing about this AXL desaster is this:
Reactions disabled for normal users
good ๐
getPos reports AGL, but uses the lowest pathway LOD
@dusk sage Spawn them after storing all the positions
for them to be spawn'd at in an array
setPos ignores the lowest pathway LOD
and searching the array
Oh right
faster than? spawning them and getting pos together
position array -> spawn VS get pos -> spawn
Spawn at [0,0,0]
Exactly.
then move to Pos
SO it would scan all valid points pushback into the array
then run { "VehicleClass" createVehicle _x; } forEach _preDeclaredArray;
1). Will it take longer to gather positions singularly?
2). It might be slightly quicker to not chain create them
then run { "VehicleClass" createVehicle _x } forEach _preDeclaredArrray; <- wrong
Fixed.
{
_a = "VehicleClass" createVehicle [0,0,0];
_a setPosAXL _x;
} forEach _preDeclaredArrray;
In mp
Sometimes, it takes up to 3-4min. No idea how that occurs. I was sitting with Awol from Epoch for a few days, testing some stuff around cause his BuildingSystem didn't updated the stuff properly (exchanging objects/recreating). Sometimes... arma is just messy.
Also:
SetDir before SetPos Geek
^
or even using a setVectorUp of the defined pos
Vehicles would occasionally spawn and go kaboom
setDir has global effects in A3. The setPos afterwards trick is only necessary for when using the command on remote units
So.
"PhysX induced damage"
Spawn it then set allowDamage false
And removing it 2-3s after
I call ArmA 3's solutions
Hacks because thats what they are.
Dirty solutions to duct tape things together
Reminds me of our chat about dynamic formatting @little eagle
I can't recall. formatting what?
urgs
those macros are just to get around the limits of using commas in macro arguments
they're only used internally in other macros in that file
test = {
params[["_str","",[""]],["_args",[],[[]]]];
if (_str isEqualTo "") exitWith {""};
if (_args isEqualTo []) exitWith {""};
_test = str _args;
_test = _test select [1,count(_test) -1];
_test = format["format['%1',%2",_str,_test];
_test = call compile _test;
_test
};
_silly = ["%1 %2 %3 %4", [1,2,3,4]] call test;
hint _silly;
e.g.
#define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1))
#define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2))
_X is necessary, because you can't use macros with variable argument count
preprocessor limitation
yeah. I can never remember that word
is it possible/easy to have an alias for a function?
like being able to use "sel" instead of "select" or something
#define sel select <- ?
that easy?
that easy
add a "macros.h" with the shortcuts/Macros you want to the mainMissionfolder and "include macros.h" in the .sqf files you wanna use it in.
or:
#define sel(Num) select Num
sel(0) == select 0
ah so i can't just stick it in init.sqf and use it anywhere after?
gotta include the header file in every .sqf?
For sorting: Put it in an extra file
Steam ๐ ?
it's scarier when you see it in systemChat though
there's no command to find the highest point on a map is there?
or the altitude range?
Ay. got 707 hours on arma 3 but never played any mission / mod ๐ all time spend for scripting. A2 is even worse.
I gotta 1700 hours and spent only around 200-250 actually playing
So, I feel you @willow basin
@jade abyss That is actually pretty smart. Props to you!
๐ ๐ ๐ ๐ ๐ ๐ ๐
Gonna steal that if you don't mind...
Does anyone have a script that would require to enter a keypad pin in order to teleport a player to a new position on map? :/ need it urgently
something like this? http://www.armaholic.com/page.php?id=26499
I have tons of custom spawned buildings in my mission. If i constantly delete/spawn buildings to show only the buildings near the local player on all clients but have all custom buildings on server, there is any performance gain?
if you create them locally there is a performance gain on client only since they are only on client. I could imagine some strange behaviour .. would be better to just create them as simple object and leave em there all the time
Not having so many would be better
Pretty sure arma still has bug(design feature) were if you createvehiclelocal vehicles/buildings etc.
On client d/c those objects get transferred to the server as a local object (doesn't happen to ai)
So i would avoid createvehiclelocal on server with high population turnover
Should be easy enough to test if someone is bothered
@tough abyss @vague hull thanks. I will try simple object creation.
local objects for buildings on all clients is terrible idea
any destruction will be desynced
Unless you spawn them with glass shattered right away make rest invincible
And if players hapen to be inside the buildings, physics emulation for the rest of the clients+server would go completely nuts. So that way you would just succesfuly create the first physics-driven retro-DDoS attack network for Arma 3. (as player would be technicaly floating in a network scope)
Please note the dramatization.
createvehiclelocal works fine for CfgVehicles. It will cause missing object errors when someone enters a local only vehicle and stuff like that
the biggest problem is, that they will be transfered to the server when the client leaves
and I think they are like global objects then
createvehiclelocal does not work for certain simulation classes in CfgAmmo. It will create global objects then
but yeah, don't use it, except for stuff like particle sources, light sources
Do anyone know if its possible to do have like a clickable cockpit and a MFD with a map and you click on somewhere in the map to designate target, kinda like map click for vanilla artillery but instead of pressing M to bring up your map, you have a MFD in the cockpit and can click directly on the MFD screen. Anyone know if its possible or have played around with it? Can example render the GUI to a texture?
you can render gui to texture but not map
map is always drawn at absolute coordinates
Okay ๐ well a workaround is just to enter cordinates in a textbox on the GUI?
just put controls over the map
So i am placing a smoke module down, how to i change the size / speed / opacity of the smoke in the init?
click the module, change the numbers
there are no numbers
simply an init
but i know there are commands to change the particle effects
i just don't know how to implement them
they don't work with the module
I have changed the smoke module before to create a sandstorm though?
they're meant for scripted particle effects
I have forgotten how
The module is just a wrapper for all those SQF commands
so how to i increase the size of the effect?
the module just executes a predefined script
Pretty sure you click the module and edit the parameters
just like with the fire effect module
there is nothing like that with smoke
displayName = "Color";
displayName = "Permanent effect";
these two should exist. anything else can not be changed with the module
or
use this one:
ModuleEffectsSmoke_F
why? it has a ton of parameters
blind af ๐
I think you placed the smoke GRENADE one
yw
Can you even have controls over map?
like buttons on a map? yes
why not? what else do you think the menu to place map markers is?
Magic.
Sounds about right
Wasn't map always drawn on top of everything? Can't recall for sure but I remember there were issues with it
This is separate display
So what?
What about map and controls in same display?
I'm not sure, but this display isn't actually seperate
wait
It's a child display of the map display
Yeah, I was thinking about controls in same display
OK. Maybe. The solution is createDisplay then
Double checked it, map will draw on top of everything else when focused
If you focus other controls, they draw on top of map
That happens to all selectable controls
But maybe the map has to be one for it to be able to scroll
If you disable map you can't do anything with it but it is always behind everything else
So if you're going to static map you might be able to have controls over it
Why is it when I do this command ['Open', true] remoteExec ['BIS_fnc_garage'];
And spawning in a vehicle
It only shows for me and no one else
what shows only for you?
Yeah the vehicle that im spawning in
Did you place it, or only use the preview?
meaning close the garage after it's placed
?
Ill check
I mean
I could interact with it
And drive it
Yep not spawning globally
tried ['Open', true] remoteExec ['BIS_fnc_garage',player]; aswell
thanks mate
D:
I ctrl+F'd it for createVehicle
which is the command to spawn a vehicle
_center = _class createvehiclelocal _centerPos;
createVehicleLocal?
So it does not work in MP
Means only locally?
?
Make my own menu to spawn vehicles
and add it to the Garage/Arsenal?
No
Make my own menu
and populate it with all arma vehicles
with like forEach cfgVehicles or somethingt
sure. you can do whatever you want
there are people that recreate Eden as Zeus replacement
literally anything you want
So I could use forEach command right?
You can use any command you want. That is just a basic control structure / loop
What would you suggest?
What do you mean?
You're gonna need a lot more than just one forEach-loop to make something compareable to the Virtual Garage
Yeah I know
But I already have a menu but for players that I can modify
But is it possible to populate the menu with {} forEach cfgVehicles e.g.?
not cfgVehicles
but some where else where it getst the vehicles
sure
What would the cfgVehicles command be?
what would I replace that with to actually work?
You want to report all vehicles that are actually placeable? Because some are just parent classes that don't work on their own
All vehicles that are drivable and placeable yes
using CBA?
Community Base Addons?
yes
Would make my task here easier if I could use some functions from there
It's supposed to go on a unmodded server
#define VEHICLE_SIMULATIONS ["car", "carx", "tank", "tankx", "helicopter", "helicopterx", "helicopterrtd", "airplane", "airplanex", "ship", "shipx", "submarinex"]
private _vehicleClasses = [];
{
{
private _config = configFile >> "CfgVehicles" >> _x;
if (toLower getText (_config >> "simulation") in VEHICLE_SIMULATIONS) then {
_vehicleClasses pushBack _x;
};
} forEach _x;
} forEach ("true" configClasses (configFile >> "CfgPatches") apply {getArray (_x >> "units")});
_vehicleClasses
and then I modify that to be put into a display and rsclistbox?
that just reports all the placeable vehicle class names
It returns it in an array _vehicleClasses?
something like this? http://hastebin.com/holabiroxa.vbs
L24 should probably be _vehicleClasses->_x
L25 str(_x)->_x (it already is a string
it's also missing the part where the CONTROL() macro is defined
L24 should probably be _vehicleClasses->_x
L25 str(_x)->_x (it already is a string
still
just the lines changed
Okey but what do you mean by >L24 should probably be _vehicleClasses->_x? @little eagle
You dont mean that do you ? _vehicleList lbAdd format ["%1 %2", _vehicleClasses, _x];
I have head about AI in createSimpleObject. A house created with createSimpleObject will block AI vision but the house will not have AI path (for AI inside the house??). So if a house created with createSimpleObject is in the way of a AI, he will around the house or pass into it like a ghost?
WIKI says "AI will go thought walls" but i believe they say that to AI inside the building.
they'll probably walk through the walls regardless of whether they started outside or inside
In fact. AI walks through walls of regular buildings when pathfinding and that is considered a feature by BI
@little eagle Did you see my previous question?
_vehicleList lbAdd _x
_vehicleClasses is a huge array, you won't be able to read that and you don't want it in every line
look up how forEach works and what the magic variable _x does in there
https://community.bistudio.com/wiki/forEach
Yeah _x returns the forEach command?
so forEach allplayers
then _x return all players
it will add one
and then do the loop again
and again
each time with a different _x
ah ok i see
yeah so forEach is doing the looping?
yes
So this is correct now? http://hastebin.com/akakowuyuc.cpp
And then I just do a dialog which does the createVehicle on the given selected vehicle in the list?
lgtm, but I have no idea what the point of format ["%1", _x]; is compared to just _x. It already is a string
@rotund cypress At least try it, before you ask if that works.
Yeah Ill do that
lets say i play a trigger to call a sqf script is it possible to stop it after?
Best idea would be to stop script from within itself, but you can just save thread into some variable and then https://community.bistudio.com/wiki/terminate it when you need it
in arma 3 its "exit" right?
alright thanks for the help @meager granite ๐
if a trigger is set on "is present" and ill leave the area of the trigger who executed a sqf that doenst stop the script right there needs to be a check then or ?
or could i place trigger arround to "terminate _script;
"
exit is a SQS command and does nothing in SQF
the script ends, when you leave the main scope
either when it reaches EOF or exitWith
You can terminate it at any point using:
terminate _thisScript
Idk if that works for triggers, but it does for spawn and execVM
I guess you can also use breakOut if you named the main scope using scopeName
@little eagle this happens with any building that don't have paths set? (AI walk through walls).
it happens with buildings on vanilla Stratis
they walk through doors, sometimes walls
doesn't matter what you do. It's the pathfinding
Use createSimpleObject to create buildings don't make this worse?
I never use that command
Create object with given shape defined as path to .p3d model. Supported LODs include Geometry, Fire Geometry, Roadway, View Geometry and ShadowVolume. Supported features include collision, texturing, animation, penetration, AI spotting occlusion, and surface specific sounds (like footsteps). Unsupported features include PhysX, damage, AI pathfinding (causes walking through walls), and built in lights.
@little eagle thankyou, i will do some tests and return the info here.
Unsupported features include [...] AI pathfinding (causes walking through walls).
pretty clear the wiki
Good wiki entry. GJ KK
So they are stating the obvious?
They're documenting expected behaviour
Idk if it's true or not
I don't see why it wouldn't
only one way to find out
Yes
I was just asking in case someone have tested that or "witnessed" AI in simple objects buildings.
does anyone know if it was already created or if its possible to create script which would create northern lights on sky ?
is there a way to create a 'real' radio in arma3, one that can be tuned into from several places and turned off again while staying in sync all the time with the different sound subscribers?
yes
but it can become complicated.
TFAR is your best bet, with a special modifyed sound bot.
thx for that idea by the way
hmm, so relying on an external dll for team speak to do it?
cool, good luck. Too bad if it's not possible with vanilla arma
is that 'real' radio as in music radio or 'real' radio as in walky talkies? ๐
there could be a way, but as far as i know, noone ever tryed it
i though music radio
muting and unmuting (if even possible) a sound source could work but then there's still the syncing issue
both, one for AFVN radio station and one for walkie talkie chatter
I guess for a very limited range of receiver one could spawn 'radio objects' and use say3d on them in parallel and teleport them away when turned off and back when turned on, but thats an ugly hack
aren't most of the unintended/unsupported things people do? ๐
the normal radio for communication is actually fairly easy
based on the normal channels that arma has, that you can modify through sqf code.
And if that are too few channels or too few options with those, you can take custom radio channels
i forgot what the command was, but you have up to 10 custom radio channels that you can add and remove when ever you like
you could misuse those as 10 different frequenzys / channels.
how does a player tune into those channels? Or is it via sqf only and the std channel stay working?
biggest advantage, you can add and remove then when ever you like
via sqf only, and the normal ones stay working.
Sqf only means, you can put that on some event like button press
the idea would be that a player has a radio item in his items and can then tune to that radio
radioChannel (Add / Create/Remove/SetCallSign/SetLabel)
those 5 commands belong together
hmm, so the server needs to support VoN?
and with those, you can achieve that .
yes
works over VON
in addition, you could disable all side and global channels, and dedicate 3 to 4 custom channels to that
the only downside to custom channels is that you only have 10 availaible
the 11th won't work
how you could technically implement this.
the other downside is, that the player needs to actualy have that channel selected.
through . or ,
I guess one would define CfgRadio playbacks in the mod and then use directSay?
yes, that be awkward, hmm
also only the player would hear it, not anyone nearby
is it about scripted radio, like a sound file or actual player conversation ?
scripted radio, a combination of sound files
thanks anyway, interesting ideas nevertheless
if you want other people to hear it, you have to go the rout of say3D or soundSource
soundsource can be turned of when ever you like, say3d plays all the way through.
soundsource?
say3D is attached to the object that is playing it, soundSource is stationary.
i think it was soundSource
il look it up
createSoundSource
the command is playsound
thx
i guess, your cfgRadio solution is the one that is used by bis
so we're back to creating an object, using say3d on it remotely and then moving it away when the radio is turned off ๐ฆ
do you desperately need the "turnoff "feature?
yeah, it was a feature of the a2 radios, needs to be there
yes, it might be attached to a vehicle like a jeep or helo
sorry, many requirements there
no problem, a nice thing for me to get my head smoking about
wait
say3D has a bug
if you kill the object, it stops
try using something that is alive
so the object that you use for playing the sound, delete it, or kill it with setDamage 1;
@round scroll sorry, i tend to just go on in one direction, probably the wrong one..
@noble juniper no worries, thanks for your ideas. I'll give the say3D a try on the weekend and will report back how far I got. If you want to experiment with it too, just send me a PM here, would be appreciated. Need to logoff now, bye
no, its actually declared as a bug. atleast, you can find it in all the bugTrackers and its i think even mentioned on the page of that command itself.
but its a while back, when i actually looked into that exact matter so please excuse if i forgot something
I don't see any bug report there
The command is meant for units to speak lines
they even move lips
of course they would stop talking when getting shot and dying
you are right, looking at it, it now seems intentional.
the "issue" aparently arose in A2 times, atleast thats what Benargee said.
@little eagle thx, i learned something again.
the comment section on the wiki is usually shit though
Icaruk This command is local.
It's not
It's global args, local effects
...
Ah, thats what that means ... thx again for making me look that up ๐
it's pretty important, especially for what you're doing ๐
i was using it, i just ignored the tag
but i haven't released any scripts in like a long time, so you can't check that
Do weapons like missiles or bomb have to be a proxy or can it just be a normal P3D? was thinking about doing animations on missile
@little eagle what are you up too ?
Figuring out some class inheritance problems for the guy that does the new TFAR update
width of hexagons /shrug
cool, have fun
As I said hexagons aren't easy.