#arma3_scripting
1 messages ยท Page 481 of 1
So there's a new update that allowed the AH-1Z to utilize it's MFD's. It has stuff like weapon systems, Fuel distribution and time of flight left, the and a few others.
However, the only way i know to change each panel's display is by using the mouse wheel over and over again for each one.
Anyone know how to use custom controls to make a keybinding to change both the right and left MFD in the AH-1Z?
@fierce ingot what do you mean by works. If you mean will command accept values more than 1? Sure. Will it make AI more skilful? Hell no.
Could anybody assist me with the Dynamic Pylon functionality?
I have it written as _vehicle setPylonLoadOut [1, "PylonMissile_1Rnd_BombCluster_03_F"];
It's based on the UCAV, issue is when it spawns it, you have no driver control anymore.
Seems like you still need to define the turret, but I'm not sure how
_vehicle setPylonLoadOut [1, "PylonMissile_1Rnd_BombCluster_03_F", true, []];
Whats the extra[] for?
Command needs empty array to specify that pylon is controlled by driver
turret = [] (empty for pilot)
numbers inside will mean turret
if you want change gamma, brightness, colors.. etc, you can try > https://community.bistudio.com/wiki/Post_process_effects
also just google "nvg script arma 3"
Glanced around google but didn't find an answer, is there any way to do loose comparison in A3? ie. 1 == true
Hi, how can i create a RPT entry with diag_log on the Server after using a local function?
@still forum is it possible to overwrite one of your tfar functions with a mod ?
Does civilian presence module work in multiplayer?
Yes
thanks
@wary vine If you are lucky yes..
Usually not tho..
I got it working
If you are the first to register a function then you won. If not then.. not.
you can overwrite
I added it to required addons then ```
//Function Overwrites
class CfgFunctions
{
class TFAR
{
class Radio
{
class canUseSWRadio {file = "\Lega_xPhone_Client\overides\tfar\fn_canUseSWRadio.sqf";};
};
};
};
Ahhh .. You gotta say whether old or new TFAR :u
new ?
wait wut ?
i just downloaded the latest from the website, and the functions are defined the same ?
latest from the website is old tfar
where is the new ?
github or workshop
the github linked on the website ?
ye
last updated 2 years ago o.O
yeah.. old TFAR
Where is the new I can't find it ?
ahh ty
I think ill stick to the old version, until I have looked through this some more xD
Hello guys, is there any way to detect nearby simple objects?
i don't know if this is the right section, but since 1.71 it's possible to use enableDebugConsole[] = {"81273982178973213"}; in a Mod, but there is no example how to use it or write it down. Just i need to put a config.cpp with these two lines in the pbofile?
enableDebugConsole[] = {"81273982178973213"};```
Hello, could someone link me a good tutorial about safeZones and how to uses them ?
I tend to loose myself when I use them
Is there a way to go past "maximum" ammo count in a magazine without mods? e.g _vic addMagazineTurret ["magazine_Cannon_Phalanx_x1550",[-1],2000]; ammo is capped at 1550, anything below 1550 works (as expected)
have you seen this https://community.bistudio.com/wiki/SafeZone @quartz coyote
@copper raven you can fill the magazine after every shot
i belive
Yeah, just wondering if there is a cleaner way
Not really, you can do your own bullet count however.
e.g. make a mag count with 90 bullets for a 30 one
so you linear convert 0 to 90 towards 0 to 30 and just set ammo.
It is how I made an mg42 have around 1000 rounds instead of like 50 per belt.
it kinda melted halfway through tho
๐
downside is obviously if you reload and need to calculate the new virutal bullet count, you either gain or lose some rounds
now I have the first log results for exportJIPMessages - I guess the long ------- lines mark a single JIP event? A quick grep shows that there are 27300 of these lines - is that excessive?
seems command (String) = bis_fnc_settasklocal is most numerous with 6274 occurences
@tough abyss yes i am on this page and was read it. But i don't understand how to build a Mod with it, so how it looks like i a complete Mod, so where is this line to be typed down. So is it enough to make config.cpp that looks like this:
cfgPatches {
some cfgPatches Stuff
};
delete enableDebugConsole;
enableDebugConsole[] = {"81273982178973213"};
let's say I want to modify the appearance of a vehicle during the mission. Like adding ractive armor on an APC or a camonet on a tank. What should I use ? Is it considered as an animation, just like opening a door or a hatchback ?
nvm, I got it
https://community.bistudio.com/wiki/createVehicle/vehicles shows animation sources
is the 50 in [(getPos player), ['Land_fs_feed_F'],50] how close to the object the player is
You provided no useful context whatsoever
We can't know what that is supposed to mean
condition = "(count (nearestObjects [(getPos player), ['Land_fs_feed_F'],50]) >0)";
interaction condition
would the 50 be the distance to the object
ty
There's also no reason to use nearestObjects there. Use nearObjects
Does canMove return false when the helicopter rotors are damaged?
hi.
Can some one explain to me how CfgRemoteExec works?
If I have server addon that implement function my_func. And I want to call this function by clients.
Should I define my_func in CfgRemoteExec on client or server?
Hello guys, do you know any way of returning all the segments of a rope?
I donยดt really know if it is possible because ropeยดs segments are CfgNonAIVehicles
player nearObjects ["RopeSegment",10] returns the segments but how do i check the segments are from my original rope?
so i assume the condition is returning false although im within range. ANy ideas?
Do you get any objects if you test in debug console: nearestObjects [getPos player, ["Land_fs_feed_F"],50]
@orchid saffron nearobjects returns "ANY" nearest returns "[216aaa7c100# 1170348: fs_feed_f.p3d REMOTE]"
correct. As is, in range, it does not return true
Have you checked if it binarized correctly?
sorry im still new/learning scripting. What are you referring to
If not try opening the config and looking for your condition
Your making an addon, right?
I suppose in your context, condition is a UserAction parameter
no sir. This is being added into my existing config.cpp of my mission file. Where the class is an interaction menu for the scroll wheel that should only show up when the condition = true. However when the condition should be true, the option in the menu is not displayed
Can you provide a full pastebin?
Also, are you saying you have a config.cpp inside a mission folder?
yes. here is the .cpp pastebinned: https://pastebin.com/GnvY6LMR
it is an exile mod mission so yes it does require the cpp inside of the mission pbo
config.cpp's don't work in missions
exile requires it. ig ill go ask them. Sorry for the waste ๐
A: Yes and no, the Enforce is very different from the SQF and porting scripts from one to another can sometimes lead to re-design the feature and/or architecture itself.```
ah no ๐
Q/A related to dayZ modding
they seem to be comparing and contrasting it with A2/A3 a lot so figured it would be of interest
for example
In last weekโs announcement we already mentioned, that DayZ is a hybrid between the RV and the Enfusion engines. While the packing and the asset creation are mostly unchanged and will go through the same process as for Arma 3, the rest (script, particles, animations, UI etc.) will be handled via the Workbench, which is a powerful all-in-one tool developed to handle everything Enfusion related.
that DayZ is a hybrid between the RV and the Enfusion engines That's a lie though
It's not.
we already knew the workbench tool
We also already knew that DayZ got completly rid of SQF
but as said many times here that might not be Arma relevant at all
DayZ has no legacy mods that want to be ported. They don't need to care about any backwards compatability
yeah but i'd be very surprised if A4 won't be similar - in fact it could well be even more distant from RV4 since they'll have more time
Considering they don't even know how their own engine came to be.. I wouldn't believe any word they are saying there
They just have to replace a word
the sentence wouldn't get more complicated by writing it correctly
Why do i have the strong feeling that BI will just replace old problems with new problems.
Because we've already seen that they did.
They are "minor" problems that can still be fixed
dreams about a community overhaul of arma
heh that may be downplaying BI's own efforts though
Hi guy's im new at arma, so i'm playing with the guns and stuff in virtual arsenal and one thing annoys me. I don't have infinite ammo, once i'm out of bullet i have to go to main menu and reload? How can i fix that
https://www.google.com/search?q=arma+infinite+ammo+script
->
http://www.armaholic.com/forums.php?m=posts&q=26035
->
this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]
I've red this one, but not sure where to put this code so it only would affect Arsenal VR
Does VR Arsenal have access to debug console? When you press Esc?
Yes it does, i did paste it in. But doesn't seem to take an effect
replace the this at the start with player
Thank you, seems to be working now
ahh the joys of learning arma scripting for the first time
is use of waitUntil instead of while really meaningful for performance reasons?
depends on what you are checking
They are 2 different commands, canโt really compare them without context
should be the same
no they're not...
0 spawn {
private _t = 0;
while {time < 20} do {
_t = _t + 1;
hintSilent str _t;
};
};
//--- vs
0 spawn {
private _t = 0;
waitUntil {
_t = _t + 1;
hintSilent str _t;
time >= 20
};
};
```into the console ^
(edited ^ changelog: added comment ๐)
what if you add sleep 0.1; to both? is the difference then negligible?
yes with sleep they both loop at a similar frequency but at that point you should just use while imo. with that example above on 20fps the while loop increases at a few thousand per second and the waituntil is closer to 20 per second which supports the wiki's statement saying waituntil will loop on almost every frame.
cheers fellas ๐
hey guys I got a question, I want to do a thing where the ai i hacking a door and the player must defend the ai while hes doing it (playing an animation). However becuase they are trying to breach a placed object I want the doors on it to be locked. is there a script I can use that will lock the door? this setVariable ['bis_disabled_Door_1',1,true] Using that right now and it doesnt seem to work
with the ai?
probably placing some object could solve it - I don't think AI is checking for userActions conditions at all
@velvet merlin while with a very short sleep is equal to a waitUntil.
waitUntil is just a while loop with integrated suspension. You can just fake the suspension with a very short sleep
but with the while loop you can also control the minimum sleep time. For waitUntil the minimum is a single frame
I dont want the player opening the door. AI wont enter it due to how Ive made it
where did you put that code? in building init?
ye
which building it is?
A little late to the party but I think my two big concerns around what has happened with DayZ, their statements about consoles and everything we so far know is that Arma 4 probably wont change the threading model enough. We are extremely limited in what we can do right now, a lot of mods just have loops to check some aspect periodically and they ought to be running parallel or have a much better event system. Throw in console like interfaces and you have a recipe for worse than current
Moving to another unknown language isn't going to be great, a lack of genuine improvement in concurrency will limit modding and performance once again. Console just means really bad limited control systems.
Well, here's the thing - either they make a clean break and a lot of modding effort needs to start from scratch (apart from the models and terrains probably, but i assume config stuff will need an overhaul) or they retain significant backwards compatibility without much improvement to the threading model
i'm unsure they can do both
I think a clean break on the engine side will be the best in the long run, if a bit painful
I don't know what backwards compatability has to do with threading model
Configs don't matter concerning multithreading.
And Enscript won't be multithreaded, same as SQF
they don't but they're interfacing with the engine, finally
interfacing?
configs i mean
i'm using the word "interfacing" in the general english sense ๐
the engine reads the configs and makes sense of the values it reads
if they overhaul that system then i assume configs will need to be redone
along with class inheritance etc
Where can I see that new config stuff? never heard of that
actually kinda weird.. We didn't see any new config stuff at all till now
re: threading and backwards compatibility - i'm no expert, but played around with Open MP a few years ago. I remember there were certain procedures to be followed while spawning new threads, marking serial sections, syncing threads, etc. If the engine has some expectations about this that the SQF-to-native compiler/converter/translator/whatever doesn't do, then there probably won't be backwards compatibility.
So far we have 0 multithreading in Enscript
But it's alot faster and alot of other stuff was moved away from mainThread
so we'll be able to do a F-ton more stuff. Yeah sure. We are still limited in the end. But I don't think that matters much
adding real threads to stack-based languages is fairly complicated
just to note this here
mostly has to do with the way variables and methods are accessed though
and with garbage collection
and with other stuff i do not think of right now
garbage collection is irrelevant for Arma. As refcounting makes sure no one else can have access
refcounting would also have to be made concurrent safe
it is not done with a simple ++ and -- like now
"like now"
Putting a mutex or similar onto every variable/method and stuff would hurt speed sooo much
refcounting is already atomic
stuff like objects would still need mutex
unless you want wanky problems that occur randomly due to renderer receiving old x and new yz coordinates
They would probably still split script/simulation/render
๐คท
tbh ... anything faster than SQF will be useful ๐
than*
Gone
๐
is this possible for MP?
{ _x allowDamage false; } forEach units group player;
sleep120;
{ _x sallowDamage true; } forEach units group player;
I want that players are having godmode for the first 2 minutes at the mission beginning
if you check the wiki page @ruby turtle https://community.bistudio.com/wiki/allowDamage
Arguments have to be local to the net-client executing
effects are global
initplayerlocal?
for example
just that then it is not at mission start but rather everytime a player gets init
as alternative, use a more complicated script involving time
private _deltaT = 200 - time;
if _detaT > 0 then {
_deltaT spawn {
player allowDamage false;
sleep _this;
player allowDamage true;
};
};```
it just need to be prevent damage when the "mission intro" in First Person view starts and the player base are under rocket artillery attack with danger close impacts.
what means private?
Surely the use of Enscript is going to ruin compatibility anyway, it is at least on the scripting side a clean break. We aren't just going to be able to port SQF, even A2 to A3 with the same basic language we couldn't do that and I don't think we can expect it. But given all the rewriting necessary and combined with the lack of progress on the threading model it is going to be a lot of porting effort with no improvement in the model.
It is another language with the same basic problems of SQF, an otherwise unsupported language with a poor performance lifecycle and no tooling.
X39 what does your script exactly do
i might be able to provide a fairly simple SQF->Enscript tool
even though BI does not have such a utility, i doubt that most commands used do not have such capabilities
sleep _this not _delaT
X39 what does the first two lines do in your script, don't really understand
@ruby turtle exactly what you want if you put it into initPlayerLocal.sqf
okey xD
if you do not understand a command, check out the wiki page or get into more detail ๐
@errant jasper mhh? it is
ahhh
wait
fuck
i see now ๐คฆ
syntax I mean. _deltaT = 200 - time. What does this do?
Don't worry, we all do it.
@ruby turtle fixed a tiny little error ๐
when I exec a script trough initplayerlocal in a seperate .sqf it still stay local?
I meant does the locality change when i exec a script in a script of a script?
when i exec a script in a script of a script do what now?
uhm ...
@ruby turtle
//Assign a variable a value
<variable> = <value>;
_deltaT = <value>;
//Assign a local variable a value
private _deltaT = <value>;
//Calculate deltaT, see https://community.bistudio.com/wiki/time for more info about time operator
//deltaT being the remaining time to allowDamage false
200 - time```
Scripts don't really have locality. I mean they are always local to the machine they are executing on (I guess you could say). Objects, like vehicle, AI and players have locality.
really need to start writing that damn SQF book ...
but not even the chapter drafting is done yet ๐ฆ
I would just do:
[] spawn {
player allowDamage false;
waitUntil {time > 200};
player allowDamage true;
};```
initPlayerLocal.sqf:
[] execVM "script1.sqf";
script1.sqf:
[] execVM "script2.sqf";
does this still execute local?
Where else would it execute?
As long as you don't remoteExec/publicVariable everything is local
@errant jasper hah ... theoretically, that is the more simple and easier to understand code .. though ... my approach is more clear technically ๐
same with initServer in this example everything is execute on server?
initServer only runs on the server
and as every script runs locally
and this only runs on the server...
My question just was, if arma knows when a script in a script in a script based on initplayerLocal still knows that it was local. but thanks for the answer :=)
https://community.bistudio.com/wiki/Event_Scripts Here. More to read up on that
if arma knows when a script in a script in a script based on initplayerLocal still knows that it was local no it doesn't
@queen cargo perfect time to have a book when no more updates or fixes are expected that could alter or change functionality, but at the same time pointless for a dying title that soon will be played by 3 people and their dog
doubt we will see arma 4 that soon
if the whole thing gets done before end of 2018, it actually can help loads of ppl
is it going to be arma 4 even?
you do not let a brand die for no reason @peak plover
Doesnโt matter, sqf will die just like sqs once did and if enforce is as fast as they claim it to be who would need sqf ever again?
Maybe like
Arma BLUE
or whatever
It doesn't have to be a higher number
Doesn't even need a number
ArmA - Live Service
@tough abyss so what? you still will have plenty of people till then learning SQF
i also did not stopped developing my sqfvm just because arma 4 might come at some point
ArmaSoft, ArmaOrigin, DeArma, Good 'ol Arma
Wouldn't mind if they've switched it to C#
I hope the community DLC bring new game modes in 'tho
also, arma 4 will need to have most features arma 3 has nowadays
which is ... quite hard to do if one looks at how long it took em
thus either they release without stuff like the radar things etc. or they wait till they have that implemented too
thing is: either they underdeliver, or they take their time
yeah, that's why having a great platform is good
and looking at how long it took communities to just switch to arma 3 from arma 2 ...
underdeliver
SQF will be with us a long time
So if you add stuff like bipods you can use them for a while
omg. made my day ๐
I think they did great with arma 3 so far
Bipods and stuff were worth the investment in time and will be used for many years
Plus 3den
Zeus
Great things, but I imagine a new game would start without those
now, what if they would launch without all of that into arma 4?
community would outcry like babies on a canibal bbq
The smartest thing in case of at least zeus would be to re-create it, knwoing the shortcomings of the current one. But it's nice no matter what
Yeah
that is why i personally think SQF will stay way longer then some think with us
That's why I'd melt in my chair if they've moved to i.e. C#
documentation wise, enscript looks ok
they will never @formal vigil
problem is: c# is not suited for what arma needs
interesting. please elaborate
all in discord
would require loads of searching
long story short is: serializing stacks is hard
SQF allows to serialize the stack and thus continue with scripts wherever you have been
Enscript also will allow that fairly easy
in C# etc. however, you serialize the objects and stop the whole script execution
sooo ... it mostly is about savestates, code transfer etc.
some things could be solved in C# and i personally think, even the stack saving could be solved ... though ... will require a deep dive into mono, but it is not on us to decide
why mono, tho?
can guarantee ya that BI 100% checked not only once if developing enscript was cheaper then just using an existing one
never worked with .net core
also, mono is open source and has large community which will be vital if you want to actually check stuff like if you can serialize the stack somewhere
.net core is also open source and has a growing community
don't want to sound like I'm arguing about anything
I'm too old for that ๐
๐คท anyways ... SQF sticks with us for a few years
ppl from BI might shine some more light into when we can expect SQF to die out, but doubt we would ever get something like that
seeing how the transition from A2 to A3 worked out, it also will take a year or two until most groups switched the game
and as A4 was not even announced yet, SQF probably will be with us for at least next 4 years
thus: SQF book can still help ppl the next three years
buuut ... that would need that thing to be done in this year ๐
just make a dump of the wiki and sell it as a book ๐
as couple of 1000s pages encyclopedias, FTFY
ha
hahaha
no @halcyon crypt
wut?
let's say I make a mission in the editor
put some stuff on the map: sectors, markers, triggers, etc...
now I want to have that being generated on a blank map by mission code (sqf?) instead
uhm ... why you place it on the map then in the first place?
https://www.wikihow.com/Ask-a-Question-on-Stack-Overflow <-- always good to read
๐ค that link used to be better ..
like, ['myfile.txt'] call exportAllStuffToSqf;
design first
have them pre-located
and then get the positions
but why?
portability
once I'm done with the mission on one map it would be easier to move to another, wouldn't it?
CTRL+C and CTRL+V will help you for that
as alternative, there is also merge
so lemme repeat my question: what is your goal you want to achieve?
oooh this is interesting
my goal is to be able to quickly migrate from one map to another with a mission
A different map?..
Yes
Imagine you're working on Altis with your mission
and suddenly you decide to have the same mission on i.e. Tanoa
That's what I mean by porting to a different map.
yeah, I know
just wanted to avoid it, but guess there's no better way of doing that than using the old and wisdom mr. Copy Paste
there is, also as i said, the option to merge missions
I was thinking more about programistic way, thus was asking for entities dump w/ positions and properties
well, before even that I'll need to sit tonight to my mission and figure out what's causing the problem of not being able to join/rejoin the mission after a while
@formal vigil https://community.bistudio.com/wiki/Eden_Editor:_Custom_Composition
haven't tried this myself, and no idea, if you can save units with it. but the ASL option sounds good.
on current asking in other discord, there is no help.
if (behaviour _grp2 == "COMBAT") then { { doGetOut _X} forEach units _grp2; }
but _grp2 is a spawned group over script with no single unit names. how I can use an array for doGetOut for the whole _grp2?
Biki says behaviour needs to be called on a unit (and returns the status of the group) - https://community.bistudio.com/wiki/behaviour
Also, doGetOut takes an array of units as a parameter - https://community.bistudio.com/wiki/doGetOut
I don't really knows much about scripting... ๐ฆ but an array of units are not possible because the _grp spawned from this:
_grp2 = [[7003.69,5255.72], East, (configfile >> "CfgGroups" >> "east" >> "oksv_army_wood" >> "40th_wood_infantry" >> "40th_platoon_butan")] call BIS_fnc_spawnGroup;
it summarize something of something
thats my current work. but i have no idea how i use _grp2 with doGetOut
doGetOut ("_grp2") won't work.
Well, for starters ("_grp2") isn't even an array, much less an array of units
["_grp2"] ? O.O'y
That is an array of string(s), yes
so I need to use [_grp2]
That would be an array with one group inside
I just need one group at once.
You don't need the group at all. Not for behaviour or doGetOut
You need a single unit from the group, and you need an array of the units in the group, respectively.
it also says type group expected object. it will not work.
but there is no varibale for a single unit of the group.
Because you have to make it
there is a command to get a single unit out of a group
is there no easy way to simply get _grp2 out of a vehicle?
_grp2 leaveVehicle _vehicle;
they just have to leave the vehicle if combat mode changes to combat.
nvm player != unit != AI != banana In ArmA 3 this command will not force a player to exit from a vehicle @meager heart
Could someone help me set up a script? I am trying to get a video to play on multi tv's at the same time. I got it to play on a trigger. it goes full screen. But I want it on the TV's
^ http://killzonekid.com/arma-scripting-tutorials-ogv-to-texture/ - Can likely borrow heavily from there
Dedmen, k, rgr ๐
how i can get a return of a single unit if I spawn a predefined group from cfggroups and the single units have no name?
of a single units behavior
You get an array of units from the group, and then select one
where i can find these special array?
You've already used the command to return the array of units before
you already have it in your code
What did you think the units command does?
I already sent you a link to it's wiki page before.. Here it is again. just read
But as I already said.. Just take the leader
is there a special command to get the leader?
yes
I currently I did this: but I know it is wrong:
behaviour units group _grp2;
if (behaviour units group _grp2 == "COMBAT") then { _grp2 leaveVehicle _veh1;}
Completely wrong yes.. But why are you showing us that?
I have no idea anymore how I realize it correctly
๐ฟ
It's one step closer than behaviour group... maybe
actually, just saw the group group, definitely not closer
It really isn't that hard at all
how?
lets try one more time > https://discordapp.com/channels/105462288051380224/105462984087728128/484421772440240128
If the command to get units is units, what do you think the command to get leader is?
@peak plover we are working on this for more than an hour.. He stopped writing at a different discord and cross-posted to here because I got fed up with the idiocy
leader?
โ
I know I already told you a dozen times atleast. But bookmark this page https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3
_b = behaviour leader _grp2;
or even better, memorize it @still forum
Insane!
@ruby turtle Use a more self explanitory variable name
_behaviour
Unless you are dslycxi there is no reason to use a single letter
Performance tho! But I don't know anyone who cares that much ๐
_superLongVariableNameBecauseINeedToBeSuperSpecificForThisThing
Assuming the group is in that vehicle, that should work
Probably want to end the statement with a semicolon though
it works more or less thanks. leaveVehicle dosnt work in combat siuation. can I use instead this?
if (_b_grp2 == "COMBAT") then { doGetOut [_grp2]};
no
we already talked about why that doesn't work
doGetOut requires an array of units
Let's go back a touch - https://discordapp.com/channels/105462288051380224/105462984087728128/484432373291941910
Hello!
how I get a return of the group units?
_grp2 = [[7003.69,5255.72], East, (configfile >> "CfgGroups" >> "east" >> "oksv_army_wood" >> "40th_wood_infantry" >> "40th_platoon_butan")] call BIS_fnc_spawnGroup; is that you meant`?
blabla forEach units _grp2;?
Do you know what forEach does?
Did someone say recursion?
I don't really understand it
only it returns an array. but cant interpret the thing with _x magic variable
You do not need forEach
Now you are back at where we were 1,5 hours ago
Stop trying to use it
Just a little worse
if (_b_grp2 == "COMBAT") then { doGetOut [_x] units _grp2};
closer
if (_b_grp2 == "COMBAT") then { doGetOut [_x] units group _grp2};
Are you gonna spam every possible combination now and wait till someone says you're right?
in that case read #rules first.
dedmen you didnt help with that...
I didn't help with trying to prevent you from being banned?
We already gave you everything you need.. But okey.. Here we go again
if _grp2 is a Group, and units returns an Array of units within a group. What might you need to do in order to achieve doGetOut <Array of Units within _grp2>?
units?
units command returns an array of units..
And what does doGetOut want as parameter?
(โฏยฐโกยฐ๏ผโฏ๏ธต โปโโป
What do we want? Units! When do we want it? Now!
if(_b_grp2 == "COMBAT") then {
doGetOut (units _grp2);
};
together in that ?! lol....
Btw parenthesis aren't needed here
() instead of []?
To be fair, they aren't needed in 90% of the places that I use them either. Just a habit from one too many array errors
I always put them down when I have binary commands
if (_b_grp2 == "COMBAT") then { doGetOut units _grp2};
but you can stack unary commands as long as you want
finally that?
This is what I wrote when we started an hour ago: ```sqf
private _group2Units = units _grp2;
if (behaviour (_group2Units select 0) == "COMBAT") then { doGetOut _group2Units};
if (behaviour selectRandom _group2Units == "COMBAT") then { doGetOut _group2Units};
๐
so my (Midnights) Version is wrong?
no
For Gods sake dude.. Just read https://discordapp.com/channels/105462288051380224/105462984087728128/484440778785947650
Param 0, default objNull, just in case group is empty
Oh right. Yeah
In this case, the group is created a few lines above this
if (behaviour ([selectRandom _group2Units] param [0, objNull]) == "COMBAT") then { doGetOut _group2Units};
But yes, good idea
And let's not get started on the lack of a for do loop on the ~20 waypoints at the bottom of his script
Yeah better not
someone might get the idea to use call compile format there to get the variables
The parentheses I added was more of a beginner habit I never broke and causes me slight anxiety when I don't lol
just one forEach for those wp's at the bottom, also skills are broken there
nothing wrong with adding parentheses
parentheses are good
makes things a lot more clear
IMO
same with math.. screw precedence, trust parens ๐
mh the AI wont move after being out of the vehicle after attack -.-
exactly ( @still forum )
quick mafs
they all stay in front of the vehicle ramp and let flip it in the air
What?
Do they have any reason why they should be moving?
the are being attacked by infantry and sould form standard formation or something?
they creating a flipping BMP :/
do they shoot at the attacking infantry?
yes of course but still stand still and after the 5th leaving infantry the vehicle starts to flip in the air
You told them they cannot flee
they dont should retreat but should move or soemthign to have hide behind cover
@halcyon crypt Meh, it's one of those things that if I don't need it there i would rather it not exist there. Readability is great, but it makes by brain itch.
Crunch? Like shinrk? How tf does that happen? :D
more like gears doing their things
If you got problems with crunching. I heard mikero can help with that
is what I meant ^^
I'm unfamiliar with this skill of Mikero
never used pboProject?
nope
that explains it ^^
Crunch:
Should be obvious.
packing pbo's with it is called "crunching" and it often throws problems
I think the disableAI pathing is stil active but tried out this:
_b_grp2 = behaviour leader _grp2;
if (_b_grp2 == "COMBAT") then { {_x enableAI "PATH"} forEach units _grp2; };
if (_b_grp2 == "COMBAT") then { doGetOut units _grp2};
_grp2 setFormation "WEDGE";
Yikes, you need some new lines between your brackets. They're all over the place.
how do you mean that?
@high marsh get sqfvm
can now pretty print stuff for ya
I don't see brackets in there. Only parenthesis and curly parenthesis
lol
_b_grp2 = behaviour leader _grp2;
if (_b_grp2 == "COMBAT") then {
{
_x enableAI "PATH";
} forEach units _grp2;
};
if (_b_grp2 == "COMBAT") then {
doGetOut units _grp2;
};
_grp2 setFormation "WEDGE";```
change this anything in execution of my code?
nope
just makes it prettier
@queen cargo I vested time in using your SQF bot before, although at that time it was very limited in features :(
@still forum ๐ ๐ ๐
it still is
pretty printing is not in the actual commandset yet :D
the latest standalone also got released already @high marsh
with fancy features like a debug interface (JSON, no client yet afaik) and stuff like pretty printing files
@queen cargo When my pc works, I will snatch a build and try it out.
I just don't know why the AI still have no pathing, they turning around and fireing on enemy and lying down but cant move a inch
just head to x39.io and then in the navbar projects -> sqf-vm ๐ latest build is always there (including snapshots)
alt probably as you know on the sqf-vm discord
Yep yep, I'll look at it now. For some reason i am not a part of the sqf vm discord. Fixed.
@ruby turtle did you tell them to move somewhere?
AI in combat are really stubborn
I have a suspicion that it's because he's running these checks once right after assigning the waypoints, and never again
But I don't have his entire mission, so...
[_grp2] spawn {
private _group = param [0, grpNull];
waitUntil {
sleep 1;
behaviour (leader _group) == "COMBAT";
};
{
_x enableAI "PATH";
} forEach (units _group);
doGetOut (units _group);
_group setFormation "WEDGE";
};
something along those lines should help you
I think
get it before everyone jumps on it to point out everything that is wrong and what not and confuse you even more ๐
points at wrongness
haha
can be improved, no need to wrap into array and add params @halcyon crypt
just use _this
only thing the params does prevent is if _grp2 was nil
if you pass directly then Arma will error when you try to spawn
silent error*
I'm trying to make a trigger zone to repair wrecked vehicles where they can be ACE repaired afterwards. Specifically on a carrier resupply area. I'm not very proficient with scripting and I've been trying to find whatever I can to mash together code, but best I've managed so far is to make a zone that will damage only the first unit that enters it. It needs to be repeatable and work on a server.
What I have so far, which is the damage first entity script:
Type: None
Activation: Anybody
Activation Type: Present
Condition: this and ((getPos (thisList select 0)) select 2 < 1)
On Activation: {_x setdamage [0.85, false]} foreach thislist;
I honestly have no idea what I'm doing
behaviour can take group argument and will autoextract leader from it
To the wiki!!
No it can but it is limited to object
@tough abyss where did you get your infomation from?
I cannot confirm that using any of my tools
Arma only has a single behaviour command. And that takes object and returns string
Although behaviour is called on an individual unit, what you are really getting back is the behaviour of that unit's group. Behaviour is a group setting
MadRussian note
that's something different though
better just delete that comment...
setBehaviour takes either, because the argument is ObjectOrGroup behaviour has just Object. If it was ObjectOrGroup it would have worked for both
but it isn't. And it doesn't.
One can always ask for a tweak
maybe > Return the behaviour of a unit > Description: Returns group behaviour mode. ๐ค
(behaviour page ^)
But is that across all games, or just Arma 3?
not sure about minecraft tho ๐
@queen cargo I was avoiding _this on purpose in expectation of comments about using _this
lol
๐
@meager heart minecraft behaviour is arma behaviour on steroids.
in cubism style
@meager heart as far as I remember, even in OFP you could setBehaviour only one unit ๐
we was talking about how to get it with >behaviour and argument has to be unit not a group, but it returns group behaviour... and for setBehaviour you can use both (unit/group)... so maybe change description on behaviour page somehow, to make it clear @winter rose ๐ค
When a vehicle is destroyed, is it still a vehicle, but with a damage of 1, or does it turn into a different class?
@meager heart tests indeed have to be done, and pages to be updated
will do tomorrow hopefully
Also wrecks usually have a damage of 1.. but they don't have to
I've got my zone repairing a vehicle just short of switching to the wreck model, such as when dropping from 100m, but it doesn't do shit if it's already a wreck
correct
you'd have to delete and recreate I think
the wreck model might have some config entry that tells you what the non-wreck class is
getdir unit - pos1 getdir pos2 < 10 and distance2D < 10
sorry, abs(getdir unit - pos1 getdir pos2) < 10
where pos1 the position of your unit and pos 2 the position of the friendly unit that is near
although it's performance intensive too...
you could use findif to see if a friendly player is close before executing any script first to save some fps...
or add a check for a keypress before showing hud and executing code so people only use it when performance isn't a big factor
Does anyone know any cute little tricks using attachTo to make it look like the Liberty is moving/
?
Try cursorObject instead?
Store previous cursorTarget in case current one is null?
๐ค
cursorObject has the same issue as cursorTarget with freelook (doesn't work unless moving)
if (freeLook) then {/* update position/change alpha */};
```maybe
Is there any way to close the game vรญa scriptยฟ?
Sure, make an extension that would kill your game process when you call it
Yes, if it is a server you can shutdown with server command
Can try hacking UI then
I already did
disableserialization;
uiNamespace setVariable ["EXITPLS",""];
(findDisplay 6600) closeDisplay 0;
[] spawn {ctrlActivate ((findDisplay 0) displayCtrl 106);};
This closes the game from main menu
taken from Desolation
dunno why XD
but doesnt work inside a mission
or editor
Then hack UI to drop to the main menu first
Execute some command to crash the game?
You could createVehicleLocal "access" before, but I think its been patched out
I have an agent in a car. I'd like to tell him to move to point X. Is setDestination enough or do I need to issue doMove after?
createVehicleLocal "access" ?? @meager granite
and btw what command does insta-crash the game?
if you want to be a dick, you can send the player into the stratosphere. If the player is running the 32 bit executable then the game will simply crash with out of memeory. But if that player is running the 64 bit executable....
Well let's say as long their ram provides.
https://forums.bohemia.net/forums/topic/219104-make-dog-follow-player-help/ Does anyone mind taking a look at that please x
is that dog spawned on a headless clieant or on a dedicated server? (or doesn't it work in sp as well?)
just a heads up, dogs are weird things in arma, I have not managed to make them work on a dedicated server or headless client. Seems the machine contorlling them needs an interface
its nnoying cause i looked at other dog scripts that work but cant get it working onmine
oh first of you do not need such a complicated random function, digs have a random class
if(_type == "random") then {
if(floor (random 2) == 0) then {
_type = "Alsatian_Random_F";
}else{
_type = "Fin_random_F";
};
};
pretty much, unless you want it weighted
I take it the dog just stands around? IIRC you need to actually apply the walking and running animations for it. doMove and the like will work, but dogs are not units (even when created as unit and not as agent) they are inheriting from class "MAN" and not like units from "CAManBase" as well. thus they are kind of limited
The way I programmed my feral dogs is to send them a doMove command and set the appropriate animation if they are not in the desired animation state.
a loop like youhave right now is needed as it is the base logic of your dog. You also should not set the animation again and again, your best option is to safe the currently applied animation onto the dog object with setVariable. then you can check if the dog is in another animation state and then apply the new desired animation
btw animationStatedoes not work on dogs, thus you need to manually document the current state
go ahead
_type is not defined,it was part of my example becaus ei copy pasted a code snippet of mine
the whole if(_type == "random") then { can be dropped
ah ok xd
stupid me
// Spawn dog
_dog = createAgent ["Fin_random_F", getPos player, [], 5, "CAN_COLLIDE"];
// Disable animal behaviour
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
// Following loop
0 = [_dog] spawn {
params ["_dog"];
// Force dog to sprint
_dog playMove "Dog_Sprint";
while {alive _dog} do
{
_dog moveTo getPos player;
sleep 0.5;
};
};
thats on the BI Wiki but doesnt seem to work
NVM it does
the important part in this snippet is _dog playMove "Dog_Sprint";
without it the dog will either stand around or do one set of animation that you do not want
if ((_Dog distance2D playableUnits) < 10) then
{
if (weapons player != []) then
{
_Dog playMove "Dog_Idle_Bark";
};
};
will that get the dog to stop if the player has a gun
?
No, playbaleUnits is an array for one.
{
if ((_Dog distance2D playableUnits) < 10) then
{
if (weapons player != []) then
{
_Dog playMove "Dog_Idle_Bark";
};
};
} foreach allUnits;
Weapons player returns all the weapons a unit has. So the unit would need to drop all weapons I their inventory
i tried a foreach but doesnt seem to work either
Yeah because replace playbaleUnits with _x
the other way i thourght of is
to list an array of all weapons in the game and count them
is there a way to do that?
if ((count (nearestObjects [_dog,
[
"" // CfgWeapons master class?
], 10])) > 0) then
Weapons aren't objects
sorry
is it an entity?
if ((count (nearEntities [_dog,
[
"" // CfgWeapons master class?
], 10])) > 0) then
private _nearbyWithWeapon = (allUnits inAreaArray [_dog, _range, _range, 0, false, _range]) apply { primaryWeapon _x } select { _x != "" };
if (count _nearbyWithWeapon > 0) then {
// meow
};
probably something like this is what you want
make sure to set _range to whatever (or just replace the 10)
Keep in mind this only checks for primary weapon, if you want to check if theres anything in inventory, or also include weapons stored on the ground and so it changes
There's no direct way to just detect "weapons" in arma
exact code?
_dog = createAgent ["Alsatian_Random_F", getPos player, [], 5, "CAN_COLLIDE"];
private _nearbyWithWeapon = (allUnits inAreaArray [_dog, 10, 10, 0, false, 10]) apply { primaryWeapon _x } select { _x != "" };
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
0 = [_dog] spawn {
params ["_dog"];
_dog playMove "Dog_Run";
while {alive _dog} do
{
_dog moveTo getPos player;
sleep 1;
if (count _nearbyWithWeapon > 0) then {
playSound3D ["A3\Sounds_F\sfx\blip1.wav", _Dog, true, _Dog, 7, 1, 50];
_Dog playMoveNow "Dog_Idle_Bark";
};
};
};
use code block
```sqf
add another ```
at the end
_dog = createAgent ["Alsatian_Random_F", getPos player, [], 5, "CAN_COLLIDE"];
private _nearbyWithWeapon = (allUnits inAreaArray [_dog, 10, 10, 0, false, 10]) apply { primaryWeapon _x } select { _x != "" };
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
0 = [_dog] spawn {
params ["_dog"];
_dog playMove "Dog_Run";
while {alive _dog} do
{
_dog moveTo getPos player;
sleep 1;
if (count _nearbyWithWeapon > 0) then {
playSound3D ["A3\Sounds_F\sfx\blip1.wav", _Dog, true, _Dog, 7, 1, 50];
_Dog playMoveNow "Dog_Idle_Bark";
};
};
}; ```
there u go Xd
Well for starters you're not passing _nearbyWithWeapon as an argument in your spawn
plus..... you'r eonly detecting if theres nearby units once, i expect you want that WITHIN the while
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
0 = [_dog] spawn {
params ["_dog"];
_dog playMove "Dog_Run";
while {alive _dog} do
{
_nearbyWithWeapon = (allUnits inAreaArray [_dog, 10, 10, 0, false, 10]) apply { primaryWeapon _x } select { _x != "" };
_dog moveTo getPos player;
sleep 1;
if (count _nearbyWithWeapon > 0) then {
playSound3D ["A3\Sounds_F\sfx\blip1.wav", _Dog, true, _Dog, 7, 1, 50];
_Dog playMoveNow "Dog_Idle_Bark";
};
};
};```
playSound3D ["A3\Sounds_F\sfx\blip1.wav", _Dog, true, _Dog, 7, 1, 50];
pointer ๐
soundposition is supposed to be positionASL (which is an array), but you give it _dog (which is an object)
playSound3D ["A3\Sounds_F\sfx\blip1.wav", _Dog, true, getPosASL _Dog, 7, 1, 50];
ok i changed it to playSound3D ["A3\Sounds_F\sfx\blip1.wav", _Dog] for now and will look into more later - however i still the array/object erro
eh my dad, i got the inareaarray from a function in which i tranform object to position, didnt realize it only accepts position
_nearbyWithWeapon = (allUnits inAreaArray [ASLtoAGL getPosASL _dog, 10, 10, 0, false, 10]) apply { primaryWeapon _x } select { _x != "" };
if you don't ever expect to the over water, just replace the ASLtoAGL getPosASL by getPosATL
@minor lance preprocessFile a script file with a non-existent #include is probably the easiest method. But you need to have that script file in your mission then
But in the error text, it appears the name of the script, and the route
so players can remove the addon and problem solved ๐
just spawn lots of while true
Ah yeah...
private _this = {
while {true} do {
_this spawn _this;
};
};
_this spawn _this;
I also believe the game crashes in some weird cases in combination with ctrlDelete and missing return somewhere
uh
ctrl stuff is very flaky yeah. Also UI eventhandlers. Clear all eventhandlers inside a eventhandler, and if there are still eventhandlers after yours Arma tries to execute the just deleted eventhandler
unless that's fixed now, but unlikely, can't remember the exact case though and too lazy to look it up, but its a bug i came across and after a while i found out that it happens when you don't have a return in a specific function
I reported it 2 years ago. Didn't hear of any fix
Yeah it's with a eventHandler, and then if you do ctrlDelete there and don't return a handled, it'll keep trying to run the EH with on the deleted crtl and crash
something like that
private _this = {
while {true} do {
_this spawn _this;
};
};
_this spawn _this;
doesnt work
I just need to crash the game when entered eden editor
the include works
but it says the path
... why
Why does that not work tho ๐ค
Well... Just use this then ๐
_this = {isNil _this;};
isNil _this;
huh :U
well
Why would you want to crash eden though?
not working when executing
but yes in variable visor
I have some easter eggs on my map and i want players to play blind
not to see the map
i wonder if hideObject works then
cleaner solution tbh
just hide your easter eggs when someone loads into eden
yes i know, but you can hide terrain objects though right?
Why not just remove the 3DEN button from main menu then ๐
0 spawn {
{_x closeDisplay 1} forEach (allDisplays - [allDisplays param [0, displayNull]]);
ctrlActivate ((finddisplay 0) displayctrl 102);
(finddisplay 3) closeDisplay 2;
ctrlActivate ((finddisplay 0) displayctrl 106);
};
```๐ค
ah ye thats the exit game one ๐
lets see
i think you should just hide the objects if possible in 3den
and im pretty sure it is possible, you can detect terrain objects fine in it at least
I know, but i have some places in my map
not objects
like fields with caves, etc
i just want them to play blind
doesnt work @meager heart
well it does, but not for the host/admin without "continue button" in debriefing screen ๐
oh
well allDisplays do not includes eden idds
and maybe you can just close the eden ? or you really need close the game ?
eden is idd 313
that will close all IGUI stuff {_x closeDisplay 1} forEach (uiNamespace getVariable ["IGUI_displays", []]);
nothing happens
lol
grab from that what you need
you can close eden by activating the exit buttons
you just need to figure out what the IDCs for the buttons is
you can also adopt that, to just make it reload into Virtual Reality whenever someone loads into your terrain
up to line 28 or so
But they can change to my terrain then
yes, but when they load in your terrain they'll instantly be swapped to another terrain ๐
I can do do3DENAction "Exit3DEN";
and figure out with button is the Yes button of the prompt dialog
btw tried that > https://discordapp.com/channels/105462288051380224/105462984087728128/484679437787463681 in the eden debug console (tools>debug console) and it works
to make it a bit cleared and 'user friendly' you could also set the text in that dialog and disable the no button
YOu execute and it closes the game?
yeah
not for me ๐ฆ
Does nothing D:
whyy
WTF is happening to my game XD
๐ฉ
Also if I put the function as PreInit, it executes in the mainmenu as there is a mission there XD
mmmm
gonna try something
even making a execvm with a included file is not working wtf
is there any way I can set the text in the debuf console in 3den?
in the variable viewer
How are you actually executing your code?
just debug console local exec? Or functions? If functions, make sure you do with uiNamespace, because missionNamespace doesnt exist when you load into eden the first time
percussive debugging
omg Im doing diag_log and its not doing it either XD
if I just put an execVM with an include works
When using animateSource, only the given animation is played. For example _badger animateSource ["showCamonetTurret", 1] shows only the camonet on the turret whereas it is supposed to also show the part of the net on the front part of the cannon. It is defined in config as forceAnimate[] = {"showCamonetCannon",1};. However, using Eden and clicking the box to show camonet on the vehicle make it appears normally. Is there a way to reproduce the behaviour of Eden, and also show the cannon camonet when asking for the turret camonet ?
@vernal mural have you already tried using export button in virtual garage?
_veh = createVehicle ["LM_MARSHALL",position player,[],0,"NONE"];
[
_veh,
["altis",1],
["showBags",0,"showCamonetHull",0,"showCamonetTurret",1,"showSLATHull",0,"showSLATTurret",0]
] call BIS_fnc_initVehicle;
only turret seems to be called, but with another function
it's probably this function that extract the anim data
Yeah this is it private _forceAnimate = getArray(_cfgAnimationSources >> _source >> "forceAnimate");
how do you delete a dog in script. i have deleteVehicle _dog; Im trying to do it in an addAction
_range = 3;
_dog setVariable ["BIS_fnc_animalBehaviour_disable", true];
_DogOut = 0;
player addAction ["Put Away Police Dog", "deleteVehicle _dog; player removeAction 0;"];```
firstly, params uses an array of string as an argument. And secondly, no, you need your action code to know what object is _dog, because even if it is defined in your script, it is not defined in the scope in which the action code is executed. Look at the addAction doc I've pasted the link. What you need is the "arguments" part.
So yesterday i installed VCOM AI & want to know what AI are being used (VCOM or Default) ones, any command that could help me out?
Really easy way to check is VCOM groups are always in Combat mode.
are always in Combat mode ==> which is painful, in terms of performances
That's the cost of checking more things all the time, I suppose.
So i installed again and in addon configuration window i dont see it. :/
Are you using mod version or script?
mod i guess? of steam workshop, by installing i meant i subscribed to it https://steamcommunity.com/workshop/filedetails/?id=721359761
Ok. Are you launching the game with it active?
yes i can see in mod section with checkmark
Try going into Editor then Functions Viewer and see if you can find the VCOM functions https://github.com/genesis92x/VcomAI-3.0/blob/master/Vcom/cfgFunctions.hpp
nothing that would be named vcom
there was VCM_Core_Initialization,VCMFnc idk if they are part of vcom
Yeah, if you look at the github link all the VCOM functions are vcm_fnc.
So it's loaded. You're still not seeing any AI behaviour change?
Is there a way to manipulate the turret of a vehicle with script command ? The animateSource doc page seems to imply that it's possible, but no success until now. None of the animationSources are able to control the turret of a vehicle, apparently
(the vehicle being a marshall)
Animation has to be defined in config for the command to work, Marshall doesn't have any
And Arma being Arma there is no command specifially to aim turrets
Sad. And I assume that there is no way to create a complementary addon and define those animations ? It is probably defined in P3D ?
Should be possible with addon, just add AnimationSources for turret similar to UGV
mh, looks hard to do
Its actually very easy, selection and source names are probably identical so its mostly copy-paste.
Yeah probably, I've found this
https://community.bistudio.com/wiki/Model_Config#Animation_sources
But I still don't understand how all that work ^^'
is there a way to influence by script or config on vehicles variables ? Like engine temperature, for example ?
@vernal mural setVehicleTIPars
anyone knows if BIS_fnc_taskCreate is global and i only need to set them on server?
basically any of the task functions
owner: Boolean, Object, Group, Side or Array - Task owner(s)
True might equal global? Would be my guess
it's global
better option > bis_fnc_setTask
BIS_fnc_taskCreate calls BIS_fnc_setTask though
with global being set as true ๐
yeah BIS_fnc_taskCreate > https://pastebin.com/xKX8SsLg
afaik most of those "tasks" functions is just bis_fnc_setTask with different params ๐คท
as long it is global and jip compatible i cannot complain honestly
How do you guys check if something is not? if (!something) or if !(something)
both are valid
first check if !something is true, second check if something is false
I use the first.. That way you don't get any precedence problems
with "first" I mean the ! outside of the ()
I'm pretty sure (but can't test) that something like ```sqf
if (!1 == _num) then {_code};
yeah exactly
you actually could test
using sqf-vm โค
I did, but I'd still like to test in-game before stating it as fact lol
of course, ! is a boolean operator, negating a number makes no sense. Need more ( ) or place the ! outside
I'm going through somebody else code. editor spits expected '(' if it's if !(something) but if i swith to if(!something) error goes away but that way logic changes?
depends on something I guess ?
how performance friendly is unitplay unitcapture?
@tough abyss thanks. This can influence on temperature of given parts of the vehicle. Is there similar commands for other variables, such as the ampere meter or the volt meter which seems to be functionnal on some vehicles ?
can you record a path with unitcapture and use with other starting positions?
like recording the path of a flying bomber and then using it for dynamically spawned bombers in different directions
@bright shore what editor are you using? if does not requires parenthesis in arma
@obsidian kiln I don't think so. Those commands are "dumb", only reminding the position and attitude of a unit at a given moment. It d'ont even switch on the engine, you have to do it manually
if your linter complaints, raise an issue at whoever created it (this part is important) and to fix it just add an outter () around
ah that's a pity, i thought it recorded paths and input, but if it records positions it probably doesn't work
adding additional () will not affect your performance in any meaningfull way
_res = ((((((((((1 + 1)))))))))); // Same speed in execution as
_res = 1 + 1; // This here```
@obsidian kiln if it's for a simple mutli bomber script, simply dynamically placing waypoints should be enough ?
yes i think just addwaypoints is the way to go
TypeSqf @queen cargo
as said: raise an issue ( http://typesqf.no-ip.org/development )
and to fix your problem: if (!(something))
Why if I do [] execVM "\testaddon\x.sqf"; x.sqf file contains ```#include "
[Error Reborn]
"```
It does nothing ๐ฆ
Because include copies the contents of the file, I don't know what you want it to do.
crash the game
You want it to crash the game???
But, why?
Why.....
Weird things
hahaha
The thing is if I do the include inside my function with the preinit = 1, the game crashes when loading the mainmenu and never start
i I use some Ifs and the the execVM never gets executed
@high marsh Again. Answer is up there
why execVM?
I thought I told you to use preprocessFile
is there a non 3d / position sound playing command that uses filepaths? i feel like im blind
or maybe i'm just drunk
Okay, I understand the reason. But, it's just very weird in my mind.
Yeah same.. As I also already said I'd just remove the 3DEN button from main menu
something about a launch option bypassing this?
Adanteh, createSoundSource ?
oh nvm... non 3d...
just playSound maybe
there is more > https://community.bistudio.com/wiki/Description.ext#CfgSounds
@high marsh Yep, @still forum Not working either
Should i use [] call compile preprocessFileยฟ?
That doesn't make any sense
why not?
because you can't call a string
@austere granite Look at this ```sqf
_path = format ["\addon_path%1.ogg", _soundname];
playSound3D [_path, player, false, getPosASL player, 5, 1, 10];
ah srry
findDisplay 313 closeDisplay 1;
```edited*
lets see
Why waitUntil? it should already know at preInit if it's 3den
hahaha yep forgot
i guess that mean... nope ? ๐
I was eating something im back and gonna test
๐ Yum.
not working
does nothing ๐ฆ
๐ฆ
Whats the param that inits the function before the mission
preinit right?
pregame is just after addon loading right?
functions are always initialized before the mission
aka before preInit
pregame doesn't exist
prestart*
And does not work
in main menu and eden mission
none of them are closed when loading
if I try
IThe game closes with include error (The error I want now as no one is working for me)
with (uiNamespace) do { wtf?
_nil = wtf?
preprocessFile preprocessFile wtf?
add a diag_log in your script and check what is3DEN is
if there are no logs showing.. Then it's not the code's fault that it's not working
I dont know whats happening