#arma3_scripting
1 messages · Page 580 of 1
14:00:36 Error in expression < _objects;
[] spawn {sleep 20; hint str _objects;}
14:00:36 Error position: <_objects;}
14:00:36 Error Undefined variable in expression: _objects
hides behind a exploded tank
Oh, I feel ashamed too, I should have caught that before blindly copy/pasting that
Thanks Lou Montana, nonetheless
ArmA's booting, let's see what's happening.
Arma*
Alright
the _objects array indeed contains 5 objects
the "str"'s giving a weird output, full of #'s and numbers
is any of them null though? after 20 seconds
Nope.
and are the numbers the same after 20 seconds (for the flagpoles)
all have a .p3d
that means they are the same objects then
Which numbers should I look at? the ff08... or the numbers after the #?
don't know 😄
all should stay exactly the same really
but I do think they are the same, don't even have to check the numbers.
But out of ideas then
everything's the same indeed.
May the module config have an "impact" on what happens in the script?
Most notably, I've set isGlobal = 1;. Should I set to to 2?
I'm starting to think it's an issue on my end - I mean, with my client.
I'm just using CBA and my mod. Is there anything that could cause any issues with that?
arma
i think at times arma can be the cause of issues, and in times like these it is best to look the other way and use a different method so our heads dont hurt trying to understand the un-understandable...?
for real though I dont know enough about modules to provide any real help here so im gonna chime out 🙂
but that's something that's been working for years!
this exact code was used across dozens of our maps
the fact that it doesn't work is... unexpected...
I had an idea I didn't start to implement yet, just think about:
Using a set of prebaked animations (unit capture style) blended together to control air units. Currently I think helicopter AI can't do contour flying, or combat landings at all, and I would like to try and solve this problem (in a generalized fashion that will take a helicopter from take off to landing).
A few questions:
Is there already a solution for realistic AI helicopters?
Is this something that has been attempted?
Does this sound like a plausible solution?
Basic premise would be:
- Capture a bunch of useful animations (combat take off/landings of various kinds, turns of various speeds etc.).
- Take a start and end point, and use a curve fitting algorithm to select a best set of these animations to get from A to B.
- Play back the set, blending appropriately from one to another
- Possibly separately control or modify the orientation of the chopper so it looks better (e.g. at the blend points the recorded tilt might not match what would make physical sense, so adjust it here).
Issues I forsee:
- Recording enough animations, how many is enough?
- Generating a good set of waypoints between the origin and target
- Curve fitting in SQF could be expensive, might need to use a DLL, unless there is a function I can leverage already.
- Will the played back movement be smooth on clients?
Hey. :)
Is it better to setVariable an array of values
or
make a setVariable for each value ?
you would need a hefty lot of prerecorded stuff for that @ebon ridge
like ... a real of a lot
sorry i dont know if this is the appropriate place but im trying to script two things with infistar on a server I run.
im trying to place an object on top of another object
using the attachto function
plus that will only work for open spaces
but every iteration i try doesnt work
@compact maple incomplete question. Not enough details.
Probably the array, but depending on what you're doing maying seperate setVariable's.
Also depends what your definition of "better" is. Less code? Less Memory usage? Less Network Bandwidth? Less CPU Load? Less script execution time?
im also trying to figure out how to move an object lower
I tried cursorObject setPos [ getPos this select 0, getPos this select 1, -3]
but it didnt work
you would need a hefty lot of prerecorded stuff for that @ebon ridge
like ... a real of a lot
@queen cargo What is your calculation? Technically it only needs one because the curve fitter is just fitting the best available animation to the route it wants to take, even if the best available doesn't fit at all, then blending between them all.
I'm suggesting only using the pre-records as a base, then coercing them to fit
unless i misunderstood something, you want to use prerecorded paths essentially
and a short curve is different from a long one here
Yeah maybe I wasn't clear: I will generate the desired route, and coerce the pre-recorded paths to fit it by some mechanism, easiest is just a transform matrix
and if you want to support landing too, you need a hefty lot of em as otherwise you will crash the helicopter on hard terrain
That won't be the case as I will force the pre-recorded data to fit the path, so the end of the pre-record ends on the ground
Simplest way is just calculate a matrix transform that translates/rotates/scales the pre-recorded data so the start and end point exactly match what I want
But there are better ways when trying to fit a curve which I would probably use
why not "just" try to generate a natural flight path?
prerecorded paths also require one for every kind of helicopter available
Why would they require it? The path is just position and orientation I think?
It can be used on any chopper
because a littlebird will have a different flight behavior then eg. the Huron
Hiya, tried googling but no luck. I can fix it by changing _someText to a global var, but I'd rather not do that.
0 = [] spawn {
hint _someText;
};```
is there a way to have spawn accept private variables?
pass it into the spawn @craggy bramble (_someText spawn {...})
making it global is also an option, and requires you to remove the underscore
also ... please remove that 0 =
will cause more harm then one needs for no real benefit
because a littlebird will have a different flight behavior then eg. the Huron
@queen cargo Doesn't really mean its required, it might be desirable. However as I mentioned I can augment the animation to change the orientation, speed it play etc.
_someText = "Scopes go over my head sometimes";
[_someText] spawn { //Pass _someText as arguments
params ["_someText"]; //Pull arguments apart and save first argument into _someText
hint _someText;
};
@still forum @queen cargo Amazing, appreciate it!
I tried cursorObject setPos [ getPos this select 0, getPos this select 1, -3]
@fathom pawn How are you running this?thisisn't valid in general context I don't think, shouldn't it becursorObject setPos [ getPos cursorObject select 0, getPos cursorObject select 1, -3]?
Or cursorObject setPos (getPos cursorObject vectorAdd [0,0,-3])
@ebon ridge thank you so much
It worked?
yup 🙂
do you know how to attach one object to another if your spawning in the object?
i tried to do attachto
but it didnt work for me
what i tried was player vehicle attachTo [cursorObject, [0, 0, 1]];
and you had a script error
it is vehicle <unit>, not <unit> vehicle
so ```sqf
vehicle player attachTo [cursorObject, [0,0,0]];
Theres no way to overwrite vanilla functions in mission is there? Either redefining it in a description.ext or maybe a mod config?
If I wanted to edit a function, lets say BIS_FNC_ReviveEHHandleDamage - can a particular function be overwritten or would you have to make your own function, with all the same code and edit that? provided credit/reference to original function from BIS is provided if thats possible/allowed in that manner
Can take it to #arma3_config aswell if its more suited there, don't want to double post though obviously
Can I take it over to #arma3_config and query again there regarding overwriting that?
On an MP mission, I'm trying to remove binoculars "Binocular" and radio "ItemRadio" with unassignItem, unlinkItem, removeItem and removeweapon. The code is run in onPlayerRespawn. Items refuse to disappear. Adding an GPS with linkItem "ItemGPS"; works nicely. In addition, after removing binoculars, I want to addWeapon "Rangefinder"; Why are these not working?
The same issue is on dedi and editor.
@winter rose didnt work for me 😦
i am trying to attach the spawned in unit to another spawned in unit
you can, depending on the object
i know on the editor its possible, but when i use that same script in infistar it doesnt work
idk ill tinker around
ah i figured it out
I have this addAction ["Open Strategic Map", "openMap.sqf"]; How to I limit the range at which this action can be done?
see https://community.bistudio.com/wiki/addAction @high silo
Im on that now, but idk how to classify the range
How many open close brackets do I need to reach radius, if any
counting 😅
Is that all I need to do?
see also below examples, there is an (incomplete) "default values" action
this addAction ["Open Strategic Map", "openMap.sqf", [],[],[],[],[],[5]];
I did this, but its not working. Have I just counted wrong?
radius:Number i.e. you don't put [] around it
[] declares an array
and in fact you are wrong for the other ones as well, see Example 4 on that page
(although the example would be better if it commented all the parameter names)
[player, true] remotexeccall ["setunconscious", _playerIwanttodown]
is this right.. to be run from dedi server?
tried it, but no work
- remoteexeccall
no, player is not valid on dedi server
it should be [_playerIwanttodown, true] remotexeccall ["setunconscious", _playerIwanttodown]
excellent! it works, thank you
i assumed as it was being sent to the player, player would be valid there
the variables you are passing into the remoteExec are evaluated when you make the call, thus on the server
yep, makes sense
i actually don't know what happens with variables inside a function though
Anyone know?
its sending objects, so it doesnt matter that they are local to the script on the dedi
if you pass code as a string i guess it evaluates them on the target, but if you pass code as code i don't know
i would guess it evaluates on the target in both cases actually, because even if it compiles locally, player is still just a special variable name that is evaluated at the point it is executed I expect
i'm kidnapping a player for others to rescue, so want them unconscious, but not able to respawn
setunconscious does that nicely.. its sometimes seen when players get run pver by vehicles, they get knocked down, but get up again after a few seconds
Ok so stupid question of the day, in an SQF file that's server side in an @ folder, does the @ need to be included if defining a file location in the SQF? E.g. #define SERVER_PATH "\NAME\Modules" or does the @ not need to be included?
1/ you can only run this script server-side
2/ just \addonName\your\script\file.sqf
@halcyon hornet
Great thanks, and yeah I know it's server side only it's to define some stuff server needs to do
Slightly off topic but not sur which channel would be best for this, is there a A2 version of extDB around at all or should it work with A2 anyway?
Hi folks. I was wanting to know if there’s a script to add weapons to things. Specifically I wanted to add demining charges off the AL6 demising drone to a regular AR-2 drone.
_vel = velocity _vehicle;
_dir = direction _vehicle;
_speed = 10; comment "Added speed";
_vehicle setVelocity [
(_vel select 0) + (sin _dir * _speed),
(_vel select 1) + (cos _dir * _speed),
(_vel select 2)
];
this is on the wiki, but it doesn't apply any velocity to the z direction, so it only accelerates horizontally, what i find strange here is that DIR doesn't return a 3 dimensional component.
I need something like:
Velocity + (CurrentVelocityDir * _speed)
how do i get an actual directional vector for a unit? like length = 1, do i need to do math on the velocity function? or is there a helper function i've been unable to find
oh is it vectorDir?
_vel = velocity _vehicle;
_dir = vectorDir _vehicle;
_speed = 10; comment "Added speed";
_vehicle setVelocity [
(_vel # 0) + ((_dir # 0) * _speed),
(_vel # 1) + ((_dir # 1) * _speed),
(_vel # 2) + ((_dir # 2) * _speed)
];
@dire perch yes, see addWeaponCargo/addMagazineCargo on the wiki 😉
Doesn't that just allow it to carry stuff as cargo? I want to be able to drop those bombs
How might I get a unit to spawn in or weather change when an engine of a plane starts (player enters plane) using an If statement? And How might I get the number of players in a vehicle to be considered in an If statement?
Doesn't that just allow it to carry stuff as cargo? I want to be able to drop those bombs
@dire perch oh yes indeed.addMagazineandaddWeaponthen
That goes in the description, right?
no…?
for instance, BombDemine_01_F is the weapon, and PylonRack_4Rnd_BombDemine_01_F is the magazine... I think
I'm super new to this
hi super new, I'm dad!
I want to add it to the AR-2's turret, because apparently that bomb is actually laser guided anyways.
and because I'd be able to use the turret to look down
@robust hollow @still forum @winter rose I'm reaching you again in regards to the issue I encountered earlier today. The fix is kinda straightforward: flags' "center" is set to a rather high position. If the maximum distance from which the action can appear was set to any values lower than 5 meters, it led to the action not being visible. I don't know if any of you has a Write access to the BIS Wiki - I think that it might be worth to add a "note" to the addAction page about that.
https://community.bistudio.com/wiki/addMagazine
https://community.bistudio.com/wiki/addWeapon
myVehicle addMagazine ["PylonRack_4Rnd_BombDemine_01_F", 2];
myVehicle addWeapon "BombDemine_01_F";
And I put those in the role description field, right?
Crap. Yeah, I’m in over my head
an init field *might* be used (even though not recommended)
in that case, surround this with ```sqf
if (isServer) then {
// code here
};
Okay, so popping right in to EDEN. I’m making a drone controller as player. I’ll put an AR2 darter right next to him, as it might be easier than making it into a backpack...
Then what? How do I put a script in there?
The wiki doesn’t seem to say how I start putting a scrip in, just why to put in
*what
in your mission directory, create an initServer.sqf
there is (almost) everything needed on the wiki; and if there is not, we add it
Anybody know if it’s possible to set the drones up so that multiple people can connect? Both for all getting a drone feed, and also possibly for one guy flying, one guy “gunning”?
only one user per drone
as for the feed, it is scriptable (if you want the UAV feed in the bottom right corner)
and you are talking about…?
well th escript is calling to apawn a check point on a crossroad but hhe terrain object scan be a bit close by
and I want to tell my code to stay just 1 or 2 meter from an object
say a tree
which script?
while {((isOnRoad _pos) or not (_fe) or ((count (_pos nearRoads 5)) > 0))} do
{
_ct = _ct + 1;
if (_ct > 48) exitWith {};
_pos = [_mPos,5 + (_ct/8),20 + (_ct/4)] call RYD_JR_RandomAroundMM;
_fe = (count (_pos isFlatEmpty [-1,-1,0.25,20,0,false,objNull])) > 0;
objNull i want to try 2 (meters?)
if you are talking about isFlatEmpty,
here is the documentation: https://community.bistudio.com/wiki/isFlatEmpty
yup I'm there but I don't see anything about using other than the default which is
ignoreObject (Optional): Object - Object to ignore in proximity checks. objNull to ignore. Default: objNull
How do I apply ModuleZoneRestriction to units that have been killed and respawn?
The module synchronizes units and it works on those that have not been killed.
yup, and when the Check point spawns, I get say a tree coming up throgh the sandbag or some such thing
maybe I'm asking Arma for to much,....to tight on the parameters?
have you checked… hmm, **minDistance **?
minDistance (Optional): Number - Objects within 50m cannot be closer than minDistance. -1 to ignore proximity check. Default: -1
yes but if I understand,....no objeect can be closer than 50 meter?
for me that's a bit far
this ^ means that the check won't happen for objects more than 50m away
_pos isFlatEmpty [-1, -1, 0.25, 20, 0, false, objNull];
try 1?
OOOOOOH! I see
you see the CP is actually in the woods, when there is more room across the road
and
so the wording should be....
going from
Objects within 50m cannot be closer than minDistance
to Objects within 50m will not checked furhterthan minDistance
just a twist on the English I suppose
I'll rewrite it
hey guys
where would my texture pack be for my map in arma
want to us l3td to edit it
l3td?
Large 3D Terrain generator, googled it
@tough abyss check #arma3_terrain's channel
displayAddEventHandler won't work on huds (specifically keydown)... anyone know why?
Because Arma is handling Dialogs (blocks movement), Displays (doesn't block movement) and HUD elements (special type) differently.
so do i just need to script in a new display to attach my handlers too? I don't want to use the main display because i want the handlers to get cleaned up when the hud is inactive
you could add them to display 46 on hud load and remove them on hud destroy events
or, however you deem the hud as inactive
for normal hotkey type stuff it does need to be on display 46 i think, otherwise you get the mouse cursor on screen so you cant look around
yeah, i dont want them to have control over the mouse... how does the main display allow attaching handlers but not let user control the mouse?
why arma
tis magical 🧙♂️
@sage flume rewritten up to latest wiki standards
if you want to add something to the screen which can't be interacted with (like a HUD element), simply create a Display and use displayAddEventHandler to control it
and displays can be created and removed with scripts, and so can their EH's
Does anyone have access to a script that allows you to lock a door/gate with a predefined numeric code prior to mission start?
is there a list of all the vehicles inside A3 in the wiki? all i could find was a list for operation flash point
because i basically have a script that spawn a "HelicopterExploBig", but i can't find this vehicle anywhere
(i have to reduce the size of the explosion by spawning a smaller one)
HelicopterExploSmall
it's not a vehicle, but "Ammo" (it's in CfgAmmo)
do we have a wiki page with CfgAmmo like it's with CfgVehicles?
i cant seem to find one, though you can browse the classes in the config viewer ingame
hah i'd like to, i am writing this from a dual core 10yo laptop
oh dear
yea my main PC decided to die with a big condensator explosion and due to covid i have to wait a while before they deliver the new parts for the new one
extract all A3 pbo's to a P drive, use a decent IDE and search 😉
do you have arma on ur laptop?
i don't think it can run it at all with an intel hd 3000 integrated graphic
just playing youtube videos at 1080p brings the CPU to 100%
man i swear i have done so many dialogs and never had this problem
why would the onLoad event handler not work at all with dialogs
keydown works fine but i can only use onLoad within the dialog defines
it is a bit outdated but i see people reference this on occasion http://tikka.ws/class/index.php?b=cfgAmmo
but... if you are manually doing a createDisplay you don't need an onLoad, because you can simply put that code right after it's created 🤔
i am not
disableSerialization;
createDialog "dialog_my_dialog";
_display = findDisplay 95000;
_display displayAddEventHandler ["Load", {hint "123"}];
that should be "onLoad"
it is only onLoad in the cfg
they dont use on in the sqf command
you are suppose to exclude the 'on' prefix
i dont think that event would fire if the display has already loaded?
Why add the onload? I mean you created the dialog yourself so you know it's already loaded; just call your function directly after your checks
ah, I see
but... if you are manually doing a
createDisplayyou don't need an onLoad, because you can simply put that code right after it's created 🤔
@exotic flax
disableSerialization;
createDialog "dialog_my_dialog";
private _display = findDisplay 95000;
// is loaded here
hint "123";
if (isNull _display) exitWith {};
yeah
could even add a waitUntil to be sure
the order of events just didnt click
i was using load and unload together and the ocd tookover i guess
Hello guys, i hope you're all going well !
I was wondering if there were another way to learn about if... then ... else than this : https://community.bistudio.com/wiki/if
I'm actually struggling with an if that work only when the condition is true and never execute the else 🤔
Thanks in advance for your help
if (cond) then {
};```
?
Yeah
is.. is that it? or are you saying you have an else and it just never executes?
I have an else that never executes yes sorry if that was unclear
could you paste it in chat. if its a big snippet upload it to pastebin and share the link
I dunno how to tag it as code on my phone but there it is
if(!isNull ce)
then {
acces allowDamage false;
acces setVariable ["R3F_LOG_disabled", true];
acces execVM "loads\crate\itemsCe.sqf";
pInf allowDamage false;
pInf setVariable ["R3F_LOG_disabled", true];
pInf setObjectTextureGlobal [0, "pics\ce.jpg"];
}
else {
acces allowDamage false;
acces setVariable ["R3F_LOG_disabled", true];
acces execVM "loads\crate\itemsDa.sqf";
pInf allowDamage false;
pInf setVariable ["R3F_LOG_disabled", true];
pInf setObjectTextureGlobal [0, "pics\da.jpg"];
};
"ce" is an invisible helipad that I create with Eden in the scenario I want with this camo
@flat elbow i now have a html dump of the ammo cfg if you want me to dm it to you
it looks ok to me, are you sure the !isNull ce returns what you think?
@robust hollow i wonder if it would be more helpful to make a wiki page with it?
it would, but the other config pages are made using BI functions to generate the page. i dont think ammo has one
@flat elbow there may be the problem I 've read it 10000 times and I think my problem is more a logical one
if you place that ce with the eden editor, it will always be there anyways
!isNull ce : returns true if the ce object is present and false if it is not
Not that I m lazy but I am using the same code for multiple mission template as my limited knowledge of scripting implies many mistakes
I have a line that says if(_uid player = "123") then {
Its telling me that it is missing )
if (_uid player == "123") then {};
@flat elbow you are suggesting that I should use isNil instead ?
i don't know much what are you trying to do but that could be the culprit, test the result with the debug console of isNull and isNil and see what fits
isNil is used when something does not exist usually, AFAIK
I will try
But reading the two wiki pages I m not sure to get the difference between isNil and isNull
isNull will check if something is Null (does exist, but no value)
isNil will check if something is Nil (doesn't exist)
@dry tendon https://pbs.twimg.com/media/CpnZzCaVMAAIICe.jpg
Ooh ok
although, if you add a variable through 3den (like an object name), then it will always exists
@exotic flax makes send now thank you
@flat elbow it should work then with isNil many thanks good sir !
Hey, trying to make it so when a task is completed it will then be deleted but im having some issues, this is what i have so far:
if (taskState task1 == "SUCCEEDED") then{
sleep 2;
["task1"] call BIS_fnc_deleteTask;
};
Getting an error about task1 being an undefined variable.
so in your case you most likely want to find all similar objects first (like helipads), check if their name is "ce" and then do something with it (and add an 'else' for other helipads)
yea as I said, without knowing what you are doing, it's hard to suggest, maybe you can setVariable and getVariable, or set the object to nil, or whatever approach best suits the situation
Yeah but I have the same initServer and initPlayerLocal for many mission template : it is more tedious at first but I think this spare me some headaches
Then in the mission where I want a "ce" camo I create the ce invisible helipad in Eden and in mission where I want an other camo, I don't create it
Does it sound THAT weird 😭
yes and no 😉
am I the only one that develop custom scripts for every mission?
I would simply create functions in my mission framework; one for default use, and one for special cases.
In 3den I would then call those scripts to each item which needs to default or special, in the init field.
My understanding of sqf isn't allowing me to do that for now ^^ but I'm trying things @flat elbow
and no Fluffy, you're not the only one
Although I do have a mission framework for loadouts, arsenal inventories and some scripts which we use a lot (but not all the time).
The only thing we need to do is either modify a settings file in the mission, or use mission parameters to change stuff on the fly.
Except I m drowing in the water besides the boat 😂
Sounds like a very good memory you got there mate !
remembers the time where Discord didn't exist and the forums were the only source of help
i used skype
insert pepperidge farm meme here
Is it possible to stream POV in game to a website? Just wondering before I spend anymore time googling. Essentially it would be cool if you could click a player on website and watch POV. I know how to do this in game.
I'm sure it would technically be possible, although it would require a mod with a custom extension which, and probably a second slot per player for the mod to access and stream their POV.
you can attach a camera and take that feed, like an helmet cam
but i concur it would require a mod with an external DLL to then be able to get it from a web server
but streaming 100 POV's at the same time will probably kill your server
most streamers already need a special system to handle a single POV stream
unless you make the mod run on the clients and stream it to somewhere else
not a server i'd play into, tho
in that just ask players to stream themselves and have a website which links to each stream 🤔
He is now a bi monkey
"REDIRECT CLIENT TO SERVER
So, after almost 2 years of working for Bohemia as external contractor, I decided it was time for me to call it a day. Of" from a website article, so i think that's not the case
Is there a something I can add to user action class that only allows Driver to activate?
it should have a condition property where you can add some code
do you know of an example?
What's the correct way to make a percentage chance of something? I'm trying to do random 1 == true, but it isn't working for some reason.
https://pastebin.com/y7KPqAHt
you're missing a ) on the end of your if condition
I think it was still throwing an error but let me spin up the fixed version on my dedi
random 1 < 0.5 would be 50/50 chance
random 1 < 0.25 would be 1 in 4 chance, and so on
damn it, I'm sorry, I thought it was an integer, the wiki clearly states float...
thank you for your help
no worries 👍
This is peak scripting
https://www.youtube.com/watch?v=WPM7v1cUUjM&feature=discord_a
@fair lava you know that vectorMultiply and vectorAdd are a thing right?
add it to your keydown/keyup eventhandler
fn_keyHandler.sqf if you're using base altis life
@robust hollow so like this?
{
createDialog 'life_admin_menu';
};
if that is inside the switch, then yea
aight
I get center of unit via
_position = _unit modelToWorldVisual (_unit selectionPosition "Spine3");
Is there a selection for Air, Sea, Land vehicles ? I am trying to get center of object for Draw3D
it didnt work
@real tartan you may find it using boundingBox(real)
@winter rose isn't it expensive for each frame ?
@exotic flax @flat elbow isNil does not seems to work either
Edit : I learned to read and apply correctly what is written, works fine now
@real tartan I think it might be handlable
tests to be done in order to ensure it, of course
@robust hollow i cant get it to work
I am trying so that time and weather changes when someone activates an addAction, but it does nothing
[[2020, 6, 17, 6, 0] remoteExec ["setDate"]];
for time and
0 setOvercast 1;
0 setRain 1;
forceWeatherChange;
for the weather, it`s in an SQF file
{
if((__GETC__(life_adminlevel) > 1)) then {
if(_shift) then
{
createDialog 'life_admin_menu';
_handled = true;
};
};
};
I have no idea why this isnt working
its under the key down handler
Hello
How do I apply ModuleZoneRestriction to units that have been killed and respawn?
The module synchronizes units and it works on those that have not been killed.
Trying to enable standard BIS revive system for ACE.
All ACE medical modules removed, also from mission file.
Revive settings are applied in the mission_component.hpp (mission didn't changed):
#include "\a3\Functions_F\Params\paramRevive.hpp"
};```
I select the needed options in lobby, but when somebody falls unconsious (lifestate == "INCAPACITATED"), I can't see any revive options for him.
Player has "medic" trait, and have a Medikit (it doesn't needed due to settings, but to be sure).
What else should I check for BIS revive system?
you need to go to mission parameters in Eden to enable the revive system
that or enable it in description.ext @unreal scroll
this is a random and not at all related to scripting, but why are you orange now Lou?
I seem to have been promoted as server moderator®
ewwww more responsibility
Hello guys ! Is there a way to run a for but with different variables instead of a variable in a given range ?
could you elaborate a little?
do ... ```
as in while _i equals one of a selection of values?
let me check how while works :3
private _i = -1;
// something to change _i probably
while {_i in [1,3,5,8,15]} do {
// something to change _i again I hope
};
?
that will work
forEach is for that @runic edge
in returns bool for that example
why not forEach?
a question that have more to do with math than with scripting but anyways: how do one calculate at what direction to shoot a projectile in order for it to hit another projectile?
basically i want to know how this https://en.wikipedia.org/wiki/Close-in_weapon_system can be accomplished
yes it's an incoming missle/mortar shell

probably, the problem is that i can't find a good elaboration on that
its not simple math so you may need to figure out it piece by piece
the best math i have made was 2D one, and it was many years ago, so i don't even know what to look for
but also in Arma does it need to be that accurate?
all i can think of logically is to know the vector and speed of the incoming projectile, the speed of the one i will be shoot, then calculate the position at wich on time T the projectile will be so that my projectile will hit it
at best it's a second or third order equation
something like that sounds like in right direction
yes, now i only need someone who can think in trigonometry and math to solve for it and then make that solution in SQF language
because i have no idea how to solve for it lol
you could ask from any of the CIW mod makers how they did it
This one seems pretty well explained: https://stackoverflow.com/questions/17204513/how-to-find-the-interception-coordinates-of-a-moving-target-in-3d-space (And it's seems that what you're looking for is called an interecpt course)
hive mind confirmed
still missing gravity though, and I'd assume as missile defense you'd shoot at long distance where gravity comes into play
anyone knows the syntax for setGearSlotAmmoCount in arma 2? there is no wiki page unfortunately, but patch notes mention it was added
Google -> second result ->
https://community.bistudio.com/wiki/User:Ceeeb/Sandbox
b:CONTROL setGearSlotAmmoCount SCALAR
ah yeah right, totally forgot gravity
I think gravity is... would be simple if you managed to figure that math out by yourself
does A3 account for gravity?
yes
$...
you can make them come down as a path instead of actually calculating gravity
Arma is a Simulation tho
Arma does have a thing that calculate the intercept course (for tanks, planes, etc), would be nice if we could have such command
so well you have to expand the calculation to include gravity too... i feel like it would be resource intensive
esp. for a gun that shoot 1000 rounds per minute and you have to calculate the interception point of each
should be sufficient to do it 10 times a second
considering distance, and gun shotspread, adjusting every 10th second should be sufficient
but yes, the game should definetly have a command to return the intercept course
i am also surprised this is not provided in the CBA either
Hey, trying to make it so when a task is completed it will then be deleted but im having some issues, this is what i have so far:
if (taskState task1 == "SUCCEEDED") then{
sleep 2;
["task1"] call BIS_fnc_deleteTask;
};
Getting an error about task1 being an undefined variable.
Anyone knows the list of brown Mohawk textures?
@young current i tried the forEach and it works ... or kinda :
I lined up two forEach in the same file and it seems that only the first one runs
if (isPlayer _x)
then {
if (!isNil "ce")
then {
_x execVM "loads\ce\zeus.sqf";
}
else {
_x execVM "loads\da\zeus.sqf";
};
};
} forEach [
god,
god1
];
{
if (isPlayer _x)
then {
if (!isNil "ce")
then {
_x execVM "loads\ce\cdg.sqf";
}
else {
_x execVM "loads\da\cdg.sqf";
};
};
} forEach [
_sgCdg,
_grCdg
];
did I made a mistake in syntax somehow ? if i did, i cant fnid it
that or enable it in description.ext @unreal scroll
@winter rose
I've added the following to my description.ext:
ReviveMode = 1; //0: disabled, 1: enabled, 2: controlled by player attributes
ReviveUnconsciousStateMode = 0; //0: basic, 1: advanced, 2: realistic
ReviveRequiredTrait = 1; //0: none, 1: medic trait is required
ReviveRequiredItems = 2; //0: none, 1: medkit, 2: medkit or first aid kit
ReviveRequiredItemsFakConsumed = 0; //0: first aid kit is not consumed upon revive, 1: first aid kit is consumed
ReviveDelay = 6; //time needed to revive someone (in secs)
ReviveMedicSpeedMultiplier = 2; //speed multiplier for revive performed by medic
ReviveForceRespawnDelay = 3; //time needed to perform force respawn (in secs)
ReviveBleedOutDelay = 120; ```
Nothing changed. Any ideas?
I am trying so that time and weather changes when someone activates an addAction (on a server), but it does nothing
[[2020, 6, 17, 6, 0] remoteExec ["setDate"]];
for time and
0 setOvercast 1;
0 setRain 1;
forceWeatherChange;
for the weather, it`s in an SQF file
@unreal scroll remove the mods
of course it doesn't do anything @fervent kettle
[[2020, 6, 17, 6, 0] remoteExec ["setDate"]];
↓
[
[2020, 6, 17, 6, 0] remoteExec ["setDate"]
];
```why would you do that?
@winter rose I took a look at the links you sent and this is what i have now:
if ("task1" call BIS_fnc_taskCompleted) then{
["task1"] call BIS_fnc_deleteTask;
};
But it still doesnt delete the task.
where do you put this?
This is the whole script:
_commanderAziz = {
//set up the task
private _title1 = "Kill Colonel Aziz";
private _description1 = "Kill The Colonel.";
private _waypoint1 = "Target";
//define commander
private _commander = "CUP_O_TK_Story_Aziz";
//define and randomize commanders men
_azizMen1 = ["CUP_O_TK_Officer", "CUP_O_TK_Soldier"];
_azizMen2 = ["CUP_O_TK_Officer", "CUP_O_TK_Soldier", "CUP_O_TK_Soldier", "CUP_O_TK_Soldier"];
_azizMen = selectRandom [_azizMen1, _azizMen2];
//define markers adn randomly choose one
_markers = selectRandom ["assassin1", "assassin2", "assassin3", "assassin4"];
//spawn commander
_groupEast = createGroup East;
_unitAziz = _groupEast createUnit [_commander, getMarkerPos _markers,[], 5, "NONE"];
//sapwn commanders men
_groupAssistAziz = createGroup east;
_groupAssistAziz = [getMarkerPos _markers, east, _azizMen] call BIS_fnc_spawnGroup;
//create task
_azizTask = [player, ["task1"], [_description1, _title1, _waypoint1], _markers, 1, 2, true] call BIS_fnc_taskCreate;
//complete task
_unitAziz addMPEventHandler ["MPkilled", {["task1","SUCCEEDED"] call BIS_fnc_taskSetState}];
if ("task1" call BIS_fnc_taskCompleted) then{
["task1"] call BIS_fnc_deleteTask;
};
};
why do you set it to succeeded, why do you check status if it is all to delete it?
Oh ok, and regarding the weather?
also wrong task id in BIS_fnc_taskCreate usage
@fervent kettle maybe your code was throwing an error, therefore not doing anything else
try fixing the setDate and see?
weather is in another file, also no errors so far
why is it in a remoteExec @fervent kettle ?
But the task itself does get created without error the only issue is the delete part, i need it to be deleted once completed so the script can be ran again
@fervent kettle https://community.bistudio.com/wiki/forceWeatherChange has to be done server-side
on the wiki it said remoteExec is used on MP
@jagged elbow
also wrong task id in BIS_fnc_taskCreate usage
check https://community.bistudio.com/wiki/BIS_fnc_taskCreate
how exactly do i execute that on the server?
initServer.sqf for example
anyone knows the syntax for
setGearSlotAmmoCountin arma 2? there is no wiki page unfortunately, but patch notes mention it was added
asked this before, but the answer i was given (https://community.bistudio.com/wiki/User:Ceeeb/Sandbox) just despawns the mag in question
i want 2 files so you can change the weather to your liking
maybe im just thinking a bit more complex then it is
Not sure how its wrong, looking at the example on the wiki: [civilian, ["task1"], ["Do this and you get a cookie", "Earn Cookie", "cookiemarker"], [0,0,0] ,1, 2, true] call BIS_fnc_taskCreate; the task id is the same
the examples are wrong, it should be "task1"
well, maybe it works in this syntax too, IDK
@fervent kettle
given you use addAction it is potentially clientside, therefore use ```sqf
remoteExec ["forceWeatherChange", 2]; // 2 = server
@jagged elbow again, why would you check if it is completed if you set it to succeeded on the line just before? this if check is useless
it might be an MP delay issue, IDK
Because when i simply deleted the task without an if statement it would delete the task insantly not giving the player a chance to do the mission
i only want the task to be deleted once the commander has been killed
[[2020, 6, 17, 6, 0] remoteExec ["setDate"]];
↓
[
[2020, 6, 17, 6, 0] remoteExec ["setDate"]
];
```why would you do that?
@winter rose wait do what exactly?
okay so im trying to set/get individual ammo counts on magazines in arma 2
the changelog lists setGearSlotAmmoCount as a command that was added in 1.62
so im trying to do the following
createGearDialog [player, "RscDisplayGear"];
_dialog = findDisplay 106; // 106=gear
_control = _dialog displayCtrl 114; // 114=slot
_control setGearSlotAmmoCount 50; // set to 50
the magazine is still visible in gear after executing this, but despawns whenever the gear refreshes next time
the command isnt listed on the wiki so i dont really know if this is the correct syntax. it doesnt error at least
well there is commands to add mags with specific number of bullets, is that what you are trying to achieve?
oh sorry maybe not in arma 2
there is, but you cant decide which one to remove
well you would remove and re-add them all i would suggest
nah dont want to do that
if possible
this command should work somehow i guess
hmm it actually throws Bad conversion: bool into logs
wait do what exactly?
@fervent kettle do place the command in an array 😄
you don't do [player setDamage 1] do you?
Hello guys, does anybody have understanding of arma netcode?
We are trying to solve bandwidth spikes when a lot of units are created and we need to know the following aspects:
-
does creation of a single unit from class name generate the same amount of network traffic as creating an empty unit and then filling his inventory one by one?
-
are multiple manipulations of soldier inventory queued separately or will they be converted into a single packet? For instance, is 10x
add magazine "123"going to generate same traffic asadd magazine ["123", 10]?
Currently we have a fixed set of unit loadout variants and we are thinking of making a pool of pre-created and pre-decorated units with disabled simulation and visibility, and taking units from this pool.
Other ideas are welcome too.

does creation of a single unit from class name generate the same amount of packets as creating an empty unit and then filling his inventory one by one?
no, first one less
are multiple manipulations of soldier inventory queued separately or will they be converted into a single packet?
both
For instance, is 10xadd magazine "123" going to generate same traffic as add magazine ["123", 10] ?
Would need to check but I don't want to check, my op started 19 minutes ago and I'm already a bit late :u
go play! è_é
need to fix bug :U
GO. PLAY.

the dots are not

•
Hah! Stolen
stahp fixing bugz, if you don't relax from time to time you will add more bugs than you will solve 😄

Thanks that will be useful
Dedmen stealing my emotes
I assume the addmag 10 at a time is more efficient, but cannot look and not confident
well, it's either same or more efficient (?)
also, some classnames are more efficient than others 
yes
addmag 10 at time is always better either way
thanks a lot!
Anyone knows the names of dark-green textures for Mohawk?
Can BIS_fnc_hasItem search by variable name or is it only by classname?
did you check the wiki?
It uses classname in the examples but doesn't actually specify
the search parameter is only listed as a String
I don't see how that covers what I'm asking
I just want to know if I can search for an item by its variable name rather than its classname (for example if I have given a backpack a variable name)
item: String
means it accepts only a string.
typeOf could help search for the type of your backpack - else, this function is not for you
this ↓ should cover what you want, or a variation of this to check inside backpacks
_myBackpack in everyBackpack _myBox;
@hallow mortar ^
this is in the context of trying to identify and track a specific backpack (including when a player is carrying it)
context helps, indeed
I know there are some ways of doing it with setVariable and stuff, I'm just trying to see if there's an easier way. I thought fnc_hasItem might be it, but it isn't
maybe part of it
everyBackpack doesn't appear to work on units so it would need to be done in conjunction with other checks such as unitBackpack
{
if((__GETC__(life_adminlevel) > 1)) then {
if(_shift) then
{
createDialog 'life_admin_menu';
_handled = true;
};
};
};
i have no idea why this isnt working
@hallow mortar yep
@grim wing it may be better for you to go on the L*fe Discord server linked in #channel_invites_list in order to talk about their framework.
@fervent kettle do place the command in an array 😄
you don't do [player setDamage 1] do you?
@winter rose so i can just do[2020, 6, 17, 6, 0] remoteExec "setDate";
or
2020, 6, 17, 6, 0 remoteExec "setDate";
urgh
the first one please
ah right
Parameters do have to be in an array, especially when they are an array in the non-remoteExec version of the command
if it doesn't work or throws an error, try [[2020, 6, 17, 6, 0]] remoteExec "setDate";
Actually I'm pretty sure "setDate" should be in an array too, since the right side of remoteExec is actually an array with optional elements
oh wow, I missed that - of course it must be in an array 🤦♂️
@fervent kettle ^
[[2020, 6, 17, 6, 0]] remoteExec ["setDate"]; // final.pdf
thanks, was wondering why it gave me an error ^^
Reaaad the wiki 👀 😅
i did and in game it gave me a missing " ]" error so i thought i could just bracket the whole thing lol
class CfgSounds
{
sounds[] = {};
class TerminaField
{
//how the sound is refferd to in the game
name = "TerminaField";
//filename volume and pitch levels
sound[] = {"sound\TerminaField.ogg", 1,1};
//subtitle delay in seconds, subtitle text
titles[] = {};
};
};
Dose this look wrong??
It does on a discord level since it isnt inside a code block 
@whole plinth use the following formatter around your config :
```cpp
/* your code */
```
what does cpp actually stand for?
ah nifty, thanks
not to be confused with CCCP
Союз Советских Социалистических Республик
Well thats a chonky name
@whole plinth
you can compare with https://community.bistudio.com/wiki/Description.ext#CfgSounds
The problem I keep having is Sound not found
Is it possible to set the textureNoShortcut of a shortcut button through scripting?
@whole plinth what are you using as a command?
@umbral oyster no key change through scripting no.
(imagine the hackers…)
😦
playsound
playSound "TerminaField";
and where did you put the above CfgSounds?
in the MPmission folder where the mission file is.
how
eh you, weren't you away playing?
just killed a tank and had a few seconds while reloading my AT
the sound file is in the sound folder.
…you are not helping us helping you
where did you write this config, where did you place the sound file, how is your mission directory organised!
Config is in the this location--mpmissions\Afghanistan%20theater%20war_Jarvis.DYA
sound file is in the Afghanistan%20theater%20war_Jarvis.DYA folder
Config is in the this location--mpmissions\Afghanistan%20theater%20war_Jarvis.DYA
not helpful
which file
The Config is in the main folder of the mission.
Which has the actual sound file is in the same folder but has its own folder inside the main folder of the mission.
dude
I'm out of IDEs
well ```cpp
class CfgSounds
{
sounds[] = {};
class TerminaField
{
name = "TerminaField";
sound[] = { "sound\TerminaField.ogg", 1, 1 };
titles[] = {};
};
};
Is there away to get that to activate when a person pass through a trigger??
@whole plinth yes, in the trigger's properties
@grim wing that is not #arma3_scripting , please delete your messages here and head towards #arma3_troubleshooting
striker enableSimulation true;
_wpstrike = striker_group addWaypoint [getPos strike_building,0];
_wpstrike setWaypointType "Destroy"; striker flyinHeight 200;
_wpexit = striker_group addWaypoint [getMarkerPos "strike_exit_mark",0];
_wpexit setWaypointType "Move";
hint "striker is coming";
striker_group setCurrentWaypoint [striker_group, 1];
striker doTarget strike_building;
striker doFire strike_building;
waitUntil
{
!alive strike_building;
};
striker_group setCurrentWaypoint [striker_group, 2];
waitUntil
{
striker distance getMarkerPos "strike_exit_mark" < 200;
};
deleteVehicle striker;
Alright crew, see code above. want the jet to come in, bomb the designated target, then exit
When close to exit, should delete
only he never heads to the exit
so i can addWaypoint _wpexit ?
maybe i don't know how to call my local variables correctly
addWaypoint _wpexit;
?
Situation: dedicated server, in a player init script I launch the function with:
player remoteExecCall ["OT_fnc_revivesystem",player];```
The function itself:
```sqf
private _unitP = _this;
_unitP addeventhandler ["handledamage",{
params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"];
if (!((lifeState _unit) isEqualTo "INCAPACITATED") && {isNull objectParent _unit}) then {
if (_damage > 0.96) then {
_damage = 0.96;
_unit allowdamage false;
//here I've checked all of the params - it is ok
[_unit,_selection,_instigator] remoteExecCall ["PiR0",2];
};
};
//...somewhere here enabling damage with delay
if !(alive _unit) then {
_unit removealleventhandlers "handledamage";
};
_damage
}];```
The probem: this doesn't call PiR0 function: [_unit,_selection,_instigator] remoteExecCall ["PiR0",2];
The function is visible for server, and passed params are ok (_unit,_selection,_instigator) - I've checked it with marker just before the function call line.
It works, if I call it locally, with local params, like ```[cursorobject, "spine3", cursorobject] remoteExecCall ["PiR0",2];``` - but not in the handler. What I missed?
P.S. In PiR0 function, in the beginning:
```sqf
if !(isServer) exitWith {};
params ["_unit","_selection","_shooter"];
//here I put a marker - and nothing```
Interesting, that it works for AI and "MPHit" handler.
can you put a marker before the isServer?
also, are there any sleep or waitUntil in this function?
ah, yeah
missing } 🙄
@unreal scroll ^
@winter rose Good eye, thanks - but it is the typo: I just don't want to put all of the code here, it works well.
"also, are there any sleep or waitUntil in this function?" - no :)
"can you put a marker before the isServer?" - already checking, it is the last option - then I just add the MPHit EH...
Referring to existing info about handler, the main difference is that it can handle more than one event in one frame - maybe the cause lies here.
@spark rose
striker enableSimulation true;
hint "striker is coming";
striker_group move getPos strike_building;
striker reveal strike_building;
striker doTarget strike_building;
striker doFire strike_building;
waitUntil { sleep 1; not alive strike_building; };
striker_group move getMarkerPos "strike_exit_mark";
waitUntil { sleep 1; leader striker_group distance getMarkerPos "strike_exit_mark" < 200; };
{ striker deleteVehicleCrew _x } forEach crew striker;
deleteVehicle striker;
NB: For missions it is essential to add exit conditions, to avoid endless loops. Like
waitUntil { sleep 1; !alive strike_building or time > _timeout};```
@unreal scroll if you have the smallest repro mission (ever) for your issue, dm me
I would like to spawn a tanker aircraft for air to air refueling dynamically. Is there an easy way to determine where the enemy units are on a map to avoid them, if possible?
something like bis_fnc_find_safePos but with opposing units in the equation
@round scroll afaik there is no "all-in-one" solution for this (but I might be wrong)
@winter rose Oh, I doubt it would be easy to track all of the the depedencies (the mod is very complex), but thanks. Anyway, If something doesn't work by selected way, there is always an option to walk another one :)
"Is there an easy way to determine where the enemy units are on a map to avoid them, if possible?"
Only to do the math. The best way I believe is to use random pos, until you find a place where the distance to closest enemy unit >= desired distance.
Use allunits + vehicles arrays.
private _allFlyingEnemies = vehicles select { side effectiveCommander _x == east && { (getPos _x select 2) > 10 } };
from there, use random and distance2D maybe
he he, so far I was more afraid of the pesky NVA AA and SAMs then MiGs, but good point!
@round scroll sqf private _yourplane = _this; private _desired_distance = 3000; private _placefound = false; while {!_placefound or {conditions for backup exit, like timeout}} do { _placefound = ((allunits + vehicles) findif {side _x isEqualTo *** && {_x distance2D _yourplane < _desired_distance} && {...}}) isEqualTo -1; }; if (_placefound) then {} else {};
nice, thanks
Sorry to bother. Probably just me being blind but in one of my function SQF files I declared the params
params [["_posX", 0, [0]], ["_posY", 0, [0]], ["_posZ", 0, [0]]];```
But ArmA 3 throws me an error at my face when loading the mod:
```params [["_posX", -1, [4]], ["_posY", -1>
0:38:02 Error position: <params [["_posX", -1, [4]], ["_posY", -1>
0:38:02 Error Params: Type Bool, expected Number
0:38:02 File \Armitxes_Core\functions\map\fn_isMapResourceAvailable.sqf [ARMI_fnc_isMapResourceAvailable], line 16```
I thought maybe ArmA 3 is interpreting 0 and 1 as false and true so I tried to changed it to
```sqf
params [["_posX", -1, [4]], ["_posY", -1, [4]], ["_posZ", -1, [4]]];```
But it makes no difference 😐 can someone tell me what I'm overseeing? Any help is appreciated.
Put a
diag_log str _this;
On the top of your function. So you can check what input cause the error
Good idea with the diag_log. Actually there should be nothing calling these functions. I'm only declaring them, and not calling them in any script.
Now I just get
diag_log str _this;
params [["_posX", 0, [0]], ["_posY", 0, >
1:09:13 Error position: <params [["_posX", 0, [0]], ["_posY", 0, >
1:09:13 Error Params: Type String, expected Number
1:09:13 File \Armitxes_Core\functions\map\fn_isMapResourceAvailable.sqf [ARMI_fnc_isMapResourceAvailable], line 17
1:09:13 Error in expression <e]"
diag_log str _this;
params [["_posX", 0, [0]], ["_posY", 0, >
1:09:13 Error position: <params [["_posX", 0, [0]], ["_posY", 0, >
1:09:13 Error Params: Type Bool, expected Number
1:09:13 File \Armitxes_Core\functions\map\fn_isMapResourceAvailable.sqf [ARMI_fnc_isMapResourceAvailable], line 17```
In the logs ^^ will test further 😐
But you seem to be correct Dedmen. Something is calling it, types are changing. No idea what since I just made it but atleast I know that my params are set correctly 🙂
Thanks for the help. My issue is solved -.- My function was called with [""postInit"",1]. Did mess up my CfgFunctions class isMapResourceAvailable { postInit = 1; };.
Removing the postInit solved the issue. Got something mixed up there.
@willow basinyou could've used my debugger, it would've printed you a callstack with all arguments to RPT and you would've seen where it was called from 😉
Text the makers of the mod. Often something can be arranged. Mostly to prevent reuploads or credit thieves.
You would be surprised how many don't care about licenses and terms. And mod owners are tired running after everyone. Anyways, I think this is the wrong channel 😉
@flat elbow #ip_rights_violations #other_ip_topics are channels you may want to read through.
asking to use something usually can result in a solution both parties are happy with.
but keep this channel on topic of scripting
Is there a way to limit who has access to my addaction?
Doesnt addaction have a condition field?
Possibly but no sure how to set it up
whats the code?
Probably for a very obvious reason
object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint]```
I filled it with
```this addAction ["Open Strategic Map", "openMap.sqf", "", "", "", "", "", "", "5", "", "", ""]```
some of those arguments arent even the right type?
Trying to limit the radius, and only allow certain people to use it
so whats not working? the radius or is it not showing up?
this addAction ["Open Strategic Map", "openMap.sqf", "", 1.5, true, true, "", "true", 5]
Will try that connor
So that works, but where do I put the variable name I want to limit it too?
in the condition field
or if it is just a number you can replace the 5 with it
i dont remember if radius hides the action or just doesnt let you activate it. if it doesnt hide it, use the condition.
no.
still no.
what I wrote above will make sure the player wont see the action unless they are within 5 meters of the object the action is on.
Yeah, but what im wanting to do is limit who can see it as well
ok, so only add it to the units you want to be able to use it
But then it will show constantly on there screen if I put it in the init of the player
if you're doing it wrong sure.
give the object the action should be on a variable (say whiteboard in this case). then give each unit a variable name (say unit1 in this case, where the number increases for each unit). then in the player init do something like
if (player in [unit1,unit2,unit4]) then {
whiteboard addAction [/* arguments */];
};
or something like that
alternatively you can set a variable to the units you want to see it
if (player getVariable ["canUseWhiteboard",false]) then {
whiteboard addAction [/* arguments */];
};
or one of many other ways you could restrict who can see it.
if (player in [Bigdaddy]) then {
whiteboard addAction ["Open Strategic Map", "openMap.sqf", "", 1.5, true, true, "", "true", 2];
};
``` I did this but it isnt working, have I missed out on something and im just being dumb?
check pinned messages
ya
dont think that works
So I got it to work via a trigger, but its still accessible to everyone, I only want certain people to see and use it
if (isPlayer BigDaddy) then {
whiteboard addAction ["Open Strategic Map", "openMap.sqf"]; };
``` I was using this and it worked.
I shortened the argument just to test
btw you can use https://community.bistudio.com/wiki/profileNameSteam
to see what their steam profile name is
in the editor if you set the slots variable name you can do if (player == variable name)
and i dont think isPlayer works, all that does is check if BigDaddy is a player, not if the current player is bigdaddy
Idk what that is
just make a file in your mission called initPlayerLocal.sqf
and it will run locally for all clients connecting
Will do
Same result, I dont want it to be accessible for other players, but certain people can access and use it at the same time
so what have you put in initPlayerLocal
if (Player == BigDaddy) then {
whiteboard addAction ["Open Strategic Map", "openMap.sqf"]; };
im not sure about remote controlling
Will have to look into it
works for me
how do I change the distance of scroll wheel option from an AI
Hey guys, new to scripting and this fourm but this seems to be the right place, long story short. I have a night mission where players are going to use flashlights but I want a small amount of ambient light to glow around the players, essentially im trying to achieve this by making any REAL player who joins have a glowing ball of light spawn on them and be attached to them, issue I am currently having is that even though in SP Eden testing, the orb attaches to me but for some reason it seems to be laggy, the orb is trailing me but not smoothly. Hard to explain, here is the code bit I have for right now. ```_players = allPlayers;
while {1 > 0} do{
_lightSource = [] spawn {
lampLight = "#lightPoint" createVehicle position player;
lampLight setLightBrightness 0.65;
lampLight setLightColor [.60,.60,1];
lampLight setLightAmbient [.60,.60,1];
};
sleep 10;
{_x attachTo [_players, [-0.1,0.1,1.15],"Pelvis"]} forEach _players;
};``` Any advice would be appreciated, and please keep it simple for my monkey brain
ignore the sleep portion of that, I was trying to see if that had anything to do with the jumpy look of the light, ranged the value from 0.1 to 10 and not using sleep at all. Didn't make a difference.
in my experience lightpoints just dont move smoothly when attached to objects.
you might want to try https://community.bistudio.com/wiki/lightAttachObject , but i dont know if it will help any
then again, the notes say
When attached, movement is slow to update (jumpy). Use attachTo when attaching a light to moving objects.
See thats the exact note I saw too, but it seems that they both behave similarly. Both are jumpy, basically it creates a light at my pos, as I walk in a straight line, it creates 1 or 2 new light sources a second, with them expiring within about 6 seconds. Its like im playing a game of snake honestly.
oh, i didnt read your snippet tbh. give me a sec ill fix it up.
Thats fine, ideally I would like to create "Camping Lamps" and attach them to players with a switchLight addAction on the lamp, but thats beyond my knowledge at this moment.
ideally, you wouldnt use a loop for this at all. instead you would create the light once in the player init. something like
private _lightSource = "#lightPoint" createVehicle position player;
_lightSource setLightBrightness 0.65;
_lightSource setLightColor [.60,.60,1];
_lightSource setLightAmbient [.60,.60,1];
_lightSource attachTo [player, [-0.1,0.1,1.15],"Pelvis"];
player init? IS that like an init.sqf but for each player as they join?
I'm sorry I literally just picked this up like Monday
for this you could use initPlayerLocal.sqf, works the same as init.sqf, but it only executes for the connecting player.
it should start by waiting for the player object to be ready. I dont know how the smart people like to do it these days but i've never had issues with the following.
// initPlayerLocal.sqf
waitUntil {player isKindOf "CAManBase"};
private _lightSource = "#lightPoint" createVehicle position player;
_lightSource setLightBrightness 0.65;
_lightSource setLightColor [.60,.60,1];
_lightSource setLightAmbient [.60,.60,1];
_lightSource attachTo [player, [-0.1,0.1,1.15],"Pelvis"];
it's worth noting light points are local. so players will only see their light point. if you want players to see everyone's light points, you would need to modify that ^ a little and make it execute for every player when one joins.
Thank you for the edit! btw just so I know, what does this piece do? waitUntil {player isKindOf "CAManBase"};
it waits for the player object to actually be a man type.
basically, for a short period when they're connecting and loading in, the player exists as some kind of weird virtual half-entity, and some things don't work properly if they're done to the player while in that state. That code waits for them to become a real human bean before doing anything.
also, don't forget about the new Light Cone objects from Contact. They're useful and can be modified!
Thank you again @robust hollow and thank you for the input as well @hallow mortar, Im going to finish this here in a few minutes and then im going to try the lantern with the ability to toggle the light on and off.
Which way do I use to find UXO on the map globally?
allMissionObjects "<something>" ?
to find UXO
whats that
unexploded ordnance - when you drop a cluster bomb, it pollutes the map with its unexploded parts which you need to clean up by a script
Guys. RPT spam
Warning: Cleanup player - person 2:1862 not found
Warning: Cleanup player - person 2:1862 not found
When exiting the game
Is there a way to find out which vehicles have been added to group using https://community.bistudio.com/wiki/addVehicle?
assignedVehicle @verbal rivet
It seems it's different concept, addVehicle vs assignVehicle and leaveVehicle vs unassignVehicle https://community.bistudio.com/wiki/leaveVehicle
I've tried quickly, assignedVehicle returns something only for actual vehicle crew
At least according to the docs, but in any case thanks for suggestion
It's the closest we have, unfortunately
Lou, I've tried that weather thing you told me yesterday. It worked in Eden MP but when uploaded onto a server it doesn't seem to work
@robust hollow ```sqf
waitUntil { not isNull player };
ive had trouble with a rare issue where the player loads in as a bird, figure the way i wrote might also wait for that extra condition of being an actual person 🤷♂️
fair enough 😂
Hi All!!
Anyone knows how to change an image size in a HintC text?!
I'm usint this but if I try yo type the "size" attributes it doen't work and shows me an erro:
_separator = parseText "<br />";
_image = "help_faid.paa";
_txt = composeText [_separator, image _image ,_separator, _separator, "USE THE FIRS AID KITS.", _separator1, "TO CURE YOURSELF"];
"HELP!" hintC _txt;
how were you trying size?
bcause my image is displayed as 16x16px very very small
So I'm kinda new to this discord. Can I throw scripts in here and someone tell me if it's borked?
looking to bounce ideas off a couple people
were you trying it like this though? in my mind this should work
composeText [_separator, "<t size=2>", image _image, "</t>",_separator, _separator, "USE THE FIRS AID KITS.", _separator1, "TO CURE YOURSELF"];
alternatively you could try
composeText [_separator, "<img size=2 image='", _image, "' />",_separator, _separator, "USE THE FIRS AID KITS.", _separator1, "TO CURE YOURSELF"];
@wheat island no harm in trying.
Awesome.
So, I'm attempting to create a "Clear Vehicle Inventory" script, which can be executed once you're inside the driver's seat of a vehicle. I was thinking of something similar to what's below.
addAction for each vehicle```sqf
_this addAction [
"<t color='#ffff' font='' size='1.2'>Clear Vehicle Inventory</t>",
"scripts\client\clearInventory.sqf",
[],
10,
yes,
false,
"",
"driver vehicle == player",
];
scripted code ```sqf
// Add action parameters
params = ["_target", "_caller", "_argumentID", "_arguments"];
// Clear the vehicle's inventory.
_target clearBackpackCargoGlobal;
_target clearWeaponCargoGlobal;
_target clearItemCargoGlobal;
_target clearMagazineCargoGlobal;
Thoughts? Improvements?
params = ["_target", "_caller", "_argumentID", "_arguments"];
👇
params ["_target", "_caller", "_argumentID", "_arguments"];
no need to define the other variables if you dont use them
yes -> true (unless that is a variable which is mildly weird imo)
so I could get away with just _target?
shouldnt need to define font='' unless you are specifying a font
yea in that snippet _target is all you need
ok
and yeah the <t> stuff is placeholder until I go and actually look up the font face and hex codes
"driver vehicle == player" unless vehicle is a variable you might be meaning "driver vehicle player == player"
hmm
yeah im just trying to get whoever's in the drivers seat, and give them an addaction
yea what i suggested then
awesome
_this addAction [
"<t color='#ffff' font='placeHolder' size='1.2'>Clear Vehicle Inventory</t>",
"scripts\client\clearInventory.sqf",
[],
10,
yes,
false,
"",
"driver vehicle player == player"
];
params ["_target"];
clearBackpackCargoGlobal _target;
clearWeaponCargoGlobal _target;
clearItemCargoGlobal _target;
clearMagazineCargoGlobal _target;```
How's that look?
How to find stringtable codes for standard arma action menu items?
Say, "Engine On", "Get Out", "To Passenger seat"
personally i search the string tables manually.
@wheat island change that yes to a true and I think it should be decent. assuming those are still two different snippets like they were earlier
is nearEntities broken or changed its behaviour? This code used to work in 2017/2018: private _entities = (getPos _crane) nearEntities [ ["Plane"], 10 ];
would find the planes in 10 meter radius around the crane, but now I don't get any result, just empty array
oerks, maybe the getPos ruins it
yes, that's it, nevermind
not sure why getpos would break that @round scroll , nearentities can accept an object or a position for that param. It's possible something else is not working as expected
it seems to work in VR but not on the Nimitz, I guess it's some problem with ATL vs ASL inside nearEntities and a pos
ah, on a ship?
I think... if you provide a 2d position, the check is not spherical
sorry, just tested this, with getPosATL it returns [], with getPosASL it returns [p]: hint str ((getPosATL t) nearEntities [ ["Plane"], 10])
let me rephrase.. the check is 3d if you provide an object or 3d pos... the check is 2d (alititude ignored) if you provide an [x,y] type
ah, like [getPos t # 0, getPos t # 1]
yes
understood now
Hello! How to select a random group from "CfgGroups"? (I would like to use it with BIS_fnc_spawnGroup)
but be aware, with the 2d check, it will return any aircraft directly overhead your 2d pos, regardess of altitude
so even 2000m above the ship
yeah, I just the crane instead of it's position and all is good
ok cool
@robust hollow I'tried, bit it does not work
i also tried:
_separator = parseText "<br />";
_image = "help_faid.paa";
_txt = composeText [_separator, "<img size='2' image='", _image, "' />" , _separator, _separator, "USE THE FIRS AID KITS.", _separator1, "TO CURE YOURSELF"];
"HELP!" hintC _txt;
but nothing
@tough abyss try
private _txt = parseText "<br /><img size='2' image='help_faid.paa' /><br /><br />USE THE FIRST AID KITS<br />TO CURE YOURSELF.";
"HELP!" hintC _txt;
Okay
I'm new so sorry if I'm dumb. I want to set up a spawn point where when they spawn they go into patrol and into houses and stuff like that. I have a spawn point setup with the options. Sector tactic and spawnpoints setup
hi, does anyone knows how to get the "caller" from a useraction defined on a config? the script is in a vehicle and the caller should be anyone who calls the action ,I got in the config user action : statement = "[this] execVM ""\mlv_static01\scripts\milan\reload.sqf"";";
if it is the same as addAction, see the following:
https://community.bistudio.com/wiki/addAction
I want to set up an ai when it spawn it will patrol does anyone have a video or something for that
@waxen cape see this YT video about "CYCLE" waypoints
https://www.youtube.com/watch?v=bcn2-t1pYN0
this one happens in Zeus but it is the same in Eden Editor
oh, IDK
scripting, I suppose
I have zero experience in any scripting other than today lol
I don't know how you could do this with these modules.
for a patrol
use BIS_fnc_taskPatrol, or if you have CBA you can use the CBA version of taskPatrol
if it is the same as
addAction, see the following:
https://community.bistudio.com/wiki/addAction
@winter rose it doesnt seems to be the same, if anyone has experience please help
Hi, is there an explanation for this code to work in my debug console but not in a script I spawn ?
addMissionEventHandler ["Draw3D", {
drawLine3D [ASLToAGL eyePos player, [3292.97,12960.5,0.00142646], [1,0,0,1]];
}];
Where can I post a picture I'm have a lot of issues I need help with
@compact maple yes, if you spawn it on the server and not on the client
@waxen cape you can post on e.g imgur and link it here (with description, see #rules)
Okay I figured it out idk what was going on really
My question though how would I create a code that when a player died he respawns with a default loadout
Or just spawns at all really
I'm trying to make it to where when you spawn you will only have certain cloths on and no weapons so you go to the arsenal and stick up and load up or whatever is there a way to do that
you can use the respawn event handler yes
Where is that?
Nevermind I found a way around it XD
I guess lol
I just start with no loadout I made custome guys and added them to my custom saves and when into multiplayer options and clicked save loadout so now when they respawn they respawn with nothing lol works well ig
_target addEventHandler ["killed", {
params [ ["_target", objNull] ];
private _position = position _target;
private _class = typeOf _target;
sleep 3;
deleteVehicle _target;
sleep 3;
createVehicle [ _class, _position, [], 0, "CAN_COLLIDE" ];
}]
Arma is telling me "generic error in expression" in the second sleep 3; line
any idea what that might be?
you cannot sleep in a eventhandler
oh
they are unscheduled
ye
hey, if i have 60fps does onEachFrame executes the script 60 times a second so does it adjust the execution time to my fps? If so - isn't it more efficient to use onEachFrame instead of a sleep 0.01 (execution time 100 times a second)? Or am i wrong in the matter of performance?
weird question:
Assuming I have a long script that, at the very end, sleeps for a long time and calls some simple cleanup code
is it a good idea to actually spawn code that does only the cleanup stuff?
does a piece of code keep any considerable amount of state around to make this in any way helpful?
I'm asking it as more of a hypothetical question; I don't have any code long enough to make this relevant, but I'm kinda curious
I want to open the CBA settings of my mod through script (the menu in esk->addon options). Is it possible to do this?
_
sleep 0.01(execution time 100 times a second)? Or am i wrong in the matter of performance?
Sleeping less than frame interval is useless to achieve higher execution frequency, scheduler will only resume to your script once per frame
hey, if i have 60fps does onEachFrame executes the script 60 times a second so does it adjust the execution time to my fps?
it just calls your code once per each frame
if you code takes 10ms to run, each frame will become 10ms longer, framerate will drop
@loud python sorry I don't quite understand the question
Sleeping less than frame interval is useless to achieve higher execution frequency, scheduler will only resume to your script once per frame
@astral dawn makes sense, thanks 😁
remember those oldschool games where some things went faster with unlocked framerate?
that's one reason
ugh?
that's a thing that happened with some older games
In arma SQF we are locked to game's frame rate
there was some game that didn't run over 30 FPS on PC and people modded it to unlock the framerate
suddenly their cars went faster
And arma runs as fast as the hardware allows it... so... what are we questioning now? 🤔
at 60fps all the cars went twice as fast, etc.
aka. the devs had actually tied the speed of certain in-game things to the frame rate
so for any kind of simulation like that, you wouldn't want to run something each frame, but in a set interval
...or you could multiply your simulation results by delta time (inverse of frame rate)
well, in my example, they probably wanted to do that but forgot
and since they only ever tested with 30fps they must have just forgotton
so for any kind of simulation like that, you wouldn't want to run something each frame, but in a set interval
with SQF we can't run anything detached from main thread (and its frame rate)
anyway what did you want to know about your 'weird question'?
the one with the extra spawn?
yeah I didn't understand...
private _lotsOfMemory = lotsOfMemory;
// Do more stuff here, using some more memory, etc.
sleep 1000;
player setDamage 1;
imagine a case like that
your script is 99% done, but you're sleeping for a long while just do do some last action
that means the game keeps the _lotsOfMemory variable around
so it uses up memory until the script finishes, right?
so would it make sense to instead write
// same as above
spawn { sleep 1000; player setDamage 1 };
would that help in any way?
so it uses up memory until the script finishes, right?
yes
so would it make sense to instead write
// same as above spawn { sleep 1000; player setDamage 1 };
well it would free the memory, yeah
variable goes out of scope - memory is freed (if nothing else is pointing at that data)
this is true for scheduled and unscheduled code
is there some other more idiomatic way to free the variable?
_lotsOfMemory = 0;
it will unref whatever the variable was pointing at
okay
In arma SQF we are locked to game's frame rate
you can at most execute 3 times per frame
never been a fan of clearing variables by reassigning, but I guess SQF just isn't a very refined scripting language in general
reliably tha... semi reliably that is
I don't recall anybody care about memory in SQF much... except for some rare cases. You can check how Intercept is done, it implements SQF's variable types
you can at most execute 3 times per frame
through different kinds of events?
would that help in any way?
loose CPU time, which is way more important, and gain a tiny bit of memory.. Don't see why, seems rather stupid
through different kinds of events?
Yes
Don't see why, seems rather stupid
well maybe he wants to allocate a gigabyte, for something 😄
loose CPU time
How so? I see how you'd loose a bit of that, but isspawnan expensive operation?
sleep will make the game check every frame 'is this script done sleeping yet?', but there are not many other options to achieve it, IMO it's fine
wait, seriously?
isn't there some sort of optimization in place?
like having an ordered queue of all the sleeping event and always only checking the top one?
I don't know how it's implemented but I assume that it checks all scripts
yes queue, no optimization, no only top one, not all scripts
sleep doesn't check every frame
see http://sqf.ovh/
Carefully and biologically produced Arma 3 sqf training site
why is it 'bad'.... ? I don't think that it will affect anything in general case if it's changed
hi, how do i check if someone didn't select an item from a listbox?
here's what i tried but doesn't work and i get error zero divisor as error when i don't select the item and i press a button to execute an action that needs the item selected
_pos = [100, 100, 0];
_index = (lbCurSel 1500);
_player = (playerList select _index);
if (index != -1) then {
_player setPos _pos;
hint format ["U teleported %1 at %2", (name _player), _pos];
};```
Zero divisor? Should only occur with a / 0
playerList select _index would do it with this too i think?
if it is outside the range
Was that the Zero divisor error there too?
next issue in that snppet is if (index != -1) then { should probably be if (_index != -1) then {
ill double check. im like 80% sure it gives a zero divisor error for selecting outside the range of an array
8:43:00 a = [0,1,2];
8:43:00 b = 5;
8:43:00 Error in expression <a select b>
8:43:00 Error position: <select b>
8:43:00 Error Zero divisor
doesnt happen when using the array and number directly, but when referencing them as variables it throws the error 🤔
I'm back ladies and gentlemen, im having an issue with a random equipment spawner on ai's in my mission, I have everything successfully spawning on my units as far as uniforms, backpacks, headgear, & weapons, BUT I can not seem to get them to spawn with ammo that cooresponds with the random weapon they are given, I found a loot script online that spawns weapons on the ground with magazines for the gun next to them and it runs fine in the game. ```if (_type == 0)
then {
_weapon= weaponsLoot call bis_fnc_selectRandom;
_magazines = getArray (configFile / "CfgWeapons" / _weapon / "magazines");
_holder addWeaponCargoGlobal [_weapon, 1];
};``` The above piece is the snippet im using to try and modify from a random ground loot script I found online. The below snippet is what I have but for some reason it throws an "Error Generic error in expression at ```..."CfgWeapons"|#|/ _weapon...``` So I was hoping somebody can guide me on how to achieve placing ammo in the ai's inventory.```_weapon = ["hgun_ACPC2_F","hlc_Pistol_M11","hgun_PDW2000_F","hlc_smg_mp5a4"];
_this AddWeapon (selectRandom _weapon);
_magazines = getArray (configFile / "CfgWeapons" / _weapon / "magazines");
_this addMagazines [_magazines, 3];```
@polar anchor most likely cause is selecting outside the array range. be is from no list item being selected (_index = -1) or the selected item being above the array range.
@upbeat stag is _weapon a string in the first snippet?
second snippet might work like this
_weapon = selectRandom["hgun_ACPC2_F","hlc_Pistol_M11","hgun_PDW2000_F","hlc_smg_mp5a4"];
_this addWeapon _weapon;
_magazines = getArray(configFile / "CfgWeapons" / _weapon / "magazines") param [0,""];
_this addMagazines [_magazines, 3];
Yeah its a very long piece so I only cut the piece where im taking the getArrray line to idenetify the weapon in the players hands to identify the magazzine class.
@robust hollow Jesus you're insane. i've been looking at this for like 1 - 1/2 hours trying not to bother anybody and you got it in like 3 minutes.
👍
Hey anyone see a syntax Error here i cant seem to get this to work
createBase.sqf form the Dynamic Bulwarks by Hilltop & omNomios
[bulwarkBox, ["<t color='#ff0000'>" + "Virtual Arsenal: 1000p", "
_player = _this select 1;
_points = _player getVariable 'killPoints';
if (_points >= 1000) then {
[_player, 0] remoteExec [ "Open", [ true ] ] call BIS_fnc_arsenal;
[_player, 1000] remoteExec ['killPoints_fnc_spend', 2];
};
","",1,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true];```
well, u are clearly missing an end quote somewhere
[bulwarkBox, ["<t color='#ff0000'>" + "Virtual Arsenal: 1000p", "
_player = _this select 1;
_points = _player getVariable 'killPoints';
if (_points >= 1000) then {
[_player, 0] remoteExec [ 'Open', [ true ] ] call BIS_fnc_arsenal;
[_player, 1000] remoteExec ['killPoints_fnc_spend', 2];
};
","",1,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true];
try that?
yeah i cant figure out what i done wrong & iv tried removing the double " " from Open its get rid of the error spends the point when you use it but doesn't open the VA
well yea, this isnt how remoteexec works
[_player, 0] remoteExec [ "Open", [ true ] ] call BIS_fnc_arsenal;
you got it correct on the next line ```sqf
[_player, 1000] remoteExec ['killPoints_fnc_spend', 2];
have you changed it to just [ "Open", [ true ] ] call BIS_fnc_arsenal;?
if id do
[bulwarkBox, ["<t color='#ff0000'>" + "Virtual Arsenal: 1000p", "
_player = _this select 1;
_points = _player getVariable 'killPoints';
if (_points >= 1000) then {
[ "Open", [ true ] ] call BIS_fnc_arsenal;
[_player, 1000] remoteExec ['killPoints_fnc_spend', 2];
};
","",1,false,false,"true","true",2.5]] remoteExec ["addAction", 0, true];
i get missing ] error
oops, fix the quotes again
oh yeah
yeah works now Facepalm i tried that first and if id have changed the " to ' it would have worked
hey so, does anyone have that script that allows me to spawn more units after the cap is hit?
what cap?
Someone would be kindly teach me hows check "if players in spectator" please?
I need the script to stop looping when the player is in Spectator.
(!alive is not should be use. Because I need runs same at if player in spectator but is still alive.)
@young current after a certain point i can no longer spawn opfor unit
in where, how do you spawn them, how many have you spawned?
details details details
zeus, spawned them in groups then ungrouped them, I know there is a group spawn cap. I spawned too much kek. there was a script i remember using that I would run in global
It would allow me to create more groups again
have you checked the forums for that script?
I have, I cant find it, I know it exists @young current
Very likely it does indeed. I remember such being mentioned before.
Anyone able to tell me why, in this script, the addWeapon isnt working? Everything else functions fine but the player doesnt get the weapon.
akWeapon addAction ["Buy AK-74 - £100",
{
if (cash >= 100) then
{
_unit = (_this select 1);
_UID = getPlayerUID _unit;
_unit addWeapon "Weapon_arifle_MX_F";
cash = cash - 100;
null = [_UID] execVM "saveData.sqf";
}else
{
hint "Not Enough Cash";
};
}];
capital w for weapon?
try with a lower case
_unit addWeapon "weapon_arifle_MX_F";
Ye was just about to type, copied the wrong class name aha
just looking it should be without the weapon
yea it is
Heya everyone,
Very basic question: I would like to select every option from an array once.
As I understand it, selectRandom works with replacement (an item may be reselected again). I want to selectRandom without replacement. Is there a command for this?
Question: When you load a popular mission file, such as BMR Insurgency, it plays a startup sequence, where it moves the camera to your player. Can anyone show me/link me to how that's done?
Alternatively, some missions have the Tanoa single player campaign start, where it says [ SPACE TO CONTINUE ] on the bottom of the screen. Seeing as this might be easier, how would I go about implementing this?
Thank in advance!
@tough abyss like this perhaps?
_element = _array deleteAt (round random (count _array - 1));
selects a random index of the array, deletes the element to prevent selecting it again and returns it at the same time.
thankyou!
@wheat island im not 100% sure, but from what I can tell this might be the BMR intro cam
https://github.com/Jigsor/BMR_Insurgency.Altis/blob/master/INSfncs/client/client_fncs.sqf#L22-L69
Is there anyway to remove Armor Stacking? Ex. CSATS and Carrier Lights? Worn together
Yeah that's my bad just saw this scripting channel
Then delete the message in the other channel(s) please
Done
Hey so, bohemia made a new engine, right? does that still use SQF?
Is there a way to list all "string_names" from Stringtable.xml in game? I want to check if I need to translate some strings or use already translated from game.
Is there any info in whether they will ditch SQF?
personally I'd love it if they would switch to a nicer language like Lua
dayz is already using what they are moving to isnt it?
the new engine, IIRC
yea, with the new language
is that game scriptable though?
@loud python yes - see DayZ Enscript
ugh... looks like C
"buh-bye…!"
not sure if I should be happy they didn't pick python
SQF has lived, I believe
maybe there will be an SQF support, but I honestly do not believe this is a priority, at least right now
I mean, SQF wasn't a particularly good language either
better than C++, but that doesn't take much
C++ will require people to know what they are doing!
lel C++ would require compilers to know what they are doing, which has been proven impossible
EnScript should also be (way) more performant
Hey guys, quick question.
I'm not too knowledgeable on scripting, but has there been any word if scripting in Arma 3 will translate into script support for the Enfusion Engine?
Question asked just above, plz read 🙄 @tough abyss
first of all, if you are good at any scripting language, you will be able to take many skills to any other scripting language, unless it's something intentionally built to be hard for humans to use like brainf*ck
Sorry, just rolled in. All I saw was about SQF and thought it was a different question
Okay, that's fair.
I've heard knowing a programming language makes it incredibly easier to learn other ones by comparison, I just didn't know if scripting was a fair comparison to that.
ugh... I find the choice of going with the C syntax of for loops... questionable
Thank you for the help, looks like I'll be trying to learn it then.
for int i = 0; i < 100 ; i++?
like, I love that syntax for C; it makes sense there, but I think the world of scripting language has moved away from that a decade ago and is now switching from the from a to b type syntax to functional stuff like map, inject & co.
something even SQF already supports to an extent
ugh... didn't even understand what you meant in your first message, sorry
years on the internet and still can't understand cultures where people take offense at indirect speech
yeah yeah, I understand that, just pointing out why I didn't even notice at first xD
What I don't get is why they don't set the memory management to "automatic"
Wait, what?
does enforce have no GC or what?
There is, but you have to set it to autoptr or something
Hard reference, soft reference etc
BIS can we get Lua please?
LuaJIT (even with the JIT disabled) would be like 10 times better for this...
( <= this guy is kind of a Lua fanboy, btw.)
A question about file patching. I want to make a PR into ALiVE mod, and so want to test my changes before submitting.
Am I correct that I need to create relevant directory in game folder (e.g.: "ArmA 3\x\alive\addons\mil_ied"), copy the relevant sqf-file there and run game with -filePatching?
(I want to edit this file: https://github.com/ALiVEOS/ALiVE.OS/blob/master/addons/mil_ied/fnc_IEDInit.sqf, it seems to include from that dir: \x\alive\addons\mil_ied\script_component.hpp
