there is the sqf blog thingy that I tried to start.. https://sqf.arma3.io it's OS on github and anyone can create posts, but noone cares ^^
Carefully and biologically produced Arma 3 sqf training site
1 messages · Page 544 of 1
there is the sqf blog thingy that I tried to start.. https://sqf.arma3.io it's OS on github and anyone can create posts, but noone cares ^^
Carefully and biologically produced Arma 3 sqf training site
if only BIS add antialiasing in to the configurable state, just like every other setting
I wish we had a podcast.
I mean, even the MUD (Multi User Dungeon) dev community has a damn podcast / blogs.
KK’s blog has tonnes of outdated information and there hasn’t been a new post in years
Yeah, KK was around for a long time.
I am for certain going to start one. I would like to challenge you all to doing similar community related activity's, maybe we can organize a podcast too. Breathe some more positive life into the Arma scripting / dev community and show the folks it's not all IP violations and life servers!
and there hasn’t been a new post in years
wrong
last post was a bit over 2 months ago
like the outdated info is a big problem for arma 3
yeah..
It's terrible constantly having to explain the same stuff to people that they saw on some outdated blogpost
Well, to be fair.
I think people should be able to look at a script / mod / blog post date and ask.
"This is from 2016... I wonder if I should really trust this is bullet proof information."
That’s why you bookmark last changes page on wiki and keep track of new addition, wiki is updated regularly so it has all the juice
How much is actually outdated in the sense that it causes problems rather than is simply not the most nice way to solve the same problem?
How about just test
Depends
There just aren't that many SQF basics tutorials. Sure the wiki has all the info, but most people are simply not able to learn without getting everything served on a silver plate step by step
^
They don't want to learn the thought process.
They want to learn just the line of text to do _x
For example there is soon obsolete page about mission root on KK’s blog
I ran into that just the other day.
Trying to understand that mission root, starts at mpmissions
So if your folder is mpmissions/sub/mission.map
your root path is mpmission/sub/mission.map
Not starting at the mission folder itself.
Unless however, you pack it.
Then I belive it's root at the pbo level
There is new command on dev you can play with it getMissionPath
Nice.
I think UI stuff there is still good but it also had a lot of nice commands added
But probably good to start with
UI stuff could ALWAYS use more tutorials I think.
Really it can be pretty overwhelming.
^^^sound like you got your first topics sorted out 😉
True I didn’t know where to start when I wanted to make my first UI
Haha, I think Im going to back pedal
And focus on mission design, and balance, from a game design point of view.
"How to make balanced, realistic, missions - A Guide to planning"
Then once I touch on that, go through the step by steps of implementing that plan.
Im pretty verbose, so it may not be everyones cup of tea, but 🤷
Well if anyone wants their post on https://sqf.arma3.io then.. PR's are open https://github.com/arma3/arma3.github.io
Wanted to make a open source blog where anyone can always maintain old posts even if the author is gone or too busy (see KK's blog)
HAHAHA! Now dedmen just needs to get some good writing skills.
Oh yeah.. And help fix up the writing/layout of people how don't have the skillz for that
It uses same stuff as ACE wiki, but without the good design
Design looks ok to me, simple and clean xD
If you have any particular changes in mind I might try to find time to do them.
If you ask me about design things, this is what you get https://s.sqf.ovh/firefox_2019-08-07_21-03-18.png
👀
I love how the server control is a wheel chair.
That server is ADA ceritfied bois.
Nice.
Does anyone know of a command i can use to give random rotation to a object as it tumbles through the air?
physx object?
Object has a geolod, i can give it a geophys lod if needed
addForce/addTorque/setVectorDirAndUp/random
important part is it's simulation type, not what lods it has
currently inheriting from Items_base_F
h0t
Items_base sounds like non physx to me
just change simulation to thingx ^^
simulation
inheritance just inherits config entries
simulation entry controls the simulation type
no matter if you inherit a class with a different type or just change the type manually
Okay wasnt aware there was one for thingx, just entered the oen for helicopters to see what would happen >.>
Will change to thingx once it packs
@still forum what about a wiki for your script library site?
if you mean wiki as seperate wiki then prolly no.
If you mean wiki page for it then maybe once it's more useful and has some useful information.
If you mean copying articles to biki, then yes, someday I hope?
Ah....
Then I'd have to setup wiki software and stuff. This stuff is hosted directly on github.
maybe we could store it on the wiki, idk
with a template "this script/function was valid and last updated on arma 3 v1.60"
with the introduction of isGameFocused, maaaybe we could see remoteExec work properly for alt-tabbed peeps?
why it no worky?
it seems that when a game is alt-tabbed, remoteExec sent to your game fall into the void
interesting.... that sounds like a bug
I didn't experience/confirm it myself, but I got it from quite some peeps
So your saying if my remoteExec calls fail, and things to work for people.
Tell them to stop alt-tabbing!
I didn't get the first sentence, but sure will! 😄
@still forum Is it possible to make a condition (leader player == player) && "something that checks if there is at least more than 1 player in his group?"
or 1 unit, dosent matter
@vague harness sqf leader player == player && count units group player > 1
@winter rose GREAT! thanks
@winter rose need repro. AFAIK fps drops on alt tab but it should not affect remote exec
should not, yep
why do you think it is
heard it from 3-4 different people
Is there a way to print or see a output of a module when it fires off?
Like so you can see a full function defined as they fire.
Or maybe catch the code as it's being defined when you start the mission?
Just tested and it executes fine. But as I said FPS is lowered so maybe if you are afk for long you get things accumulated
Does anyone know how to change the banners on the Tanoa blue Cornershop
@tough abyss oh, so no issue then. Thanks for testing, I was about to investigate to add it to the wiki
Nvm i found a way to make it work even though my code just doubled in size.
is it possible to somehow selectively turn off spatial & env sounds ? I want to turn off , all spatial sounds and maybe leave only the winds when very high up (like on a mountain)? enableEnvironment [ambientLife, ambientSound] turns it ALL off
Anyone have experience with ACRE2 mission setup scripts? Executes but the channels are not setting up, just reverts to a one channel setup with no other channels.
is there away for a script to tell if its being ran in scheduled or unscheduled
would canSuspend be a reliable way?
@edgy dune I haven't personally used canSuspend but I would assume that is a fine way for the script to tell if it is scheduled or not
okay, ill try it out, hopefully no issues
Let's say you add a Killed event handler to a player. What happens to EH when the player respawns? I guess I'd need to attach it again since player "becomes" a new object.
Respawn is weird, it keeps some stuff from old player so you better test it
@edgy dune yes canSuspend is the way to check if scheduled. as you can only suspend in scheduled
iirc, all event handlers are carried over respawn.
I noticed something I assume to be a bug, with the animation eventhandlers (AnimChanged, AnimDone, AnimStateChanged) they do not fire when switching weapons, despite animationState showing that the animation has changed. moving ofcourse has it fire
I noticed the same thing, must be a sepcifc anim set that operates like a state machine rather than a whole new anim.
I guess thats what IK is for
rather annoying as I'm trying to make a light(er) way to check what weapon the AI is using at any given time and don't want to rely on a loop/perframe on currentweapon which is both unreliable and unnecessary..
I am sure the anim ehs will soak up more
really?
I guess they'd fire a lot more often...
potentially
basically I want to run a script only when they are using the rifle animations
Unless the AI don't move for a long time. Guess it depends on how many AI and if you have an HC
Either way, it doesn't fire.
even for players.
Yeah
I do wonder though - in this case I want to monitor a couple things, this goes for players too: 1) they're using the primaryweapon, 2) they're not prone.
I thought AnimDone would be good for this instead of a perframe check which would get expensive for AI
perframe? No, just a waitUntil with some suspension on a loop.
I only ever see use in using perframe for UI updates.
Everything else is too expensivem
mm I guess scheduled could work in this instance, I try to avoid it lately
if you have CBA, then you probably already have a perFrame currentWeapon check that you can just hook into (only for player tho)
10k iterations
nothing
Hmm, so it would act like something you can add to instead of creating new?
with CBA you have the ability to hook into it's eventhandler. and just have one perFrame handler constantly checking. Instead of a dozen mods doing their own checking
I dont use loops unscheduled if I need that sort of thing I use a perFrame handler, and delay it depending on how oftne its needed
and yeah CBA
well sorry thats a lie I do use loops but I dont mean like while (true) infinite ones
:O
but yeah currentweapon for the player is a piece of cake, and yeah do have one available but want it for the AI too but too many AI and it's gonna be way too much script overhead so I'm trying to think of a very low intensity way of handling it
I guess just using animDone and forget about the weapon switch as it's gonna change animation the moment they turn or do virtually anything
and fire it
just for confirmation, but does the init field code get run again for a JIP player?
like, for all entities?
so if someone puts "this setDamage 0.5" to mimic unit's damage at the beginning of the mission, if someone disconnects and reconnects, everyone will get damaged again even if they healed in the meantime (aG, eG)
Yes
When the arsenal just came out, people would copy paste the arsenal export code into the initline, then wonder why their gear got refreshed every so often
do you need the defines.hpp file for dialogs?
@still forum @nimble hill thank you for confirming; I will add this to JIP information.
@silent latch you don't need anything for dialogs. You can make everything from scratch. If you want to inherit/import something else, then you gotta do that ofc
so what is the defines.hpp for
cus i see mission files with no defines.hpp
and have like 10 dialogs
well it might be in mods, or other/folder/rabbit.hpp for example
like say i want to make 2 dialogs do i need the defines for both dialogs no defines at all or how does this whole thing work
it's just a text file that get's copy pasted into the config ¯_(ツ)_/¯
if you want to use the stuff in whatever defines.hpp contains, then you need it. otherwise you don't
Hello, how could i disable the default display when pressing ESC, and set my own dialog?
assign KeyDown EH to Esc key and override it by returning true while opening your dialog
can i make a dialog with a listbox and buttons without it?
yes
you just need to define all params in your dialog config
and how does one do that @tough abyss
param = value
@silent latch https://community.bistudio.com/wiki/Category:Dialogs Select the specific dialog type you wish to use and use those params
Is there an easy way to get a position of a unit inside a vehicle. Like the actual world position or a position relative to the vehicle itself?
Just found this https://sqfbin.com/ a SQF pastebin 🤔 that's neat
https://sqfbin.com/equveluhosinuquqijur
welll .. relative ...
requires ajax.googleapis.com (JQuery) for stuff to load proper
So, for markers you can look up a named editor placed marker, or any marker, if you know the string name of the marker.
'mar_01'
If I have unit's, editor placed, with var names.
man_01, man_02
I would like to iterate over them.
for all units
_prefix = [_x] parseVarName
switch (_prefix)
So in the editor I could name things.
Such as EQUIP_01
HVT_01
And the framework would handle named things how I want.
iterate over https://community.bistudio.com/wiki/allUnits and get their varname using https://community.bistudio.com/wiki/vehicleVarName ?
don't forget to name your units
In the name vield itself you mean?
yes, else you will end up with empty string
anyone have a portfolio I can look at for inspiration?
a… portfolio? like a mission depot?
@rough coyote https://steamcommunity.com/id/loumontana/myworkshopfiles/?appid=107410 mine
thanks man 😃
Hey, so I am looking into. profileNamespace.
My goal is to be able to setup some unit info for folks upon joining a mission, and save that info to the profile namespace so that come next mission they have it.
Things like, intel documents they have gathered, etc.
I don't expect the amount of info to be allot.
What I am wondering, is what variables exist already for me to use as well.
Such as idenity, face, name, etc.
Can I get to those settings for the profile as well?
The slow deletion in the other channel was hilarious (gotta love wrong channel posting by accident)
.
You can use allVariables on that namespace to see what's there: https://community.bistudio.com/wiki/allVariables
Oh, yeah
I will have to test it.
I don't think it's going to let me call that on a player on join tho.
Not at all. I'm saying if you want info on what's in the namespace, that's how you can see.
"The variables are loaded when the user profile is loaded or changed."
Well poo. That kind of kills that idea.
I guess I'm not quite understanding. You can still set and get variables from there.
I don't think I can get and set them on a remote client during a mission however.
I could do it for the userProfile for the server, but I don't see a way to get to a players user profile.
remoteExec?
I am gonna try it.
Strongly recommend not to use setUnitLoadout in MP
because it has some bugs
In fact it has a nasty backpack bug that makes dropped backpacks unusable. So I highly doubt that "ACE uses therefore there are no issues with that" is a good argument
Never seen said issue. 🤷
Well, enjoy yourself then https://www.youtube.com/watch?v=Rx_e_5aRPQk
Epoch mod has been using setUnitLoadout for quite a while in MP with no issues reported
I personally reproed the bug in the video
IIRC, Exile uses it too
it is 100% reproduceable and if you think that having different content in different instances of backpack is a "no issue" then I'm afraid we have to agree to disagree
whats more if you drop this backpack it remains desynced
Never seen that issue personally. Assume you have reported to BI
Note that, for example, Epoch is regularly running getUnitLoadOut in order to correctly save a player's inventory in order to reload the inventory via setUnitLoadOut when the player logs back in
I remember the locality issues people had with misuse of the local inventory modification commands before we got the global ones (somepoint in A2 I believe)... Is this a new one??? So the server will prevent you from adding fully to the backpack at some point because it thinks it is already full ?
I've only used get/set paired or a config with setUnitLoadout, but not noticed those issues (unless they were recently introduced). Is there an issue opened on the Feedback Tracker for this so we can follow?
_marker = "marker_test"
_color = markerColor _marker;
_newText = "";
_newColor = "";
switch (_color) do {
case "ColorGreen": {
_newText = "Fermé";
_newColor = "ColorRed";
};
case "ColorRed": {
_newText = "Ouvert";
_newColor = "ColorGreen";
};
default {
_newText = "Une erreur est survenue";
_newColor = "ColorOrange";
};
};
_marker setMarkerText _newText;
_marker setMarkerColor _newColor;
Why my marker change only one time :/
just reproduced it.. same desync.. other players can pick the backpack up and see the "missing" magazines.
@stable badger You are going to need to give some more context... If you only run the code once you of course only get one color change... If you run it multiple times it depends..... But say your initial color is neither green nor red... Then it will become Orange... Next time you run it, it is still not red or green, so it "becomes" orange again.
HUmmm, sorry, so I've a marker on my map in my SQM, and I wan when I do an action on my Addaction change my marker by a newText and a NewColor only if my marker has the text in Fermé the new will be Ouvert (Close and Open in english) and same
It does not turn Red again the second time you run the action?
If my marker is red it do turn Green but it's do nothin
But it would be closed when red.
Just tested it here and seems to work fine.
Green -> Red -> Green -> Red
Red -> Green -> Red -> Green
Pink -> Orange -> Orange -> Orange
Okey now it's working just an error in my first line
Now i want try to add a _state switch On :p
I'm trying to set up a whitelist script for my server, but I'm having trouble with the server event handlers
In server.cfg I have
onUserConnected = "_this execVM '\Whitelist\whitelist.sqf';";
And the error I'm getting on the server is
Error position: <execVM '\Whitelist\whitelist.sqf';>
Error Missing ;
Error in expression <this execVM '\Whitelist\whitelist.sqf';>
Error position: <execVM '\Whitelist\whitelist.sqf';>
Error Missing ;
Unsupported language English in stringtable ```
I tried without execVM and just putting the script straight into the line but I got the same error.
Try without the first backslash and stop using execVM learn to use the function library.
Back slash isn't the problem and like I said I tried without execVM and I'm working in the server VM so I can't exactly easily add functions
You tried without backslash?
Sorry haven’t read server.cfg
Without execVM will result in a error. Because the file itself isn’t quoted sqf code.
Yeah I tried without backslash, didn't fix it and also it's needed so the path directs to the game folder and not anywhere else, tried with forward slashes too
I think the problem might be the ' but I don't know how to get around this
i switched to using {} as the scripting grammar page states is valid for strings but still https://i.imgur.com/IgEpMKI.jpg
Server EHs are as useful as a concrete parachute
And no you can’t run any normal scripts in them, whoever told you that you could is a fool
M242, have you created a ticket of FT regarding the setUnitLoadout issue?
Maybe I did maybe I didn’t, an extra ticket won’t hurt anyone
I need it to work on any mission on the server without having to manually go in and add scripts
Then make server mod
Well if you haven’t, surely it’d be better to submit one rather then just complain that it’s an issue 😃
im trying to make an array for sqf if (1500 < _distance) then { [_source,15] call GiveXP; };
idk how to explain what im trying to do
its annoying
if _source if a player, try to remoteExec it's better i Think 😄
nvm ill figure it out i cant english right now lmfao
I create one with a Txt File 😄
@cold pebble who complains? I said I strongly recommend not to use it in MP, does this look like complain?
Kind've actually
¯_(ツ)_/¯
Legit tho, if you find an issue, why wouldn't you report it?
We can't expect things to get fixed, if it ain't reported?
Can’t expect get things fixed now period
Just trying to use some common sense here 😃
Well you're not even giving it a chance?
Would you give a chance to an empty chair to fix some bugs for you? Because this is what currently programming support for Arma3 looks like
Well thats just silly, yes support has dropped, but stuff still gets fixed, albeit at a slower rate, and some provided by people like dedmen
This is a serious issue, it needs a proper programmer spending hours trying to find the bug. Is it critical? No. Does it cause crash? No. Some didn’t event know the issue existed until I brought it up and were trying to convince me everything is fine. Now what are the chances this get any attention?
Hey M242, that's a pretty neat bug with setUnitLoadout. Thanks for sharing.
You’re welcome
Well 0 chance if you never report it?
so is it actually possible to run scripts on the mission/slotting screen?
I tested a bit around and I think the server thinks you have different magazines. The magIDs from the uniform match, but not from the backpack.
@finite dirge
You can use allVariables on that namespace to see what's there
You can't on profileNamespace in MP.
@tough abyss
because it has some bugs
Have been using it with ACE arsenal for half a year now, never noticed any problems (besides the backpack thing object not found server spam stuff, which BI said they fixed)
I guess that's a new bug then
@tulip kite
i switched to using {} as the scripting grammar page states is valid for strings but still
What? No that's not valid at all, where did it say that?
In server.cfg I have
you can't use execVM in server.cfg, server scripting only has a limited number of commands
It was in the "Scripting Grammar" page on the wiki but it turns out that was actually for sqs
I also stopped using execVM but what little i was using still didn't work
New? Dunno, vid is from February but no one touched inventory for ages
Well 0 chance if you never report it?
It is your chance to be a hero!
It is my understanding to change/customise armour values for clothing/vests you make a config file with your own classes (hence pbo > addon), someone has told me that 'other' servers have made the change without addons but has failed to elaborate on which servers and what method they have used, I am sceptical bit haven't touched scripting/configs in a while, if anyone could shed light on this please 😃
Hey Dedmen, I thought he was asking what was there in general, as in what to expect to be there. MP wouldn't be needed for that I believe.
How do you make an array, im really new to arma coding so please put it simply :P
_arr = [];
!issuewarning @summer pelican crossposting
Done.
Sorry saw one channel before the other
Im creating missions in Eden
and having trouble scripting :/
@still forum apologies
private briefHangar = ["bh_0","bh_1","bh_2","bh_3","bh_4","bh_5"];
system sideChat "Test Array Loaded";
You need a _ on the variable if you want to private it.
You can't private a global variable.
why do you use private if you dont know what it means?
Because thats what the wiki page says to do
where?
Yeah
private global?
_myArray set [1, "z"];
Once again, that's entirely his error.
So like that?
_ says the variable is local (only visible in the current script) vs global (visible from all scripts on your computer)
Oh i see
Ok awesome thx
secondly, is there a way to return units to their previous postions before a trigger was activated
once said trigger is deactivated
Ex: you go through a sim room killing everyone and then when you leave the room resets
onDeactivated statement setPos units back
If you store the original position and setpos after as M242 says, sure!
"units" being the var names?
no being plural noun
private _simRoom1 = ["sim_0","sim_1","sim_2","sim_3","sim_4""sim_5","sim_6",""sim_7","sim_8","sim_9","sim_10","sim_11","sim_12","sim_13","sim_14","sim_15","sim_16","sim_17","sim_18","sim_19","sim_20","sim_21","sim_22","sim_23","sim_24","sim_25"];
I get an "On Activation:"
it doesnt actually say naything thou
That's just an array of strings. What are you trying to do?
create an array
When I press enter thou it gives me an error and wont let me save it
Take a screencap of the error and link it here.
private _simRoom1 = ["sim_0","sim_1","sim_2","sim_3","sim_4""sim_5","sim_6",""sim_7","sim_8","sim_9","sim_10","sim_11","sim_12","sim_13","sim_14","sim_15","sim_16","sim_17","sim_18","sim_19","sim_20","sim_21","sim_22","sim_23","sim_24","sim_25"];
yeah
^ That shows where the error is easily
There are plenty of text editors with SQF support through addons/extensions.
If you want to use a global variable, drop the private and the _.
kk
simRoom1 enableSimulation true;
simRoom1 hideObject false;
Thats for on activation
briefHangar = ["bh_0","bh_1","bh_2","bh_3","bh_4","bh_5"];
simRoom1 = ["sim_0","sim_1","sim_2","sim_3","sim_4""sim_5","sim_6","sim_7","sim_8","sim_9","sim_10","sim_11","sim_12","sim_13","sim_14","sim_15","sim_16","sim_17","sim_18","sim_19","sim_20","sim_21","sim_22","sim_23","sim_24","sim_25"];
system sideChat "Array(s) Loaded";
system sideChat "Load Completed";
thats creating the arrays
its not happy thou
STOP PRIVATE YOUR VARAIABLE
@stable badger don't be that guy
What do you mean "it won't spawn the array"? How are you checking?
by walking into the trigger that is activated by a player
That guy ? Just why make this in private ?
@stable badger what do you mean?
@stable badger Panzer obviously does not know what a private variable is... neither do I so how about you give us a lesson?
Private variables are only visible in a specific script, or function, or Control Structures.
aare you talking about how the bariable are sim_0
so on so fourth
and the "_" is making them not work?
Creating an array doesn't output anything, it's just makes an array, so how are you checking to see if it made this array?
What do you want it to output? Are you seeing the systemChat you put in?
Then it most likely made the arrays.
but why arent they working when I walk into the triggert that says...
What do you expect them to do? It just a list of words.
simRoom1 enableSimulation true;
simRoom1 hideObject false;
all of the sim_0 so on so fourth start with sim disbale and models hidden
That's not how that works.
o?
First off, you passed strings in the array, second off, passing an array doesn't make it run on everything in the array.
That's what loops are for.
do i need to do the forEach thing?
Yep, or count. And if those are all unit names (which are global variables), remove the ".
kk
Just private a variable in a .sqf is obvious
Bastien, you aren't making any sense. I think the language barrier is hitting hard here.
simRoom1 = [sim0,sim1,sim2,sim3,sim4,sim5,sim6,sim7,sim8,sim9,sim10,sim11,sim12,sim13,sim14,sim15,sim16,sim17,sim18,sim19,sim20,sim21,sim22,sim23,sim24,sim25];
system sideChat "Array(s) Loaded";
system sideChat "Load Completed";
then ill add a forEach to the trigger
so how should the code on the trigger look on the activation if I want them to enable simulation and show models on every var in the array "simRoom1"
https://community.bistudio.com/wiki/forEach
I'm not going to write it for you. You have to learn.
fair enough
Plenty of examples on that wiki page though.
Hi, I have been searching for half an hour now... I am making a SC game mode and I need sectors to be capped one after the other, IE locked until the previous is captured. I also would like to have the capture location randomized (preset areas) around the original area of the sector . Can anyone tell me how this is accomplished?
<div id="content">
<div class="search">
<form action="/usercode/file.php?page=2" method="post">
<input type="text" id="keyword" name="keyword" value=''>
<button type="submit">search</button>
</form>
</div>
PHP Notice: Undefined variable: conn in /usercode/file.php on line 32
PHP Fatal error: Call to a member function query() on a non-object in /usercode/file.php on line 32
Who can help me?
how do you create a trigger that randomly selects a variable whioch in turn spawns a group of units along with an objective (task)
better yet, how do you have a trigger affect only synced units
@runic quest try PHP forums
{_x enableSimulationGlobal true; _x hideObject false} foreach briefHangar;
What went wrong here?
nvm
figured it out im dunb
{
params ["_killed", "_killer", "_instigator"];
format ["Name: %1 Side: %2 Condition: %3",_killed,side _killed, (side _killed isEqualTo west)] remoteExec ["hint",-2]; .....
};``` I might be blind, but why does ```side _killed``` always returns civ?
Ah, I guess it's because the unit is already dead...
How to import gamer logs into SQL database? Thank you very much.
Regarding the setUnitLoadOut discussion. Can confirm the duplication of the steps that @tough abyss performed with the same result. However testing Epoch Mod, where the setUnitLoadOut is done at player login, I was unable to duplicate the issue... just another data point
how do you have a trigger delete synced objects
deleteVehicle _x
} forEach synchronizedObjects _yourTrigger;``` That could work.
thx
Guys
I can't find info on the default time speed in arma 3...
is it like 1 second is a minute or something?
Yes... seconds, metres, etc
Default time speed is 1 second = 1 second
Oh damn... yeah I misread that question 😉
Yes
Oh okay
For day/night cycles you can set time acceleration if necessary on a server... But that just affects the time of day not anything else
No, I don't want to change it, just couldn't find any info on it.
I am trying to deal with this "error nounit" bug when players go back to lobby to switch roles. i know thats its a known bug but we dont use in game role/squad changing so using the lobby to switch roles is really important.. Can someone point me in the direction of the programmatic causes or some ways to prevent it from happening.
how do you target the synced objects
in a trigger
*trying to get a trigger that enables simulation for all synced objects when activated
or better yet only the objects in the trigger\
Would have been strange to have "the game that has real star constellations, dynamic weather, advanced ballistics, real-life map, real-life weapons, real-life coordinates/tides/moon cycles" not to respect real-life time 😄 😉
Hey, so basically I'm trying to play a sound from the mission in a Unit's Init, I've tried both:
this say "Sound";
this say3d "Sound";
but none of them worked, any idea on how you'd possibly make this work?
sound properly defined in description.ext?
Also a chance the game isn't in a position to play the sound that early in the games cycle as well, init starts happening before you see the world so might just silently fail as well.
Yeah it all works now, figured it out. My sound was corrupt and didn't work, nothing wrong with the script :P Thanks anyways tho.
How does arma process gunshots?
so, 3/3 times I have gotten a 05 access error
but that's projectiles, not gunshots
which crashed my game.
And its always happened when engaging AI and clearing a building
It's happend on two maps.
so you have a random crash where you don't know what it might cause.
And that's why you ask about how arma processes gunshots?
If you can reproduce with latest #perf_prof_branch
then make a crashreport (using arma launcher) and send it to dwarden to find and fix
If you can get it to crash with latst #perf_prof_branch. send report to dwarden. He'll take a look at the crash report.
thanks, how do I opt in, is it under betas?
Ok
Jay, are you using any AI-related stuff? Mods, scripts?
How to simply put a camera in front of a soldier - similiar likes Arsenal does it?
guys. how can I prevent players from using the program lag switch?
What would be the best way to script a bullet point style list with map markers? I’d like something that would just be there every time we start up a mission. Wouldn’t have to be many, maybe 5-10.
@deft jackal Start with [0,0,0] then go up, [0,100,0] .. [0,200,0]
how can I prevent players from using the program lag switch?
Ban them. You can try to do a heartbeat system, but it will never catch them 100%.
What command should I use? @finite dirge
What do you mean?
markerArray = [
[_markername,_markerPos,_markerType,_markerShape,_markerSize,_markerDir,_markerBrush,_markerColor,_markerAlpha,_markerText], // Change these vaules to what you want. Most of them are strings.
[_markername,_markerPos,_markerType,_markerShape,_markerSize,_markerDir,_markerBrush,_markerColor,_markerAlpha,_markerText] // last array enrty has no ,
];
{
_markername = markerArray select _x select 0;
_markerPos = markerArray select _x select 1;
_markerType = markerArray select _x select 2;
_markerShape = markerArray select _x select 3;
_markerSize = markerArray select _x select 4;
_markerDir = markerArray select _x select 5;
_markerBrush = markerArray select _x select 6;
_markerColor = markerArray select _x select 7;
_markerAlpha = markerArray select _x select 8;
_markerText = markerArray select _x select 9;
_stringToMarker = "|" + _markername + "|" + _markerPos + "|" + _markerType + "|" + _markerShape + "|" + _markerSize + "|" + _markerDir + "|" + _markerBrush + "|" + _markerColor + "|" + _markerAlpha + "|" + _markerText;
_stringToMarker call BIS_fnc_stringToMarker;
} forEach markerArray;``` @deft jackal
all those selects could easily be replaced by params
also select _x won't work there
markerArray = [
[_markername,_markerPos,_markerType,_markerShape,_markerSize,_markerDir,_markerBrush,_markerColor,_markerAlpha,_markerText], // Change these vaules to what you want. Most of them are strings.
[_markername,_markerPos,_markerType,_markerShape,_markerSize,_markerDir,_markerBrush,_markerColor,_markerAlpha,_markerText] // last array enrty has no ,
];
{
_x params ["_markername", "_markerPos", "_markerType", "_markerShape", "_markerSize", "_markerDir", "_markerBrush", "_markerColor", "_markerAlpha", "_markerText"];
private _stringToMarker = "|" + _x joinString "|";
_stringToMarker call BIS_fnc_stringToMarker;
} forEach markerArray;
ah thanks
what does it even mean?
Disconnect the person I they arent in some array. Its entirely up to you.
@tough abyss
M242letzten Donnerstag um 16:31 Uhr
because it has some bugs
In fact it has a nasty backpack bug that makes dropped backpacks unusable. So I highly doubt that "ACE uses therefore there are no issues with that" is a good argument
You are completely right. SetUnitLoadout is not correctly broadcasted.
Running it Client side -> Server do not recognize when you put something out of your Inventory.
Running it Server Side on a "New Unit" just before a player switch into this new Unit -> Magazines are not correct broadcasted.
We (EpochMod) have added some workarounds to prevent these issues. But a fix by BI would be much better, of course...
Can someone who's tested this open a Feedback Tracker for that? That sounds like something that should be about and I don't see it on there currently.
@restive leaf has made a good video about that. Maybe he will do that?!
hi, I would like to change the color of the letters of the interaction of ace, someone would know the way
the last line of a function is returned.
params ["_unit"];
_unit;
Returns the unit passed to the function... correct?
when I call this with [UNIT] execVm "path/to/script
I am getting it returned as a script / path to script.
sorry
remoteExec
not execVm
@dark ocean its in addon settings
@hearty plover What does your remoteExec code look like? Are you literally replacing execVM with remoteExec in that case?
params ["_unit"];
if !(isServer) exitWith {};
if (isNull _unit) exitWith {};
_retVal = false;
{
if (isPlayer _x && alive _x) then {
_dist = _x distance _unit;
if (_dist < 15) then {
if (DEBUG) then {
["Player:", name _x, "Within 15 Meters Of HVT!"] joinString " " remoteExec ["systemChat"];
};
_retVal = true;
};
};
} forEach allPlayers;
if (DEBUG) then {
["No player Within 15 Meters Of HVT!"] remoteExec ["systemChat"];
}
hint str _retVal;
_retVal;
The above is fnc_isNearPlayer.sqf
// if notNeatBlu
_nearPlayer = [HVT] execVM "jayScript\fnc_isNearPlayer.sqf";
if (DEBUG) then {
["Is near player", _nearPlayer] joinString " " remoteExec ["systemChat"];
sleep 5;
};
if (_nearPlayer) then {
// surrender
That is the snip from the code that calls it.
I expected that to return to _nearPlayer the ret value.
I recall execVM doesn't have return value other then the script I believe.
You can put it into a function and use spawn or
_myReturn = [] call compile preprocessFileLineNumbers "myScript";
hey probably is stupid question what does 'Null=' represent
cool still a little new to coding
still i can throw together my self together a nice little mision for myself with a few lines of code and have tons of fun so im happy
@summer pelican i need in script
how do i disable the cinimatic border fnc
nvm i got it figured out
question would BIS_fnc_CinemaBorder need to be run client or serverside
@tough abyss UI = local
wp = ind1 addWaypoint [_enemy = findNearestEnemy ind1, 0, 1, wp1];
wp setWaypointType "DESTROY";
wp waypointAttachVehicle _enemy;
does this work?
I can see that it wouldn’t
thanks
Hey guys ! Is there a way to fade in text when they load in a dialog ?
@winter rose thanks srry for late reply was bussy
You want the light be part of the model or you want it just have a light in a mission?
Mmm it's more a #arma3_config stuff I guess. But you need to add a reflector class into it. ARMA3 sample models on steam have a streetlamp example.
ehhh all i want to do is add an interior light to a chopper
was looking at this
//Then make a file called "lights.sqf" in your mission folder and paste this text.
_point = _this select 0;
_light1 = "#lightpoint" createVehicle position _point;
_light1 setLightBrightness 0.6;
_light1 setLightAmbient[0.99, 0.99, 0.74];
_light1 setLightColor[0.0, 0.0, 0.0];
_light1 lightAttachObject [_point, [0,0,0]]; ```
So not part of a custom model but inserted live in a scenario?
yeah
Pls say so then. XP
i dont care if its as dim as fack just enough so that sitting in a chopper at night without nvgs isnt just a black screen
But yeah that script creates a light object into a point ut you may need to also attach it to the vehicle.
yeah i have a blue pointer that is attached to the vic
but i think i can get this to stick to the vic without the pointer
all g
cool thanks for the help @young current
@young current yeah ok attaching a light didnt works turned it into epilepsy simulator so i just attached a chem light to the interior of the cabin
works like a charm
little help i know there is a command for making it so ai will wear NVG,s but not use them(ie have them flipped up) but i cant find it can anyone pop us a link
you mean linkItem "Nvgclassgoeshere"?
nah i got a squad off guys
What?
@tough abyss not at night time, maybe a recent disableAI thing
sitting in lit chopper and i want them to have the goggles flipped up
disableAI
i just found the code to flipp them up
just yeah ai will overright it because night so il have to disable part of their ai
Hi , its possibel set global BUILDING allowDamage false; on Livonia? Not nice for mission buildings its gone . Thanks for help
Is building a map building or placed building?
From map
Just one?
I have no idea what you just said
You can destroyed all buildings on Map. Exempel make mission on Industrie area and Player make mission half buildings its destroyed next time spawn mission its to easy half area its destroyed
When you restart mission all buildings are restored
Its Exile mod 6h restart
Then Exile probably saves building state into database, make sure it doesn’t
Also Exile is a mod who knows what modifications they added to Arma, better ask on Exile forums
No only After restart building restored
But 6 h server its running, Player make my big Mission 1h need time , then maybe respawn mission after1h on same place
In any case making all map building invulnerable is a huge task and most likely degrade your performance
Ah ok , make Problem with Fps then not ok
I make on chernarus 2035 Remove all wrecks without any Problem, now i think its possibel make all map building indestructibel
It is but it will cost you performance and desync
Maybe not desync if you do it locally
Still you will have to find every building on the map and allowdamage false on it on every client and JIP
Ok thanks
testing a mission via mp lan is different to testing on dedicated server right
not really, only difference is server.cfg is also taken into account
difficulty settings etc.
also how the fuck do i get this to work?sqf _enemy = findNearestEnemy position ind1; wp = ind1 addWaypoint [position _enemy, 0, 1, wp1]; wp setWaypointType "DESTROY"; wp waypointAttachVehicle _enemy;
i am trying to get ind1 to engage the nearest enemy, cant ever get it to work
also does the _enemy know about ind1
https://community.bistudio.com/wiki/findNearestEnemy
Description:
Finds the nearest enemy to the specified position. Returns a null object if the object's group does not know about any enemies.
ind1 will not find nearest enemy less it knows about them
ind1 knows about _enemy, _enemy does not know about ind1
also is wp1 ind1's first waypoint if so first wp should be 0
oh lol you cant use local variables in trigger
@waxen tendon ^^^
yep
enemy = ind1 findNearestEnemy position ind1;
wp = groupind1 addWaypoint [position enemy, 0, 1, "wp1"];
wp setWaypointType "DESTROY";
wp waypointAttachVehicle enemy;```
this works
thanks guys! @tough abyss @cosmic lichen
😃
Does anyone know about any in-depth ASL tutorials going from the total beginning to expert stuff?
thanks i gues wasnt me asking tho
Oh sorry
Hey folkks
Drawing a blank on how to properly structure CfgFunctions when using it only in a mission
I have a config.cpp inside is a CfgFunctions stuff.
do I #include in the description.ext
??
Just put CfgFunctions into description.ext
That's how it should look inside the descrption.ext
Using prepocessor commands such as include only makes sense when your description.ext becomes messy.
class CfgFunctions
{
class NOS {
class Util
{
file = "NOS\Util";
class isNearPlayer {};
};
class Debug
{
file = "NOS\Debug";
class log {};
};
class Setup
{
file = "NOS\Setup";
class parseUnits {};
class setupEventHandlers {};
};
class Managers
{
file = "NOS\Managers";
class manageHvt {};
};
class Behavior
{
file = "NOS\Behavior";
class makeCiv {};
class makeNotSurrender {};
class makeSurrender {};
};
};
};
This is my NOS.hpp
Adding this into my description.ext
I get a file not found on NOS\Util\fn_isNearPlayer.sqf
Folder structure is as above.
I found ity.
You can stop laughing now.
cough Utils cough
So what ARE some good frameworks for common stuff lolk
find random building
find pos in x
find random building pos
I use to use that pos framework allot, can't recall the name, but it was a must.
I think shock wrote it.
Trying to find it again
Have not used Zen's stuff in a long time, think I am check it out.
So with disableUAVConnectability I can disable connections between a given terminal and a given UAV; is there an option to disable all connections to a given UAV?
For example: In a base there's a SAM that players shouldn't be able to control; but there's an arsenal where people can get new UAV terminals
(btw. please @mention me if you answer 😄)
"When in combat do this xxxx" how do I traslate that to ASL? @ me the answer please, thanks in advance
ASL?
Second question today about age sex location, must be some kind of flu going round
The IRC/IRQ/MSN flu.
how can i remotexec something into the command chat of all players?
that have a radio
well the radio part is clear
{
if("ItemRadio" in (assignedItems _x)) then {
_listeners pushBack _x;
};
} forEach allPlayers;```
and then do something foreach _listeners,but how to if i need command chat
have to add its a server fnc,hence i need to remotexec this
i have tried ```sqf
{
_pilot commandChat format["A Crate is being dropped at Grid: %1, containing : %2",_gridRef,_dropName];
}foreach _listeners;```but that does...well how should i say this...nothing? 😉
Do they have radios?
You need radio to see command chat by default
yeas,i wouldnt ask if not.obvious thing to add stuff the script depends on to the units that should receive
just use the unit has a target
[stuff] remoteExec ["crateFunction", _unit]; or [stuff] remoteExec ["crateFunction", _listeners];
You can just remoteExec to all but only the ones with radio will see it, no need to do that custom vetting
so sqf [my command chat stuff] remotexec ["call",_listeners]?or something like that
ah now ive seen that
Best to make your own function over using call, but yeah.
also thought about that,so i can reuse the chat thing for new stuff i am adding
If you ever move to securing this, having call open to remoteExec seems like a poor idea.
this works
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Addons\dubbing_radio_f_data_gre.pbo
playSound3D ["a3\dubbing_radio_f\data\gre\Male01GRE\RadioProtocolGRE\Combat\100_Commands\CeaseFire_1.ogg", player, false, getPosASL player, 100, 1, 50];
but this does not
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Expansion\Addons\dubbing_radio_f_exp_data_chi.pbo
playSound3D ["a3\dubbing_radio_f\data\chi\Male01CHI\RadioProtocolCHI\Combat\100_Commands\CeaseFire_1.ogg", player, false, getPosASL player, 100, 1, 50];
second soundSource is from APEX expansion. Does it mean that it have different route?
It might not exist at all, better unpack and have a look
@tough abyss it does exist in that path
Why doesn’t it play?
I added file paths in my message:
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Addons\dubbing_radio_f_data_gre.pbo
C:\Program Files (x86)\Steam\steamapps\common\Arma 3\Expansion\Addons\dubbing_radio_f_exp_data_chi.pbo
You want me to open it or something?
it have slightly different path of FILE ( because of DLC ), but in arma, it should have same path for soundSource, but it does not play
If you unpack it you will see the path you should use after locating the file in unpacked folders
I did: a3\dubbing_radio_f\data\chi\Male01CHI\RadioProtocolCHI\Combat\100_Commands\CeaseFire_1.ogg
need to use dubbing_radio_f_exp :/
I meant arma scripting language by ASL @cosmic lichen
Does anyone know the default varname for UnitPos data values on a unit from the 3den attribute?
Anyone aware how to remove all actions in the ace 3 framework?
Anyone know how much scripting this would take within the class UserActions section (condition, statement) of a helicopter's or airplane's config file? I want to rotate a named selection using shortcut "lookLeftCont" and "lookRightCont", and rotate another named selection using "lookUpCont" and "lookDownCont".
This would be the [class AnimationSources objects in question]:
class object1_yaw
{
source = "user";
animPeriod = 1;
initPhase = 0;
displayName = "";
mass = 0;
forceAnimatePhase = 0;
};
class object2_pitch
{
source = "user";
animPeriod = 1;
initPhase = 0;
displayName = "";
mass = 0;
forceAnimatePhase = 0;
};```
I would want it to have a limited range on both user actions, as well as a speed limit.
These shortcuts are for the player/pilot/driver/crew head movements and can be controlled using TrackIR or freelook. Ultimately, I would like to attach a searchlight to it.
Anyone know combo × 3 😄
@winter rose I see it now
lol
My "Anyone Know" still stands
I'd be willing to do some artwork in trade if anyone can come up with a dependable, streamlined (or simple), reproduceable solution to my scripting needs, above. Not to honk my own horn, but I'm a rather good artist. "Meep meep."
Anyone here know any way to get into tocuh with Zenophone
@tender viper is it a #arma3_config question, or rather a #arma3_scripting one?
Does anyone know how to add an action that enables simulation then deletes said action
something like
this addAction ["Enable Vehicle", {this enableSimulation; this deleteAction "Enable Vehicle";} ;
@summer pelican see the addAction wiki page for examples
@winter rose Scripting, I'd say, because it involves some logic arrangement instead of just parameter values.
it is done within the config, though, yes.
I would say "simply" use animateSource in there?
@tender viper don't worry I just wasn't sure if you had a config or a script issue, script can happen here :p
this addAction ["Enable Vehicle", {this enableSimulation; this removeAction 0;} ;
like htat?
you may want to read the enableSimulation page too, for the syntax.
And not, not "this removeAction"
What?
read the wiki pages of the commands you use
removeAction takes the id of the action, and 0 isn't it (read addAction wiki)
also this doesn't work in addAction code (read wiki)
also enableSimulation syntax is wrong (read wiki)
@winter rose Was this for me or Comrade?I would say "simply" use animateSource in there?
For your eyes only ❤️ @tender viper
haha. Ok so then the reason that might not work is because I want to assign existing controls to a specified user action. So, the class UserActions is needed to control that animationsource
oooh then yeah, it's a sweet spot between script and config I cannot help solving, I am afraid
How do I remove all actions in Ace 3?
@crisp cairn deleteVehicle _unit
top tips
this enableSimulation false;
this addAction ["Enable Vehicle", {arm12 enableSimulation true; arm12 removeAction 0;}];
That works
:P
This is my humble start to the above attempt:
{
////////// Using headtrack controls to move a virtual turret (with "class turret" components attached to it).
///////////////// lookLeftCont ////////////////
class fang_gun_yaw_left
{
priority = 0.05;
displayName = "";
shortcut = "lookLeftCont";
condition = "this animationPhase 'gun_yaw' < 1.001 and player in this";
statement = "this animate ['gun_yaw',1]; this animate ['VisTurret',1]; this say3D 'Plane_Fighter_01_foldwing_sound'";
position = "pilotcontrol";
radius = 10;
onlyforplayer = 1;
showWindow = 0;
hideOnUse = 1;
};
};
```
doesn't say3D use the file path?
That would delete the unit tho right @winter rose
how do you make an alarm button
<button>alarm</button>```
add an action to something like a laptop or button that sounds an alarm
multi
Okay
So, for all units, I want to get the variable name, of the units.
Then parse that, and sort them.
So for example unit 1 has variable name of "GRS_01"
getAllVariables?
player addAction ["Sound Alarm","[_loudspeaker,'AlarmCar'] remoteExec ['say3D',0,_loudspeaker]"];
Really? A string?
@hearty plover probably something like this:
_units = [];
{
_units pushBack vehicleVarName _x;
} forEach allUnits;
_units sort true; // sort in ascending order
{
// do something with each unit
} forEach _units;
first 4 lines can be replaced with apply
new #perf_prof_branch build 1.94.145999 available
@still forum Arma Scripting Language
Arma scripting language is SQF.
then why is there a setPosASL hmmm?
??
setPosASLW
ASLW - Arma Scripting Language With
🙈
Arma Scripting Language to Arma Training(?) Language?
Anyone have any idea why this causes my game to crash?
onLBDblClick="_this call DT_fnc_handleItem";
params [
["_control",controlNull,[controlNull]],
["_index",-1,[0]]
];
private _item = _control lbData _index;
private _action = getText(missionConfigFile >> "Misc" >> "Items" >> _item);
if !(_action isEqualTo "") then {
call compile _action;
closeDialog 0;
};
It only causes a game crash in unscheduled 🤔
what is call compile action? does it do any dialog stuff?
also don't close the dialog inside UI code
The game is running eventhandlers on the dialog, and you are pulling away the dialog from under it while it's still working with it
🤔
Ah
That may be it
the _action never contains UI related code
Hmm, removing the closedialog didn't seem to help :/
deleting something while eventhandlers are running is probably the cause
have a feedback tracker report about that
Ah
its not liking the attempt to remove the item after use
Guess I can execute it a frame after with CBA 🤔
but you said action doesn't contain any UI stuff??? removing item from control is UI related stuff
does this look ok
_wp0= techi1D setWaypointType "GUARD";
_wp0= techi1d setWaypointCombatMode "YELLOW" ```
@cold pebble I might be far off the mark here but don’t you need to disableSerialization when initializing variables to UI controls?
Got a nice script here
[
[
(getPos selectRandom (allPlayers select {alive _x})) apply {round _x} ,
250
],
allPlayers apply {[(getPos _x) apply {round _x}, 125]}
] call BIS_fnc_randomPos
For some reason, it occasionally throws this error:
if (_this isEqualTypeArray [[], 0, 0, 0, false]) e>
16:52:47 Error position: <isEqualTypeArray [[], 0, 0, 0, false]) e>
16:52:47 Error Generic error in expression
16:52:47 File A3\functions_f\Misc\fn_getArea.sqf [BIS_fnc_getArea]..., line 30
with error popup: Type Scalar, expected array, object, group, location, string, in 6847
Help?
Parameters fed each time is identical, though as mentioned it throws errors seemingly at random with the script working about 50% of the time.
What part is wrong?
as the error says. you are passing a number (250) where only array/object/group/location are allowed
Array - in format [center, radius]
yep
250 is the radius
not what you have
nope
you have 250 that's not an array
it should be [center, radius]
now center, radius
[getPos selectRandom <stuff>, 250]
It always returns [[6847,16071,10],250], which looks correct to me.
if I throw [ (getPos selectRandom (allPlayers select {alive _x})) apply {round _x} , 250 ] into the debug console.
yes
that's a correct element
but you don't pass it
you are providing the whiteliste elements position and 250
they are both no valid whitelist elements
So output should be [[[6847,16071,10],250]]?
If you have only one player it will be always the same result
Alright, that was it
[
[[
(getPos selectRandom (allPlayers select {alive _x})) apply {round _x} , 250
]],
allPlayers apply {[(getPos _x) apply {round _x}, 125]}
] call BIS_fnc_randomPos
I'm however confused as to why it worked about half the time previously
Oh well
¯_(ツ)_/¯
can i get a little help with this its saying its saying 1 element provided expects 3
createGuardedPoint [east,[(getMarkerpos "techi1_DefencePoint")], -1, objNull];
nvm i fixed that error got a new one yay
createGuardedPoint [east,(getMarkerpos "techi1_DefencePoint"), -1, objNull];
redundant []
so
createGuardedPoint east,(getMarkerpos "techi1_DefencePoint"), -1, objNull;
No, I just removed the brackets here: [(getMarkerpos "techi1_DefencePoint")]
oh oh duh
Also, quick tip, write ````sqf` to enable code highlighting
hmm ok now in getting a new error on that code ```if (!isServer) exitWith {};
createGuardedPoint [east,[(getMarkerpos "techi1_DefencePoint"),0], -1, objNull];
[Dsk1G, DSk2G, techi1D, techi1G] orderGetIn true;
//DshkM Gunners
Dsk1G assignAsGunner Dsk1;
DSk2G assignAsGunner Dsk2;
//technical driver and gunner
[techi1G] joinSilent techi1D;
techi1D assignAsDriver techi1;
techi1G assignAsGunner techi1;
_wp0= techi1D addWaypoint [(getMarkerpos "techi1_DefencePoint"),0];
_wp0 setWaypointType "GUARD";
_wp0 setWaypointBehaviour "COMBAT";
_wp0 setWaypointCombatMode "YELLOW";
_wp0 setWaypointFormation "COLUMN"; ```sqf
error addWaypoint type array expects number
You add the sqf part at the start
Anyhow, try
group techi1D addWaypoint [(getMarkerpos "techi1_DefencePoint"),0];
@random loom thanks got it working, now i have to figure out why ymg gunner is getting in drivers seat and the driver does nothing
Dude look up syntax on wiki, it is not a brain surgery
I'm so confused in the editor could someone please link me some in-depth tutorial about all the things i need to know?
ah ha ah ahahahaha
Should probably ask in #arma3_scenario
or #arma3_editor for editor related questions I guess.
@frozen fox not being a dick but quick way to lear is to mess about with it oh and youtube youtube helps a lot
I actually don't want videos
Cuz most of them are just about "making a simple mission"
I'd rather like an article of some sort
Alright @random loom
🤔 ok now whay arnt you getting in the gunners seat its coded right
is it posible that the vic is coded wrong
Try removing [Dsk1G, DSk2G, techi1D, techi1G] orderGetIn true;
i mean the driver gets in and so do the two other dishka operators
get into there respective turrets
@random loom nope now the guys just run to the guard point
and my dishka operators dont jump on there turrets
ok nvm ai couldnt physicly reach the back of the truck working now
it's been ages since i've written any SQF, please halp
how could I get the class names of every backpack that does not have an item holding capacity?
i.e the drone backpacks and tripod backpacks from RHS
yeah but what's the config entry for item holding capacity?
god even a little bit of scripting make a mission feel more real
You can check for youself by running allVariables missionnamespace in the debug console and checking the output.
_shitBackpacks = [];
_backpacksConfigs = "(
(getNumber (_x >> 'scope') >= 2) &&
{getNumber (_x >> 'isbackpack') == 1 &&
{getNumber (_x >> 'maximumLoad') == 0
}}
)" configClasses (configFile >> "CfgVehicles");
{_shitBackpacks pushBack configName _x} forEach _backpacksConfigs;
Oh
yes
default namespace is missionNamespace (usually)
{_shitBackpacks pushBack configName _x} forEach _backpacksConfigs;
-> apply
what's the difference?
faster, more compact, more efficient
it runs once at mission load, and it's someone else's mission file, and it works already 💪
Thanks @still forum
¯_(ツ)_/¯
as shift thing 8k vars is kind of a jerk thing to make someone do to verify something like that
seen people do some weird looking shit with apply though
sqf seems so much more bad the less of it you write
i've not looked at any for years, i come back and it's so confusing to read
the less code the better it runs
damn straight
probibly a stupid question but if i have script with !alive condition would it trigger if the !alive unit was not there thanks to probability of presence slider
how can i check if an item is from one of the official paid DLCs?
You will get undefined variable error @tough abyss
ah kk thanks
huh i actualy survived coming underfire from a mounted weapon i mean i got hit but it didnt murder me out right
if (alive (missionNamespace getVariable ["yourunitname", objNull])) then .... this will be true only for present units which are alive
yeah dosnt mater i relised that what i was planning meant that if the players blew it up it would trigger as well
Anyone knows a way of blocking GPS minimap without removing gps/uav_terminal from inventory?
Anybody have any compatibility for ryanszombies resurrection module and ace 3 medical?
@quartz pebble just do it the I&A way and slap a huge black circle over the map XD
@tough abyss now using ctrlShow false for the minimap control. Not ideal, but works.
Why not ideal?
anyone around? got a quick question
I'm wondering how to make a small area on a map where players return an object to complete the mission
Make a trigger and link it with the object
that simple, huh? I used a trigger and set the HVT to a civilian so when players enter the area with the civilian the mission completes.
simple, but the mission isn't complex so it's good enough
Is it possible to increase armour values on an SUV in a vanilla server (without mods)?
You can add HandleDamage EH that will reduce damage, but it is quite advanced tweakery
Anyone had any issues with lightpoints recently?
private _light = createVehicle ["#lightpoint",[8689.42,6666.22,0.00143909],[],0,"CAN_COLLIDE"];
_light setLightBrightness 0.35;
_light setLightAmbient [1,0.5,0];
_light setLightColor [1,0.45,0];
_light setLightAttenuation [70,5,0,3];
_light setLightDayLight true;
If the server runs this, nothing is visible, whereas local execution produces what is expected
Recently? This was the case since the beginning of time. Light emitters are local since they are particle emitters
The copilot in a heli is in the commander position?
depends
I want to add a Eject action to pilots and copilots since they don't have this option.
For that i need to detect if the player is in pilot or copilot position.
Find the turret which copilot occupies
Having problems with unitcapture not replaying the movement, I get an error saying there is an unknown variable
shown here:
https://gyazo.com/1aefd8d4c3caf51e639e30197bd0ff33
Error in-game: https://gyazo.com/0f2145c636d11937df87796a51385890
And here's the code:
[_unit, HLF_fireData, true] spawn HLF_fnc_infUnitPlayFiring;
_allVars apply {
_var = _x splitString "_";
["Original Var Value: ",_x] joinString " " remoteExec ["systemChat"];
switch (_var select 0) do {
["Checked Value: ",_var] joinString " " remoteExec ["systemChat"];
case "hvt": {
"FOUND HVT VAR!" remoteExec ["systemChat"];
sleep 10;
_res = [_var] joinString "_";
["Result Value: ", _res] joinString " " remoteExec ["systemChat"];
// str _var remoteExec ["systemChat"];
sleep 10;
};
default { };
};
};
Okay...
So getting some output im not understanding.
_x is "hvt_01"
After the split string, we get. "["hvt", "01"]"
When we attempt to rejoin it again we get the output of "["hvt", "01"]"
Why am I not seeing the expected value of "hvt_01"
Am I using join String wrong?
You're trying to do: [["hvt", "01"]] joinString "_"
Do i need to split string, before I join string, again?
I thought passing it an array would join the elements.
I ended up find a way around it.
_allVars apply {
_var = _x splitString "_";
switch (_var select 0) do {
case "hvt": {
NOS_HVT_LIST pushBackUnique _x;
};
Since I already have the full var string, I don't need to rejoin it.
It doesn't join string inner array, it will join the elements you pass in the most outter array.
_var joinString "_"; is all you need to do.
But umm, yeah, you don't need to rejoin there
@tough abyss found it copilot is always on Turret [0].
what's the opinion on using publicvar eventhandlers vs. remoteExec?
Like pro/cons on it?
yeah - or which is better for network performance/performance in general
I assume they're about the same though it's just preference of syntax etc
Would depend on what you are doing (specific targets or broadcasting) I believe.
broadcasting
Not sure personally, but I'm sure someone else with more testing in will be able to tell you. I would guess remoteExec is more performant in that case.
Resource/time wise
how much addition of time does a script take to cycle if you have a huge generalist array of class names vs say a few.
Like in example, lets say I want to check the classnames of a list to find out if that is the correct unit in the trigger zone. Is the time measurable if I want to add like 30 classes to check vs 10?
Any increase of things to do will take longer. Is it not something you can cache?
Possibly, although I'm thinking seperate presents for each type would be better
var ={script goes here};
this means that when i call this variable it will run the script between {} right ?
if so how do i call this variable so it runs the script
or am i completely wrong
call?
mind you im practicing what i have is
_qrfGrp = createGroup [east, true];
_qrfGrp createUnit ["O_Soldier_A_F", getMarkerPos "qrfPoint1", [], 0, "CAN_COLLIDE"];```
```//ini script
if (!isServer) exitWith {};
if(!alive e1) then {call {qrf.sqf}};```
i did have the whole qrf script as a public variable
@tough abyss if it's a file, execVM. If it's code, call/spawn
@winter rose you can call variables from other scripts right they just need to be public?
like i said sorry if these are stupid questions im trying to teach my self
@tough abyss yes, a public variable means it is accessible from every script
so would this work
if (!alive e1) then {call qrf};
qrf is the variable
if qrf is defined, yes
Also please prefix your public variables, like DKL_qrf
Does anyone have experience in hiding/fading 3den attributes/controls on load? Works fine via any EH once dialog is open, but doesn't affect anything onload, even with a waitUntilAndExecute and null check
Maybe 3den Master @cosmic lichen, @slim oyster. Maybe…!
good catch
I already tweaked Mini UGV handling so it's only remoteExec on nearby players
was spamming warlods durning Eddie infestation a bit
it was possible to use Mini UGV on warlords servers for one week and there were terminator like moments
and you can imagine how frequently those remoteExec were triggered when 30 eddies were rolling on the map
Just needed a spawn, no frame delay nor other timing possible, only worked with spawn, similar to how guimessage needs any scheduled delay to work properly, who knows.
Anyone have experience with changing the 3den attribute display? I can't find the display script, and I need to resize the attribute category menus
I want to resize the "gear options" attribute category control to reflect the hidden controls
how would i check via script if a unit was in the vehical
more specificly a group is in the cargo
in
yeah i had that but i must of had somthing wrong this is what i had
{
{_x in _extractHeli} count (units _playerGrp) == count (units _playerGrp)
};```
(must have*, dammit)
XD
think i found it thou
{
({_x in _extractHeli} count units _playerGrp) == (count units _playerGrp)
};```
that better
waitUntil { units _playerGrp findIf { not _x in _extractHeli } == -1 };```
(better performance)
you can also add a sleep in the waitUntil before the condition check
@PiZZADOX As workaround you could change the position of the controls and reduce the height of the ctrlgroup
I believe the engine handles the size. Not sure though.
hmmmm its still not going to the second wp after picking me up
_crew1 =[];
_extractHeli =[];
//Spawns INvisible landing pad Near player
_extract = createVehicle ["Land_HelipadEmpty_F", position player, [], 20, "NONE"];
sleep 0.5;
_mk1 = createMarker ["extractmarker", _extract];
_mk1 setMarkerType "hd_pickup";
//spwans extraction Chopper
_crew1 = createGroup WEST;
_extractHeli = [getPos heliPad,0,"B_Heli_Light_01_F", _crew1] call BIS_fnc_spawnVehicle;
sleep 0.5;
// Extraction Waypoint creation
_wp1 = _crew1 addWayPoint [(getMarkerPos "extractmarker"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointSpeed "FULL";
_wp1 setWaypointFormation "COLUMN";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];
waitUntil { units _playerGrp findIf { not _x in _extractHeli } == -1 };
_wp2 = _crew1 addWayPoint [(getMarkerPos "marker2"), 1];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointBehaviour "CARELESS";
_wp2 setWaypointCombatMode "GREEN";
_wp2 setWaypointSpeed "FULL";
_wp2 setWaypointFormation "COLUMN";
_wp2 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];```
```sqf pwease
i dont know how to do that i tried putting it in and all it did was add the sqf to the script
_playerGrp = group player;
_crew1 =[];
_extractHeli =[];
//Spawns INvisible landing pad Near player
_extract = createVehicle ["Land_HelipadEmpty_F", position player, [], 20, "NONE"];
sleep 0.5;
_mk1 = createMarker ["extractmarker", _extract];
_mk1 setMarkerType "hd_pickup";
//spwans extraction Chopper
_crew1 = createGroup WEST;
_extractHeli = [getPos heliPad,0,"B_Heli_Light_01_F", _crew1] call BIS_fnc_spawnVehicle;
sleep 0.5;
// Extraction Waypoint creation
_wp1 = _crew1 addWayPoint [(getMarkerPos "extractmarker"), 0];
_wp1 setWaypointType "MOVE";
_wp1 setWaypointBehaviour "CARELESS";
_wp1 setWaypointCombatMode "GREEN";
_wp1 setWaypointSpeed "FULL";
_wp1 setWaypointFormation "COLUMN";
_wp1 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];
waitUntil { units _playerGrp findIf { not _x in _extractHeli } == -1 };
_wp2 = _crew1 addWayPoint [(getMarkerPos "marker2"), 1];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointBehaviour "CARELESS";
_wp2 setWaypointCombatMode "GREEN";
_wp2 setWaypointSpeed "FULL";
_wp2 setWaypointFormation "COLUMN";
_wp2 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];
```
ohhh
now the sqf thing works for me
the choper lands at the first waypoint and i get in it just refuses to move to second waypoint
after the squad jumps in
That waitUntil seems like it should be == 0
Doh, you're right, misread what it was looking for.
@winter rose not _x in _extractHeli you sure about that? https://community.bistudio.com/wiki/SQF_syntax#Rules_of_Precedence
@tough abyss start with -showScriptErrors or look up in .rpt file for errors, otherwise you are driving blind
@tough abyss some brackets might be needed yeah
waitUntil { units _playerGrp findIf {# not _x in _extractHeli } == -1 };
Error type object expected bool```
Oo
waitUntil { sleep 1 ; units _playerGrp findIf { not (_x in _extractHeli) } == -1 };```
ok not getting any errors but chopper refuses to move after picking us up just sits there engin on
do you script with -showScriptErrors?
addWaypoint second array argument is not a waypoint index, btw
try engineOn the heli, might do the trick
oh wait, look @ _wp2:
_wp2 setWaypointStatements ["true", "(vehicle this) land 'GET IN'"];```
_ta-daaa_? or do you want it to land _again_?
land again