#arma3_scripting
1 messages ยท Page 89 of 1
what
Check the screnshot
you will just need an empty dialog config for it
If I call CreateAdminChannel on server exec, it returns channel 4
Which is supposed ot be Vehic
ChannelID 6-15 are custom?
So what its actually doing is taking 6 out and starting from there?
correspondence table
Ah right
The thing that I'm trying to do BTW is : using disableChannels in description to remove the players ability to place markers on side or global. So they would be forced to "copy map" and roleplay
The stuff is from vanilla I think. Ours worked better, but...
i've seen the gui in xms2, i wouldn't trust you an inch
Also disableChannel never worked for me on global and side chat for some reason
the UI in XMS2 was made with configs @candid sun, the createCtrl command was not around when it was created
Commy you might have been the admin
I noticed that admins have all channels either way
IIRC many of the channels are special as well, like the group one that can't or couldn't be disabled
global likely because it treats you as "admin"
anyone know how to get all the groups inside of a trigger area?
i tried using
private _groups = allGroups inAreaArray thisTrigger;
and
private _groups = units _side inAreaArray thisTrigger;
_groups = _groups apply {group _x};
_groups arrayIntersect _groups;
which i had found from searching here but neither worked
\ o /
Second one should work, but if you don't have a specific side then change units _side to allUnits
Groups (the entity type) don't have actual positions, so it's hard to tell whether "the group" is inside something. (inAreaArray doesn't accept things of type Group as an input, for example)
The first example just doesn't work on that basis.
The second example looks like it finds groups that have any of their units inside the area; it's up to you whether that counts, or if you only want groups where the leader, or all the units, are in the area.
hey guys. Quick question: killed EH triggers only if the vehicle is local?
listbbox looks nice for my gui, but i dont know how to use it, can anyone give me a tip ?
what do you want to use it for?
well which part of it have you figured out already?
do you know how to create the config for it?
private _listOfGroups = [];
{
_listOfGroups PushBackUnique (group _x);
} forEach (allUnits inAreaArray thisTrigger);
this seems to work thanks
@little raptor im watching the wiki, so yes
well all you need to do is add rows to it now using lnbAddRow
and the only difference with listBox is that instead of just using an index to get an item, you use an array of [row, column] to refer to stuff
wdym?
["message"] remoteExec ["BIS_fnc_infoText", [0, -2] select isDedicated]; // ideal - the dedicated server will not run the code, a player-hosted server will
?
both arguments and effects are local so, use the MP EH variant
and what does that have to do with eden?
it wouldn't work anywhere you were a server
it had nothing to do with eden
well it's always been [0, -2] select isDedicated idk where you got [0, -2] select isServer; from...
@little raptor columns[] = {0.3,0.6,0.7}; would that set my listnbox to 3 ?colums ?
Anyone else's Killed EH trigger more than once (sometimes not 100%). I last tested this in the summer.
with or without a medical system running @tough abyss?
With ACE 3 of course.
then feel free to ask one of @daring zinc s minions or himself
killed should function just like it does in vanilla in ace
the only thing you have to watch out for is the handleDamage eh
kinda works, now i have to figure out , how to put in icons, and this beautifull pictures of rifles etc
where could i find that information ?
btw.
OOS reached 0.6.0-ALPHA
https://github.com/X39/ObjectOrientedScripting/releases/tag/v0.6.0-ALPHA
just fyi
lnbSetPicture & lnbSetPictureRight
The images will be in the weapon config somewhere.
was just looking at it ty sur
just picture I guess. getText (configFile >> "CfgWeapons" >> _weaponClass >> "picture")
Doesn't it change every frame from when the trigger condition is fulfilled until when the trigger activates?
do i have somethihng like onLBSelChanged for listNbox ?
I think you get the listbox event handlers on listnbox
yes it does
Whats the performance thing you can do to see how expensive a script is again?
Shows you runtime
diag_codePerformance
Ah yeah, cheers John
If you use the Advanced Developer Tools mod then you get a button built-in.
Cheers
I love people just adding random scripts that they don't test
Like, yes spawn 1000 objects that never clean themselves up
there's one built into the base game debug console too, the speedometer icon
oh hey, never noticed that.
yup ๐
Used it to count deaths and then display on ending screen. Mission with ~150 ai returned with around 200-250. Most likely just a fault on my end, as I've not heard anyone else having the same issue and seems like you guys have not as well.
im learning to script, atm i dont even know how to judge the performence of my scritp ๐
Arma will run a maximum of 3ms of scheduled scripts per frame, if you want a reference point.
private OBJECT_FUNC = "OBJECT_CLASSNAME" createVehicle getPosATL player;
OBJECT_FUNC spawn {_this setObjectScale 10; _this allowDamage false;};
while {true} do {OBJECT_FUNC spawn {_this setPosATL getPosATL player;}; sleep 0.01};
What am I missing here? ๐
It works in single player but not in multiplayer ๐
I thought the parser bitched out immediately if you did private name_without_underscore
nice helpful error too :D
we love to see it
Generally if you want to move an object around with a player you just use attachTo
Although setObjectScale has a lot of caveats so I wouldn't know about that.
player is different on each client so you need to handle that properly in MP.
and you should absolutely not run spawn within a while loop 
neither of the spawns make any sense.
none of it does
Can't blame gpt for that, it actually has useful output
it does not
hm, im still with my eden editor, but the editor doesnt look like this
Is this game worth buyin
wrong chat
Which one the chat
#general_chat_arma , #arma3_questions , etc
but in short: yes, buy it. twice.
Good Sir, it's Arma 3. Buy it three times
jolly goodness, you are right! I beg your pardon
explains a lot about arma reforger if the number is how many times youre meant to buy it ๐ /s
yuup, mpkilled fires twice, wtf :D
hmmmm... reforger
114 101 102 111 114 103 101 114 = 860
I need to buy it 860 times
R is the 18th letter of the alphabet, it should be enough :p
is there a way to return the object of a player's inventory item if they are wearing it? Like uniform, vest, backpack, where it has a model?
and, can the movement of that item be overriden?
hahah, I guess I figured it out. Didn't have a server check :)
Hey all,
I have a mission that is using GFs Auto Loot script (old) which works fine on my PC in single player and when hosting multiplayer from my PC. However, when I run my mission on my server, it closes and returns to the mission selection screen. Just wondering if someone is able to help me out?
Lines from my rpt file when my mission attempts to load on the server is attached (txt file)
line 586 and 587 from GF_Auto_Loot.sqf script:
_a = 0;```
How can I get an Airport ID?
I've got a script to easily get all Airports near a target location. But now, I need to somehow get the associated airportID so my landAt command can work. I'm a bit stumped.
_airports = nearestLocations [_controllerPosATL, ["Airport"], 400];
systemChat _airport;
if (_airports isEqualTo []) then
{
_returnWP setWaypointType "LOITER";
}
else
{
_airport = _airports select 0;
_UAV landAt _airport;
waitUntil {sleep 1; speed _UAV == 0};
deleteVehicleCrew _UAV;
};
edit:
this is what I was looking for:
eyePos player;
see https://community.bistudio.com/wiki/Arma:_Airport_IDs
there is no airportPos afaik
Dang. I get the coordinates no problem (nearestLocations returns Location, which includes 3D position). Problem is translating that to the airportID, as landAt takes airportIDs or airport objects (Dynamic Airports), not coordinates.
It's probably from config order of airstrips.
Thanks anyway, Lou!
actually, to use eyePos I would have to run the setPos in a perframe event handler
is their something like eyePos but returns the object of headwear instead of the position of the eyes.
Or a workaround to where I can use attachTo with a position?
@pulsar pewter Some config:
private _mainRunway = configFile >> "CfgWorlds" >> worldName;
private _otherRunways = "true" configClasses (_mainRunway >> "SecondaryAirports");
Those should have ilsPosition in them.
if you can get me some code rolling to get airport pos / start / end, I might add that to the wiki ๐
also ping @still forum for a potential getAirportInfo int?
I found this function that someone wrote to find nearest airportID. Haven't looked it over yet.
getNearestAirfieldId =
{
params ["_nearTo"];
private _world = configfile >> "CfgWorlds" >> worldname;
private _index = 0;
private _closestDist = 1000000;
private _closestIndex = -1;
_checkAF =
{
params ["_ilspos"];
private _p = getArray _ilspos;
private _dist = _p distance2D _nearTo;
if(_dist < _closestDist) then
{
_closestIndex = _index;
_closestDist = _dist;
};
_index = _index + 1;
};
(_world >> "ilsPosition") call _checkAF;
_sec = _world >> "SecondaryAirports";
for "_i" from 0 to (count _sec - 1) do
{
_ap = _sec select _i;
(_ap >> "ilsPosition") call _checkAF;
};
_closestIndex
};
Found at: https://forums.bohemia.net/forums/topic/223419-jet-auto-landing-carriers/
Hi Today I discovered that the jets can auto land to aircraft carrier. This is super cool, though in some circumstances the landing fails to a crash. My question is how do you use the setAirportSide command? I placed the carrier in the editor and gave it name tc then I have this script line: tc s...
There's an ilsDirection too but I'm not sure if there's a good way to get runway start/end.
I'm curious about this question. For my immediate purposes, all I need is the nearest airportID to a pos, which that function seems to get. After that, landAt takes over.
But now I wanna learn how to actually work with configs n stuff so I can figure this out more generally.
killed only runs on the machine where the object is local
don't use MPkilled , ever
Just add the killed eventhandler on all machines
@balmy raven that would go in your initPlayerLocal on dedi
yea just make sure the classes of the people you put down match
if (_playerRole == "O_Soldier_SL_F") then {_role = "Leader"};
if (_playerRole == "O_Soldier_AR_F") then {_role = "MachineGunner"};
if (_playerRole == "O_medic_F") then {_role = "Medic"};
if (_playerRole == "O_soldier_M_F") then {_role = "Marksman"};
if (_playerRole == "O_Soldier_F") then {_role = "Rifleman"};
if (_playerRole == "O_Soldier_LAT_F") then {_role = "RiflemanAT"};
if (_playerRole == "O_Soldier_TL_F") then {_role = "Grenadier"};
if (_playerRole == "O_Soldier_A_F") then {_role = "AmmoCarrier"};
Just not on dedicated
ok
Thank you for your help!
yep
It only fires twice in some cases. Also using HC. I ended up putting a adding a variable to units which run the EH. Then if it has it has the variable on the unit it will exitWith {}
But now I found out about scoreSide. And it seems a lot better
Also I feel dirty when using EH's and I feel like anything I attach to every unit will cause slow downs :(
bug in ACE, apparently killed triggers twice if you use setDamage 1 on that unit inside handle damage
quick question: does anyone know the name for seek and destroy when trying to add a waypoint via script? Also is there a guide to all these waypoint names for scripts?
once for setDamage and once for the returned damage I assume
thank you
I used to use EH's and a sleep and check for dead body removal as well.
Is the corpseLimit useful and helps?
new corpse manage from BI works, but there is one bug
adter a while it becomes ground weapons holders
It doesn't remove bodies of those who disconnect when AI is disabled
Can using onPlayerDisconnected help with that?
Probably. But whats the point when you have to use scripting anyway?
The sad thing is, that I removed the body removal stuff from AGM in favour of this shit.
And AGM did handle disconnect...
using a script on every unit sounds bad, using a script on ever player does not sound that bad...
When using HC, the server usually doesn't get enough to do anyway
I loved AGM...
Old Fashioned Menu option for ACE 3... my dream
my friend saw debug messages left over from testing when he hosted my mission and got a kick out of it printing "SAD" as players got spotted
how do i get my debug console to look like this
how can i change the tint of the icon that appears in editor from blue to white?
(it inherits from game logic)
i set its icon image as a flag and can hardly see it because of blue tint
changing side to neutral somewhat helped, its tint isnt as intense
Headgear is not a container
You can calculate it yourself
Not sure which bone headgears attach to. I guess it's head? anyway, once you know the bone, you can use matrix math to convert from headgear model coords, to head bone, and from head bone coords to unit model coords, and finally from unit model coords to world
An example for converting from weapon model coords, to weapon bone, to unit coords, to world
Why does the watch item say Watch? 
It should say Expression 1, etc.
simple command im struggling with
deleteMarker "Marker1"; && deleteMarker "Marker2"; && deleteMarker "Marker3";
how could i get rid of multiple markers with a single trigger
(this doesnt work)
it's not .sh, you don't need && 
just ; after each command. Preferably with one command per line for readability
&& or and is to compare booleans, not to combine multiple commands
Is there a way to detect when Curator is given to a Unit? Rather than spawning a loop that checks every 30s for getAssignedCuratorLogic ?
Ie an EventHandler
Do you mean if someone has ascended?
Yeah, so curatorAssigned. Triggers when a unit ascends
Ideally would return _TargetObj, _callerObj, CuratorObj
LIke Player X assigned CuratorModule Y to Player Z
Found it, curatorUnitAssigned
Was sitting here trying to find it, and search was not helping
It's just missing the person who assigned the logic
damnit
It's done by script so there is no "person responsible"
Well its the curator logic that's assigning it in game. I get that it's a called action, but someone/thing has to initiate it
Even if it was Logic that did the initial setup, and then captures the player zeus' who did it after
Thanks
A player placing a module to assign curator is one of the ways it can happen, but what's ultimately happening is use of the assignCurator command. This command does not track the player who executed it, and like any script command it can be executed without any player input whatsoever. For example, it could be executed in initServer.sqf, or in a trigger activation code, or .... And in any of those cases, there's no "player responsible" to report even if it wanted to.
Looks like this doesn't like being assigned to players.
params ["_player"];
_player addEventHandler ["curatorUnitAssigned", >
12:01:36 Error position: <addEventHandler ["curatorUnitAssigned", >
12:01:36 Error Foreign error: Unknown enum value: "curatorUnitAssigned"
Is not an addEventHandler handler
It's also supposed to be added to the curator logic, not to the player
and BIS_fnc_addScriptedEventHandler should be used, not addEventHandler. Examples at https://community.bistudio.com/wiki/Arma_3:_Scripted_Event_Handlers#Examples
You are thinking of addStackedEventHandler. addScriptedEventHandler is different
i'm pretty sure that _player addEventHandler ["curatorUnitAssigned",... couldn't possibly work when said "curatorUnitAssigned" is scripted EH 
Yeah that doesn't work anywhere near as well as just having a waituntil {(!(isnull getAssignedCuratorLogic player))}
For anyone else...
initPlayerLocal.sqf
// Zeus Handler
[player] spawn {
params ["_player"];
waituntil {(!(isNull (getAssignedCuratorLogic _player)))};
private _curator = getAssignedCuratorLogic _player;
[_player, _curator] call _fnc_playerZeusLogging;
};
"and remember, each and every waitUnitl {} loop (especially without sleep inside) devalues tens and hundreds of Dedmen-hours of work optimizing SQF VM"
i'll use it till curatorAssigned / curatorRemoved becomes a player side eventhandler ๐ ยฏ_(ใ)_/ยฏ
I mean, CuratorPinged & CuratorFeedbackMessage is a thing, which probably has less use than basing / adding all your event handlers when the curator module is given
hi everyone, i managed to redo all my dialogs with listnbox, looks great, not im trying to figure out : what is the best way to store "virtual classes"
i literaly have [_configName,[all,"new",variables]] storred in an array
is that a "smart" way to do ?
What do you mean by virtual class?
idk what you're trying to do with that array so hard to say if it's smart
nothing atm, im like learning how to code, atm this array is out of [_classname,[price,trunksize]]
so i can show all the data from the configfile of a Car, and add my data
๐คท never touched it
so my question is, whats the best way to store persistent data for existing classes
What you wrote works yeah
ty sir
hashmaps are also good way of storing data with key
_myHashMap = createHashMap;
_myHashMap set [_classname, [price,trunksize]];
_value = _myHashMap get _classname;
Only if you intend to search in it
hi im trying to make a script that checks if players have an item in their inventory and are in a vehicle then it gives them an ace interact option, but my scripts not working, anyone have some pointers?
_items = items player;
if ("Wildfire CD" in _items) && (isNull objectParent player) then {
add_fnc_main ={
private _subActions = [];
/*
subaction 1
*/
_subActions pushBack [[
"Insert CD",
"Play Wildfire",
"\A3\ui_f\data\igui\cfg\actions\unloadVehicle_ca.paa",
{_this call RadioJuke_fnc_sub},
{true},
{},
[]
] call ace_interact_menu_fnc_createAction, [], 1, ["ACE_SelfActions"]];
};
/*
function 1
*/
RadioJuke_fnc_sub = {
playSound3D ["Julz_Jukebox\tracks\Wildfire.ogg" , player, false, getposASL player];
};
};
/*
Main action
*/
private _mainAction = [
"Insert CD",
"Play wildfire",
"\A3\ui_f\data\igui\cfg\actions\unloadVehicle_ca.paa",
{},
{true},
{_this call RadioJuke_fnc_main},
[]
] call ace_interact_menu_fnc_createAction;
["Insert CD", 0, ["ACE_MainActions"], _mainAction ] call ace_interact_menu_fnc_addActionToClass;```
"Wildfire CD" isn't a valid classname, classnames can't have spaces in them
yep
i need help, im looking for the smartest way to fire events every defined number of seconds ...only idea was a trigger ... any better ideas ?
while and sleep
or better to say, im looking for an event, which is trigered ever x seconds
so i can start a function with a while loop in the init ?
maybe i want it serverside, so the server only makes does it , i can put a function in init.sql what uses if (isServer)
while true do { blalba; sleep 600;};
and i place the function in initServer.sqf
is this the idea ?
Basically
ty sir !
Im trying to make a nameTags drawhandler, but im having a issue, i want to display the name of the units in top of his head, the problem its when i get away the name move and look like this https://i.gyazo.com/f4f0cf23c7b6d9a491b2789036f8120c.png how can i solve this ?
This the code im using
addMissionEventHandler['Draw3D', {
{
if ((player distance _x) < 700) then {
drawIcon3D['', [1, 1, 1, 1], [(ASLtoATL eyePos _x) select 0, ((ASLtoATL eyePos _x) select 1) - 1, ((ASLtoATL eyePos _x) select 2) + 0.3], 0.1, 0.1, 45, name _x, true, 0.03, 'PuristaLight'];
}
} forEach allUnits - [player];
}];
Do you mean you prefer to have smaller texts when is far away?
ye that it stays on his head pos instead of going down
Then you can just check distance between camera and target and divide the size with it
how would the calculation be? (cameraOn distance _x) / ?
positionCameraToWorld can check the cam pos
https://i.gyazo.com/b802248504f18e896245b63c2fd7bfb2.png
https://i.gyazo.com/aec77b9d1d039a11341749515b70aa09.png
want to do something like the spectator does, but idk how to do that distance calculation im dumb xD
size / distance, not distance / size
They're not trying to change the size with distance, they're trying to change the vertical position with distance - or perhaps more accurately to stop the vertical position appearing to change with distance
ye that the vpos
btw, for calculating the icon position, you don't need to have three separate ASLtoATL eyePos _x retrievals - it's a waste of performance to run the command 3 times.
You can do it more efficiently like this:
private _basePosition = ASLtoATL eyePos _x;
drawIcon3D [ '', [1,1,1,1], [_basePosition#0, (_basePosition#1) - 1, (_basePosition#2) + 0.3], ... ];```
or even more efficiently like this:
```sqf
drawIcon3D [ '', [1,1,1,1], (ASLtoATL eyePos _x) vectorAdd [0,-1,0.3], ... ];```
I'm dubious about that -1 in the position calculation, though. That's a horizontal offset in world space, meaning its effect will be different depending on the angle you're looking at the unit from. I'm not sure that's what you want.
ye i change it to the z coord mb
so how would be the calculation for the vertical pos pos / distance?
whats the best way to deal with dialogs, any good tutorials ? my question is how to make something like a player menu, where u have buttons that change most tof the dialogs design
my idea was to create all the things and change visibility
can i open a dialog in a dialog, specified area ?
This is the way I'd do it.
private _vertOffset = linearConversion [0,700,player distance _x,0.3,1,true];
drawIcon3D [ '', [1,1,1,1], (ASLtoATL eyePos _x) vectorAdd [0,0,_vertOffset], ... ];```
The `0.3` and `1` in the `_vertOffset` calculation are the minimum and maximum offset values. You'll need to calibrate them yourself to get the exact position you want.
Note that drawIcon3D also has parameters for screen space text offset (as compared to the world space offset you're already doing) which you might like to experiment with as well.
To start with, use ZEN Dialogs if possible. Its so much easier. Here is a file of all the zen dialog stuff (some stuff isnt tested properly, but there are TODO: ... that describes what might not work.
If you need more complex dialogs, try simplifying them to be able to use zen dialog.
Finally, if you have to, make your own.
And here is the documentation for ZEN Dialogs
https://zen-mod.github.io/ZEN/#/frameworks/dynamic_dialog?id=creating-a-dialog
inb4 worldToScreen to convert AGL into screen coordinates + offset by text size in screen coordinates + screenToWorld back ๐
ok ty

BTW, ZEN is only viable if wherever you play, if they have ZEN loaded as a mod. It needs to be loaded on every client, or in other words, IT IS NOT CLIENT SIDE.
or use offsetY in drawIcon3D: ```sqf
addMissionEventHandler ["EachFrame", {
{
private _text = format ["%1(%2 m)", name _x, player distance _x toFixed 0];
drawIcon3D [
"", //texture,
[1,1,0,1], //color,
[0,0,0.3] vectorAdd ASLtoAGL eyePos _x, //position,
0, //width,
0, //height,
0, //angle,
_text, //text,
true, //shadow,
0.02, //textSize,
"TahomaB", //font,
"center", //textAlign,
false, //drawSideArrows,
0, //offsetX,
-0.01 //offsetY << THIS ONE
]; } forEach (units west);
}];```
oh, it was already proposed. Silly me 
Use https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#Draw3D instead of eachFrame
Is there a way to make this work?
// macro.hpp
#define MACRO(ARG) \
#define VAR ARG
Current Behavior:
// myfunction.sqf
#include "macro.hpp"
// Before Preprocess
MACRO("Hello World")
// Desired Preprocess
#define VAR "Hello World"
// Actual Preprocess
"define" VAR "Hello World"
#define HASH #
#define MACRO(ARG)
HASH##define VAR ARG
But I have the feeling someone asked this recently and failed
actually what is your final target
Even if you can generate #define VAR "Hello World" that would just make the script compiler fail, if you intend to compile that as a script
Im simply trying to hide a #define from a userConfig file. But why would that fail though?
more like why would you want to do that.
Just to hide it from the user. Im making a mission framework. Its of little consequence.
define the #define in an #include, problem solved
Hello everyone!
I would like to ask a question. In a multiplayer scenario, after triggering, i wish to play loud and clear sound to everyone, who is on the server regardless their location. For this purpose i've been using playsound "gas"; and it worked just fine. But now i would like to change it a little. Instead of everyone, i want to play the sound to members of one faction only. For example, after triggering, all BLUFOR members should hear it loud and clear at the same time no matter where they are. I looked at parameters for playsound, playsound3D, say, say2D, say3D, createsoundsource but i couldn't decide, what is the right script for me.
ARGS_ARRAY remoteExec ["TAG_fnc_myPlaySound", west];
i was thinking about some kind of if player faction == blufor then play sound... but i think that wouldn't work as i expect
You can specify side, group, or units in remoteExec.
Alternatively, if the trigger is local,
if (side group player isEqualTo west) then { /* Play Sound */ };
Read up on side from the arma wiki though. Using side on player is inconsistent. Use hypoxics example (i updated mine) as that should remove inconsistency with side
side group player
by trigger i meant some kind of addaction, i would like to put an addaction to an object and if someone uses the addaction it will do a few things as well as plaay that sound for all blufor players but NOT for all players in other factions
^
["mySoundClass"] remoteExec ["playSound", west]
[["mySoundClass", false, 0]] remoteExec ["playSound", west]
["mySoundClass"] remoteExec ["playSound", side group _caller] - for addAction if you want caller's side
i think the last one is not right, i need the sound to be played to a given faction, no matter which faction the player who used it belong to
just giving more examples if you wanted it to be the faction of the caller
for example if a civilian uses the addaction, still play the sound to blufor
then use the first one
yes, i'm trying to read them all and understand their meaning
by my sound class you mean the name of the sound file which i used here playsound "gas"; as gas?
yes
so in this example the "west" is telling the "remoteexec" function, where to execute it?
targets (Optional, default: 0):
Number (See also Machine network ID):
0: the order will be executed globally, i.e. on the server and every connected client, including the machine where remoteExec originated
2: the order will only be executed on the server
Other number: the order will be executed on the machine where clientOwner matches the given number
Negative number: the effect is inverted: -2 means every client but not the server, -12 means the server and every client, except for the client where clientOwner returns 12
Object - The order will be executed where the given object is local
String - Interpreted as an Identifier (variable name). The function / command will be executed where the object or group identified by the variable with the provided name is local
Side - The order will be executed on machines where the player is on the specified side
Group - The order will be executed on machines where the player is in the specified group
Array - Array of any combination of the types listed above
that's from wiki, right?
https://community.bistudio.com/wiki/remoteExec
the second argument on the right (3rd argument for remoteExec) targets the clients that the function should call on. As hypoxic just shared, a target can be a side, where it will execute the given function on all players from that side.
remoteexec sounds like a good work around, i'll give that a try, thanks for tips guys
for orbit module. image can the image be jpeg? And how do i set the path for it?
*ORBAT?
yes my bad.. ORBAT
no that's what things do around a planet.
lmao
So, the question - you can actually use a jpg
Since is the completely same way with any other textures
How do i assign that texture? I forget.
Assign in what sense? Where?
BIS_fnc_moduleStrategicMapInit
BIS_fnc_moduleStrategicMapORBAT
BIS_fnc_moduleStrategicMapImage
BIS_fnc_moduleStrategicMapOpen
look it up in the function viewer and call the functions directly
or use the Custom Image module and link a path to the jpg as a string
Hi there.
Been a long time since I played. Really want to get back in. Only one issue though, I want my incognito script to work right.
I paid a guy, long time ago, to make my unit a good standalone incog script. He did a lot of work, but there were some issues. I can't remember if I fell out of touch, or he did, but it ended up unfinished. When the mod has worked(which is very rare), it's perfect. But I for the life of me cannot get it to work consistently.
If anyone wants to look at it, be my guest. If you can fix it, we can talk payment as well.
AFAIK against the EULA to pay someone to make arma content without approval, but I dont know if that only applies to paying someone to use Arma tools or such stuff to make something, rather than scripting only.
SQF doesn't involve Arma related tools, so script is good to go
Got it, that's good to know, Polpox. I didn't know that rule only applied to using BI tools. Learn something new every day ๐
Please debug it please! Maybe not, but SQF essentially is just a text file
If I set condition for trigger as "triggerActivated task1", does the trigger fire when the trigger called "task1" has been activated?
Just making sure I've understood this correctly.
glad to know I didn't break any terms, I would seriously be happy to send some code to anyone willing to take a peek
im using lnbsetpicture , it works well, but all pictures look linda black , i guess because of the underground color
what am doing wrong, i want the picture with the regular color, like upper layer i dont know
oh i see it i think
N1
mb did not define colorPicture[] = {1,1,1,1};
Quick question:
So, I've got a script counting how many objects of a type are within a specific range, and saving their location. Then, I want a hint to say, per line, the details of each object's Pos. If I want to write the script in a generalized way, not knowing how many objects will be within range when the script is called, how can I structure the hint command to do so? Is there a way?
I know how to do it, through formatText, how to set it up with linebreaks and all if I knew the number of objects, but not how to generalize it...
I guess I could count the array that I'll be using with the objects' pos and then just do an overlong if then structure for up to n cases, but I imagine there's an easier way.
You can just loop over the array and append to the string.
"one" + "two" = "onetwo"
There's also joinString, and format can join strings like this:
_str = format ["%1 %2", _str, "more stuff"];
You can put linebreaks in a hint with "<br/>", IIRC
So...
_arraywithObjPos = [...];
_string = ["Objects detected at:"]
{
_string = format ["%1%2%3, _string, linebreak, _x]} forEach _arraywithObjPos;
hint _string;
Something like that?
Will play around with it, thanks John!
That's a good start!
Just need to format it a little better and it might just work.
I would do it similary.
Although keep in mind that depending on the number of objects, the hint may get way too large. I never tested it, so if I were you, I would.
@little raptor this is where I am at:
_gagHolder = "GroundWeaponHolder_Scripted" createVehicle position player;
_gagHolder addItemCargoGlobal ["G_Blindfold_01_black_F",1];
onEachFrame
{
_gagHolder = ((attachedObjects player) select {typeOf _x == "GroundWeaponHolder_Scripted"})#0;
_eyePos = ASLToAGL eyePos player;
_gagHolder setPos _eyePos;
_gagHolder setVectorUp (getCameraViewDirection player);
};
I not working at all lol. I am feeling like this would be a whole lot simpler just using attach to, but attach to using 'mouth' or 'face' as a memPoint bone doesnt work.
Using the translation guide, I used oblicej, which also doesnt work. Any ideas on what I am doing wrong or how I can use attachTo?
You get the gagholder by Searching the attached objects. Did you attach it?
ah, ty but in my mission it is already attached, so it was seeing it
but yea I need to attach it previously
Also I never used onEachFrame. Using spawn here might be better. (Or CBA perFrameHandler).
im just using this to test, forsure wouldnt use it in final version
Is it possible that different onEachFrame exists and "ends" this one?
From the wiki, it looks like only one onEachFrame can exists
Can you try to rewrite it using event?
https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#EachFrame
Also might be smart to debug with a spawn and run it once a second or less and get some debug data. Like what is the eye pos, where the gag is after the last command etc
its not the onEachFrame that is the issue, just the positioning of the gag.
I just need to know how to attach it to the face area
Exactly what I am trying to help you solve now
yea
this is where I am at right now
It follows me correctly, but the rotation of it is in correct.
I am not sure how ground weapon holder works precisely. When you have more things in it, it will shuffle them around. But probably with one it just centers it.
Then look at the setVectorUp.
From the looks of it, it's "up" in the direction you're looking at.
So editing the vector before you set it is the key. Probably the up/down value (second I think?), Try to substract 0.5
And probably add a check for < -1 then +2
And see what happens
jit i aint gonna lie
i am struggling
ill get back to you when I can figure something out
Hopefully I'll be asleep by then. But I wish you luck! Let me know if you got it working. If not, I can try to recreate it too
thanks man
sorry for bothering but this simple yet pesky script is giving me a hard time
This script works perfectly fine: sqf _voj = _this select 1; comment "Exported from Arsenal by Frank Wickets"; comment "[!] UNIT MUST BE LOCAL [!]"; if (!local _voj) exitWith {}; comment "Add weapons"; _voj addWeapon "Pipe_aluminium"; while this script doesn't work at all: sqf _voj = _this select 1; if (!local _voj) exitWith {}; _voj addItemToUniform "Item_Money_bunch"; _voj addItemToVest "Item_Money_roll"; _voj addItemToBackpack "Item_Money_stack"; Both of them are located in sqf files and both of them are executed by addAction in game. To me they seem identical and it makes me scratch my head why one works and the other one doesn't. Can someone give me a hint please? Thanks
Does the second one pass the local check?
Just add a hint with "jop, proลกlo"; after the check.
i actually sent just a section of the script that doesn't work, here is the whole script: ```sqf
_voj = _this select 1;
if (!local _voj) exitWith {};
_voj addItemToUniform "Item_Money_bunch";
_voj addItemToVest "Item_Money_roll";
_voj addItemToBackpack "Item_Money_stack";
hint "A robbery in progress at Sun Oil gas station.";
[sun, true] remoteExec ["hideObjectGlobal", 2];
[sun1, false] remoteExec ["hideObjectGlobal", 2];
["gas"] remoteExec ["playSound", west];
sleep 3;
["SunOil"] remoteExec ["playSound", west];
Then the only thing I can think of is that the classname is wrong
Or has no space for the item
i got the same idea, i double checked that, all three class names should be ok
i tried emptiing inventory, no luck too
Try to use these https://community.bistudio.com/wiki/canAddItemToUniform (and quivalalents)
by the way, i sent you a PM @leaden ibex (not related to the scripting, please have a look)
thanks for the tip, i'll give that a try tomorrow
stupid question maybe... is there a better way to verify existence of an image resource, assuming I have the plausible path of the file, than fileExists?
Not sure why fileExists doesn't fit for you
Anyone got a workaround when units radio in chat NEGATIVE when they can't perform a doMove command?
I am mostly dealing with this issue when I try to get them to move to a specific position inside a building.
why do you even use a weapon holder? 
and why do you use setPos? 
omg
using 'mouth' or 'face' as a memPoint bone
there are no such mempoints afaik
when I was trying to create it directly it was not working
ah
did you test in A3?
wdym
player selectionNames "memory"
yea
but no face or mouth like I said
yea
{
deleteVehicle _x;
} forEach (attachedObjects player);
_gag = createSimpleObject ["G_Blindfold_01_black_F", getPos player, false];
_gag attachTo [player, [0, 0, 0], "head", true];
this doesnt work
ah
_gag = createSimpleObject ["\a3\Characters_F_Enoch\Facewear\G_Blindfold_01_F.p3d", [0,0,0], false];
and plz stop using getPos and setPos...
sorry I dont really use config viewer what is the tree selection path?
configFile >> "CfgGlasses" >> "G_Blindfold_01_black_F"
if you use my mod you can just type the class in the top left search bar and hit enter
ah
I am
thank you so much! i got it lol, just wasnt using the correct mempoint bone
so now it follows bone rotation correctly without needing your onEachFramescript
thank you!
this should put it right over the eyes:
_gag = createSimpleObject ["\a3\Characters_F_Enoch\Facewear\G_Blindfold_01_F.p3d", [0,0,0], false];
_gag attachTo [player, [-0.05,-0.08,-0.6], "head", true];
_gag setDir 180
lol
there's a problem with this tho. since memory points are not updated visually, if you look too far down or up the gag will start to slide upwards or downwards. and when your character looks slightly to the left or right the gag doesn't move
the eachFrame method wouldn't have this problem tho
I can just have a loop that resets position every couple of seconds
that won't help
you have to calculate the bone pos and direction in the visual LOD
Do any of the ACE guys have a fix for MPKILLED eventhandlers sometimes returning the unit that was killed as the killer? The problem went away if I removed the ACE medical system but I would prefer having it in.
@blazing zodiac visit the ACE3 slack.
So, the "User Texture" items are really nice, but if I have say, transparent writing on there, how can I make that writing shiny? Is that where using an RVMAT comes in?
that's not exactly #arma3_scripting
mmm... point
I was thinking of procedural textures at first
but it's also weird because this is a special editor object, so I'm not 100% sure where to ask. I guess I'll ask in texture makers.
I do have a scripting question - is there any way to "tint" an object to be darker or a different color than it normally is?
no, just new texture / different material I guess (I'm not good at material thing)
with something that would be setObjectTexture/setObjectMaterial-able ofc
then no
hmyep
ah yes you can make something darker!
set the daytime to "night" ๐
runs away quickly
Can you not just set an overriding Alpha layer?
I believe I am obligated to yeet an egg at thee
or perhaps a tomato
(how would I do that, Tad?)
So do something like?#
_mysign setObjectTextureGlobal [0, "\image.paa"];
_textureColour = "#(rgb,8,8,3)color(255, 255, 255, 0.1)"
_mysign setObjectTextureGlobal [1, _textureColour];
It does take 0-1
ah
hmm
I mean it's like, "what if I wanted this rock to be jet black and shiny"
signs I know how to do
the problem I run into is that a lot of objects don't seem to have a "settable" texture
Is that the issue Killzon_Kid describes in the notes on here : https://community.bistudio.com/wiki/setObjectTextureGlobal
if it has no hiddenselections you're out of luck
no, its the blue note
yeah, most objects don't have the hiddenselection to manipulate
mhm
even if it leads to me just like, making an addon that patches the existing thing to have a different texture X_X
oof, wretched
oh well
I have many impossible things on my wish list, including "for the love of god chop up the tanoa buildings so I can have stairways and catwalks to place in the editor"
at this rate I'm literally going to model my own
does anyone know of a way to grab part of the image from a camera? trying to make picture in picture fake windows not look awful due to the camera originating from one point but unsure if its possible. in an ideal world id have the camera in the same position as the player relative to the window then just grab what is visible through the window then put that on the texture
probably
render camera image to one texture, assign that texture to RscPicture in some UI texture, move/scale/overlay with stuff in UI texture, then assign UI texture to the object (or real interface). Yaay for more convoluted ways of reimplementing game rendering in sqf
(then set that object in front of second camera and repeat the loop...)
it's not just about "part of" image. the perspective is also different for what you render from your eye and what you render from the other camera
which you can't fix
which is why i would have the camera on the eye position of the player which would alleviate it, no?
sounds overly complex compared to just letting people see what isnt outside 
yeah but how are you gonna "look" thru the object?
hide it? 
Picture in Picture?
r2t onto it ๐
wut?
the position the window actually is is in the corner of a map; the position it needs to "appear" is just elsewhere in the map
like this but rendering the camera at a position relative to where the player is relative to the "window" and just grabbing the part that should be seen
The preprocessor runs over the file once, not twice.
Your first run would leave behind #define lines, which would never be processed, until they get to the script compiler or config parser where they are syntax error
part that should be seen
no part is seen if the object is in front of you
you say the cam is on player's eye
no, where the player's eye is relative to where the window is
hang on i'll draw an example diagram
even if you ignore the perspective, you get clipping close to the wall then
are you saying that the camera is in an entirely different place?
yes
then how are you supposed to see what's behind the window?
with r2t like this
that works "fine" for my uses, it's just scaling it up to larger things may cause distortion to be much more obvious
for "r2t like that" you've put the camera behind the window
now the cam is in the middle of nowhere
yes, you could move the billboard and the player and it'd look the same if you surrounded the billboard with vr objects
that's the point, its a window showing somewhere else in the world ๐
well so you mean you want to show some other objects that are copies of the ones behind the actual window?
this is for my capital ships system where i have a static ship in the corner of the map which players can walk around on, and then there's one that flies around. the idea is i will have the cameras attached to the ship that is moving, and the r2t windows in the static ship so it looks like the player can see out of the static ship to what is going on around the moving one
make more sense?
its quite convoluted already and my poor explaining skills do not help ๐
so it's not a window. it's a "portal" 
if you want, i'd call it a window but to each their own ๐
just a window to elsewhere
this works for it, but at larger scales distortion is much much more noticeable and trying to see if theres any way to get around that
hide the actual ship locally, then render from the player's eyes relative to fake ship transformed to the actual ship
that at least makes the perpendicular looking better
but looking at an angle thru the window will be weird
probably worse
this could also work
actually no it won't
or maybe it could 
if you stretch the texture beyond the screen you could make it kinda work
surely that'd get weird the closer/further you get from it though? ๐ค
yeah it does
it would get smaller when you move away 
so I guess it's just always worse. nvm
if you can just go with the ui texture thing
though wonder if i could change the fov of the camera to compensate?
I was curious if that would happen too. Didnt get that far regardless. ๐คทโโ๏ธOh well. its all good
Greetings folks!
I'd like to share with you an interesting information. Yesterday i made another script that didn't work. But the solution i found to get it working was really unexpected.
Seemingly simple script: ```sqf
_voj = _this select 1;
if (!local _voj) exitWith {};
_voj addItemToUniform "Item_Money_bunch";
_voj addItemToVest "Item_Money_roll";
_voj addItemToBackpack "Item_Money_stack";
Well guess what, the class name of those items is wrong, but here's the interesting part, how did that happen
When you are in the Editor and hower with you mouse over an item in the right panel menu, it displays a tooltip with name of the item and its class name
what you see here is exactly the class name the game displayed to me, no typo on my side
However these classnames turned out to be incorrect
After playing around i realised, that actual classnames of those three items are actually different, so i replaced them and the script works.
A thing to note: these three items are not from a workshop mod, they are all from the game
It's because the item in the Editor is the world-placeable item - a fake container which contains the inventory item. Inventory items aren't real and can't exist in the world on their own; they only exist as a thing inside a container.
You can find the inventory item belonging to a placeable container by looking at the container's cargo config.
i think you misunderstood
in editor you have on the right side the menu with everything you can put down while creating a mission - vehicles, units, items, etc... so there, if you chose an object and just point your mouse on it it shows you the name, i didn't place it down, i know that inventory items are always in some kind of an invisible container even when on ground
Yes, and the name it shows you is the name of the container object. It's a special invisible container that's configured to come with one of that item loaded in it.
now you're making me confused, i never had to deal with such a thing with any other inventory item but nevermind i just wanted to share an interesting information, someone could find it helpful
sometimes they are the same classname
as one is cfgvehicles and one is cfgweapons they can do
but shouldnt do
In Arma, every different premade variation of a thing is a different config class. That includes preloaded inventory. If you want, say, a Hunter with two grenades in it by default, and a Hunter with four grenades in it by default, those have to be unique classes.
The same applies to the invisible container objects used for "free-floating" inventory items. The placeable inventory items in the Editor are actually each a unique type of invisible container, which is configured to be preloaded with one of the appropriate inventory items in its config.
I think he is right - where did you find the classname, in the "items to put down"?
if so, try to find it in the crate inventory item list - the classname will be different
e.g you cannot createVehicle "arifle_MX_F" - you have to createVehicle GroundWeaponHolder and addWeaponCargo "arifle_MX_F"
I got you @hallow mortar right on the beginning, no need for further explanation, but i appreciate it, i just said what happened to me, i get what you mean and just mentioned that it's confusing me, because i've been doing scripts for spawning such objects for some time and never encountered this kind of issue, but perhaps i was just lucky untill now
reason you've never encountered it before is probably what i said
createDiaryRecord lets you use this tag below. What's unit ID in this case ๐ค ?
ah, you warned about confusion, not about wrong classnames ok ^^
unsure, or internal ๐
where's that page? 
the spoiler button in description
But you can createVehicle Weapon_arifle_MX_F, which is a unique invisible container that comes preloaded with that inventory item ;)
ah I see
is it not getPlayerUID?
https://community.bistudio.com/wiki/getPlayerUID
ah that's for players nvm
probably internal then
gotcha
i meah, it seems to be added by https://community.bistudio.com/wiki?title=createDiaryRecord&oldid=68191 in pre-3 ?
So how did you resolve this? I am that someone who this helps.
You can find the inventory item belonging to a placeable container by looking at the container's cargo config
in other words, right click on item, find in config viewer, then TransportItems class
iirc
How would i do this programmatically?
May also be TransportMagazines depending on whether the inventory item is a CfgMagazines thing (yes, things that aren't actually used as magazines can be in CfgMagazines)
"true" configClasses (configFile >> "cfgVehicles" >> "class" >> "TransportItems") apply {configName _x}
Love it, thank you!
not 100% sure if you should check the name, etc. of the item instead of just configName tho
as far as I've seen the class names under TransportItems, etc. are the same as item class names
looks like you should
my solution was maybe longer but much simpler, let me explain
for weapons it's weapon and for magazines magazine instead of name
I (or someone) should test at some point whether the _xx_<classname> format is actually required or if it's just convention
I think it's just convention
other items I looked at were the actual item class names without _xx
i started a mission, then when i was a player i switched to zeus, as a zeus i spawned my items, then went back to player, i picked up those items to my inventory, then opened an arsenal and exported it, outside of the game i then pasted the export to a text document and there it showed me those names i was looking for @vapid scarab
...is that simpler?
I know that much. Were you using different names from the ones listed in that?
is longer but most certainly much much simpler
Im going to have to check your case.
@hallow mortar you are a pro in scripts, direct digging for classname is a matter of seconds for you, but someone like me, who doesn't understand it much, is going to be super confused by your suggested way, i'm just trying to say that some people (beginners) will much rather appreciate a longer but simpler and more understandable way, but it's just my opinion
You don't have to understand the config to rightclick on the object, select "find in config viewer", and then click on TransportItems. It's a 3-step process, you don't have to dig for anything. It's very simple.
is something wrong with this line ?_vTrunkSize=(_player getVariablie["JV_vTrunkSize",0]);
getVariablie -> getVariable
correct, i understand your point of view, i just tried to show it from another angle
no you're not
after 2 hours , i need a breeak ty sit that was it
This is one of the cases where syntax highlighting comes in handy. A mistyped command would be treated as a global variable name and highlighted accordingly, making it easy to distinguish.
true, i try to make it, i use notepad++
plugins already exist, see https://community.bistudio.com/wiki/Category:Community_Tools#Code_Editing ! ๐
I strongly recommend VSCode.
I use Dark Modern Theme (might be from C/C++ Themes Extension)
I recommend these extensions:
Arma 3 - Open Last RPT
2 different sqf language highlighters (ill come back to this later, as im afk)
SQF-VM
Ive also heard that the Prettier extension is really helpful... I havent used it before so idk.
If you use vs code you also get access to the sqf debugger
i felt so cool when i started using notepad++ instead of notepad ...
is there a way to get around diag_log's 1044 character limit? Another logging command?
log multiple times? 
fnc_log = {
params ["_str"];
for "_i" from 0 to count _str-1 step 1044 do {
diag_log (_str select [_i, 1044])
};
}
I'm trying to dump a large hashmap:
_maglist = [];
from _i to _index2 do
{
_mag = AmmoMap get _x;
_magClass = _mag select 0;
_displayName = getText(configFile >> "CfgMagazines" >> _magClass >> "displayName");
_ammoPerMagazine = getNumber(configFile >> "CfgMagazines" >> _magClass >> "count");
_maglist pushBack [_magClass, _displayName, _ammoPerMagazine];
} forEach AmmoMap;
diag_log format['BSF _maglist %1',_maglist];
I'm not sure how to index it. I was thinking something like
_maglist = [];
_ndex = 0;
_index2 = 10;
from _i to _index2 do
{
With an _index2 = _index2 + 1; in there.
you are doing "from to do" then "foreach"
not how it works. what do you want to do exactly?
I have a large hashmap that contains data formatted like
["30Rnd_9x21_Mag",["30Rnd_9x21_Mag","HG",1]],
I want to grab the class name, display name, and count, then output somehow.
_x, _y ?
if you only need to do it once - copyToClipboard helped me egress more than 10k characters at once 
well, that might work.
small trap: amount of data also depends on the editor you paste it into. VSCode only took 10k, stock Win10 Notepad took as much as i've tried
i seem to find like 40KB-ish text files of export results in my old notes now that i actually check
That did it, thanks a lot.
We all did, jerry. We all did.
Anyone else find bis_fnc_findsafepos a bit glitchy when it comes to vehicle use? sometimes it will just put a vehicle inside another when passed in to CREATEVEHICLE
For example
it's set a min =5, max = 100 and objMin = 5
private _playpos = getpos _vehicle;
private _safepos = [_playpos,5,100,5] call bis_fnc_findsafepos;
// your code here
_i=0;
_array = [];
{
_array pushBack (configName _x);
lnbAddRow [500, [getText (_x >> "displayName"),str getNumber (_x >> "cost")]];
lnbSetPicture [500, [_i, 2], getText (_x >> "picture")];
_i=_i+1;
} forEach _cfgArray;
is there a better way to handle thin index counter ?
why not just use the arrayIndex
nah someone pointed it out to me the other day
now you're both good
For numbers specifically, toFixed
Oh, no, that's for the other end
while {count _str < 2} do {
_str = "0" + _str;
};```
or```sqf
if (_num < 10) then { "0" + str _num } else { str _num }
(format ["%1:%2:%3",_hour,_minute,_second]); hmm
oh wait
oh huh
what you wanted?
not quite
systemTime apply {if (_x < 10) then {"0" + str _x} else {str _x}}; might be it. buut apply being run every second-?
systemTime params ["_year", "_month", "_day", "_hour", "_minute", "_second", "_millisecond"];
_ctrlTimer ctrlSetText (format ["%1:%2:%3",_hour,_minute,_second]);
_ctrlTimer ctrlSetTooltip (format ["System Time:\n%4:%5:%6\n%3/%2/%1",_year,_month,_day,_hour,_minute,_second]);
uiSleep 1;
Code adapted from 3DEN enhances session timer
yep
So, the apply every 1 second shouldn't be an issue?
no
anyway, how else would you want to do it?
I dunno, just was iffy b/c apply makes a whole new array right?
zomg, an array ofโฆ 7 items! ๐
twice every second* b/c my events are weird xD
I have the same events as 3DEN Enhanced, but it's calling it twice. Shouldn't be an issue I don't think, though.
ok, lets try it out :P
horray!
Thank you ^^
at least you didn't go mm-dd-yyyy :p
hmm- what font should I use
I really the Roboto fonts
maybe I could expand it to display a clock on all- uh- primary menus?
idk, like main menu, in game, eden, arsenal-
eh well :P
Why not use BIS replace with simple object function? MP, b/c it'll be local objects only so it can cause issues?
Takes a while to run it for each object?
Just curious :P
most likely heavy network traffic
"Try not to use too much, and never in MP"
Yeah, I actually know about that. But it's not a big deal.
oh pfft, I didn't even realize you were who made it xD
Can a hashmap be searched (in reverse) by the data in an element to find it's corresponding key?
Yeah, I know.
select?
select doesn't seem to have a syntax for hashmaps
ok, maybe I wanna use a different font or something- like the old font xD
I'd stick to the default font set in Eden Editor
_results = [];
{
if (_y == _wantedValue) then {
_results pushback _x;
};
} forEach _hashmap;```
yea, I was thinking I could try EtelkaMonospaceProBold but running code to change the font to EtelkaMonospacePro and it looks good
oh, is it possible to completely hide water in eden? ๐ค
I'm afraid comparing two different types with == may not work
use isEqualTo
Well, yes. The value may also be an array that you want to check for a particular element in, and so on. The _y == _wantedValue was more of a standin for whatever comparison you want to make against the value.
Just to demonstrate the use of _y in a hashmap forEach.
can I just say how much I hate the kerning on _y
Thanks, works great:
_MagName = _this select 0;
_results = [];
{
if (_y select 1 isEqualTo _MagName) then {
_results pushback _x;
};
} forEach AmmoMap;
New with Arma 3 editing but for making Ai movie to locations where do you even start?
you could e.g use waypoints ๐
Waypoints
Okay before I even get that far.. Would it worse in zues mode and if so how do I add zues into my scenario
Thanks
To add zeus, you should choose if you want a playable unit or to start as zeus.
If you want a playable unit, place one unit down and set them as playable, and give them a Variable name - double click and add a name in the top bar.
Then, press F9 to open the tray of modules and search for Game Master; place one down, double click on it, and set Owner to whatever variable name you gave the playable unit.
(Feel free, anyone, to chime in and correct terms :p)
No playable as Zeus
see https://community.bistudio.com/wiki/Arma_3:_Curator to create a Zeus scenario!
Yup; the above instruction will start you as a unit, but you can press Y to access the Zeus interface.
findSafePos only does a single-point intersect check, so yeah, it's unsafe if there are any other vehicles in the area.
I just wanted to do Ai battles and I keep learning more stuff Lmao.
just for AI battles? place units in the Eden Editor, press play, enjoy ๐
does ct_combo use lbCurSel ?
Ah, back in the old days we would just place hostile units in editor and press preview and see who would survive ๐
He was asking after that in the Questions channel too, and I suggested the same but added that he could get more varied and interesting behaviour by coming here and looking into writing scripts :p
Eden is the scenario editor right?
or simply just play the Zeus scenario
correct
Sorry if I dint ask in the correct channel first.
you can either start the Eden Editor, place entities around, press play
play any Zeus scenario where you can place units in real time
create your own Zeus scenario (overkill)
no probz at all, #arma3_questions is very ok to ask questions ^^
Planing on just dropping units in and issuing them commands in Zeus.
you can play Zeus, available in Singleplayer missions
me again,
_vAmount =(_x select 1) * (_vItem select 1);
_return = _return + _vAmount ;
is something wronf with this lines ?
Yeah
_return = 0;
_vAmount =(_x select 1) * (_vItem select 1);
_return = _return + _vAmount ;
Also, what is _x
!code
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
how come my diag_log messages do not show up int .rpt file even if it is in the first line of init.sqf? (non-dedicated lan server)
// your code hereJF_calculateFreevTrunkSpace=
{
params["_obj"];
_return = 0;
_vTrunk= _obj getVariable ["JV_vTrunk",[]];
if (_vTrunk isEqualTo []) then
{
}
else
{
{
_vItem = [_x select 0] call JF_returnvItemInfos;
_vAmount =(_x select 1) * (_vItem select 1);
_return = _return + _vAmount ;
} forEach _vTrunk;
};
_return
};
tone of this 2 lines makes it generic error
see https://community.bistudio.com/wiki/Arma_3_Zeus ^^
just AI vs AI
wrong file edited, or init.sqf.txt
Oh it should be easy then.
why do you ask, any error received?
em kinda yea, //_return = _return + _vAmount ;
it works if i run the mission offline in editor, so i dont think so?
it displays now something, not the right thing, but not 0
if i uncomment that line, all goes wrong , i have to check my datatypes, i think imade somewhere a misktake
IS _X an array type or int
sorry, what values are you storing in the array for the trunk
and full error
from RPT
no, x looks like [string,int]
So.. vtrunk is [[Name,0],[Name,1]]
RPT error
well it seems to work now that i used the 'export to mp'
ah, most likely a cache issue then
arma works in mysterious ways
the real game difficulty ๐
@slow brook ty for support but i dont know what sthis rpt thing is, and i changed all return to int and it works now ... no clue
_return is not _int ...
Rpts are the log files for the game, found in %localappdata%\Arma 3\
is there a command that prevents an ammo (PG-7 rocket for example) from exploding when I strap it under a drone?
_veh = this;
_pos = position _veh;
_shell = "R_MRAAWS_HEAT_F" createVehicle _pos;
_shell enableSimulation false;
_shell attachTo [_veh, [0,0.17,-0.13]];
_veh setVariable ["attachedShell", _shell];
when I attach this shell to a darter and take it out flying, 30-60 seconds later the shell randomly detonates
disable damage perhaps?
ammo usually auto kills itself off after a certain time
doesn't work
Make a simple object of the model maybe.
best to create and attach the model, then do your own custom explosion scripting
I'm not really familiar with how explosions are created with sqf
is there a wiki article explaining it?
no, you just create an ammo like you do above, then destroy it early
you just use the model so you have something inert, then build the explosion when you want
so I create a simple object with the model of the MRAAWS heat rocket and summon another one that is not a simple object when I want it to explode?
aye
this solution worked like a charm, thanks
for this kind of script ran in the init field of objects, should i make it so only the server runs the code?
i've read that code in init fields runs both for the server and for the client
which I don't think is necessary if i simply want the rpg ammo to detonate when it touches something
Yes put a server filter in it
alrighty
indeed
and for each connecting client too
Q: I'm looking for a table or something that enumerates the known, prevailing wisdom, suggested, recommended, whatever, magazine types...
got a situation where I think what I have are some handgunWeapon compatible items and magazines, but seems to be reporting a secondary or GL magazine type... it could be that my 'source of truth' is missing the mark, so I'd like to compare notes and adjust accordingly.
thanks...
At a config level it's just magazines[] and magazineWells[], but yeah, compatibleMagazines is super helpful.
yes but I am also discerning 'primary' magazine from 'secondary' i.e. GL, or sidearm, which I guess can also be 16 ... defined as TYPE_MAGAZINE_SIDE_GL in my case. so I need to verify the weapon type itself in that instance...
I think I see what I did...
if i have _temp = int (5%2); is that ok ? and whaat is t he result ? can i somehow make sure the result is allways rounded down, no mather what ?
which a bit about what I am driving at, I want to visualize both the occupied slots as well as the unoccupied ones appropriately, as either the ghost magazine or GL round, whichever is appropriate. but I think I see what I did in terms of weapon type. case of incorrect class, I think, mistaken identity. anyway. got some sorting out to do there.
or something like( a - (a mod b) )%b ?
no i think i need floor ty !
for the future, there are no ints in Arma 3, only floats
oh so thats what that does, was wondering why i'd written that in my code
when using remoteExec do i need to use it when spawning AI on a server? or is it ok to just use execVM?
this question is weird, please rephrase / add context
i want to to spawn some AI using a script. when the server goes to use the script to spawn the AI is it OK if the script is just executed on the server or does the script have to be executed on all machines(clients)?
If you createUnit some AIs on the server then they're visible everywhere with the same gear.
yep
see https://community.bistudio.com/wiki/createUnit, effect: global
if you remote exec that, you will have 1 unit ร number of machines involved (server + clients)
ok so if it get executed on all machines it will create too many AI
yup
one spot of creation, global effect = broadcast to all systems already ๐
thanks Lou
Unless an object creation function has "local" on the end you can assume it's creating it with global effect.
i ahave a problem :
i use a function, in this function, that is triggered by a button in a dialog, this function checks a combobox, and uses the index to do something ... everything works, as soon as i press the button, but if i switch the combobox, the dialog changes everything correctly, but if i press the other resource, it still loads the one selected in the first procces
not sure what to share ...
JF_LoaderDialog_loadButton=
{
_display = findDisplay 110;
_displayData = _display getVariable ["JV_LoaderDialogData",[]];
_obj = _displayData select 0;
_vTrunkSize = _obj getVariable ["JV_vTrunkSize",0];
_vTrunk = _obj getVariable["JV_vTrunk",[]];
_giver = _displayData select 1;
_index =lbCurSel 30;
_giverData = _giver getVariable ["JV_vItemsAvalible",[[]]];
_vItemDeposit = (_giverData select _index);
_vItem = [_vItemDeposit select 0] call JF_returnvItemInfos;
_usedvSpace = [_obj] call JF_calculateUsedvTrunkSpace;
_vSize = _vItem select 1;
_int = floor ((_vTrunkSize -_usedvSpace) / _vSize);
///check if we have space, use double or single click method
if (_int > 0) then
{
if (_this select 0) then
{
[_obj, _vItem,_int]call JF_createvItemsInvTrunk;
}
else
{
[_obj, _vItem,1]call JF_createvItemsInvTrunk;
};
/////refresch lnb
_vTrunk = _obj getVariable["JV_vTrunk",[]];
lnbClear 500;
{
lnbAddRow [500,[(_x select 0), str (_x select 1),"0"]];
}forEach _vTrunk;
_usedvSpace = [_obj] call JF_calculateUsedvTrunkSpace;
ctrlSetText[102, "Space: "+ str _usedvSpace +"/"+ str _vTrunkSize];
lbsetcursel[30,0];
ctrlSetFocus (_display displayCtrl 30);
};
};
its line _index would not be refreshed ...
lbsetcursel[30,0];
This re-triggers, I think.
So it'll just call that function again with index 0.
Don't post code that you're not running then.
i deleted it because i thought it retriggers without a reason, so yes, i deleted it after your comment
your comment was the reason, it was in the code, 1 minute ago ..
still same result
got a problem with weaponsItemsCargo, and it's kind of a critical one, IMO... curious to find workarounds... as long as the platform takes only one way to load, sidearms, launchers, for instance, it is fine, I can discern the primary mag, it is always the first one.
however, consider a primary weapon that takes a muzzle load as well as a mag load, when either is loaded (conversely unloaded), then I can no longer discern primary from secondary based upon the weapon info description alone. i.e.
// Loaded with primary mag only:
[["arifle_AK12_GL_F","ACE_muzzle_mzls_B","rhsusf_acc_anpeq16a","",["rhs_75Rnd_762x39mm_89",75],[],""]]
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^
// Loaded with secondary muzzle only:
[["arifle_AK12_GL_F","ACE_muzzle_mzls_B","rhsusf_acc_anpeq16a","",["1Rnd_HE_Grenade_shell",1],[],""]]
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^
starting to see the kerfuffle? it's kind of critical, because there is a sense in which I'd like to bitmask across the range, and/or with indexes, reliably, but with this being the case, not so much. or at least not without a transform swapping mag slots to start with.
suggestions?
pistols have this same system too, just isn't visible in inventory
I don't get it. What are you trying to achieve?
Like if the question is "does this weapon fire bullets or just grenades" then weaponsItemsCargo is not the method.
I am presenting a CT_LISTNBOX with certain positional rows being the secondary (GL, when available) or primary magazine. this approach breaks when faced with inconsistent results from weaponsItemsCargo.
It sounds like you'll have to do it the hard way?
Look up each muzzle's compatibleMagazines and check it against the loaded mags.
or at least if this is supposed to be the pattern hundred percent, which obviously it isn't, per the docs.
[weapon, muzzle, flashlight, optics, primaryMuzzleMagazine, secondaryMuzzleMagazine, bipod]
hmm. If both are loaded then it puts them in the "right" place?
bingo correct. but one is unloaded.
I can check against the compatibility, which I am, but I am still left with the inconsistent weapon info.
So what's the problem?
You know there's a muzzle version of compatibleMagazines, right
in the second instance I would half expect:
[["arifle_AK12_GL_F","ACE_muzzle_mzls_B","rhsusf_acc_anpeq16a","",[],["1Rnd_HE_Grenade_shell",1],""]]
If I am holding to the documented semantics.
It's probably bugged but then it's Arma. It's a lot more reliable working around stuff when you can rather than begging people to fix it.
In this case there's a straightforward workaround with compatibleItems on the primary muzzle.
compatibleItems? primary muzzle?
compatibleMagazines :/
I am already using those, like I said, but I am assuming that the masking/slots are 'correctly' aligned...
so back to the weapon info shape itself, the magazine type for a GL round is 16? or more precisely, I suppose, gauging 'all' the types for all the compatible magazines, and ordering accordingly.
okay doke, this will sort of get me there. notwithstanding some effort to massage a useful function out of it, but it is a start.
_y = cursorobject;
_cfg_mags = configfile >> 'cfgmagazines';
_cargo = weaponsitemscargo _y;
_info = _cargo select 0;
_class = _info select 0;
_mags = _info select [4, 2];
// _mags;
_mag = _mags select 0 select 0;
// _mag;
_compat_mags = compatiblemagazines _class;
_mag_types = _compat_mags apply { _cfg = _cfg_mags >> _x; getnumber (_cfg >> 'type'); };
_base_count = count _mag_types;
_mag_types = _mag_types arrayintersect _mag_types;
_mag_types;
assuming cursorobject is the vehicle in which the weapon is inventory. also assuming the GL is loaded and not the primary mag.
but in this case the distinct mag types count exactly 2, which I suppose is not surprising.
anyway ๐ป
alright so back to the fundamental fundamental question about magazing types, where in the docs are they enumerated?
CfgMagazines
this is a start, but is that all? particularly the table...
https://community.bistudio.com/wiki/CfgWeapons_Config_Reference#Types
for example, I think I should have 32 for handgun magazines, but instead I found a 16... does not seem that consistent. oh strike that, I read it wrong. ๐
Wait, what are you asking exactly?
when we are scanning a config for magazine types... interpreting those values.
I have what I need, I think, but if I am missing something re: the actual types... would be handy to know more about what I do not know. ๐
there is way too much context to bring you up to speed. it all started learning more about the finer points about weaponsItemsCargo when the platform was unloaded...
Platform?
Okay, please write down what exactly is your goal
I'm still wondering because I can't understand you
more generally inventory manager, fully interpreting weaponsItemsCargo
And in case of something like that, why you need to have CfgMagazines list?
I am mid-way through a hybrid virtual arsenal / inventory manager project which stitches all that stuff together in a cohesive UI framework.
not so much the mags list itself, although I do need that for arsenal purposes, that much is sorted through. more the weaponsCargo interpretation, especially when you have a partially loaded primary weapon, with GL and/or mag.
it breaks the pattern described in the docs.
and I need to know how to interpret mags by their types.
but like I said, it's a lot of context, and do you really want to go that deep with me?
Small arms (personal weapons) magazines don't have any types where it goes
But weapons determine where it goes
can ctrlSetText be used with remoteExec?
no, controls are local
is there any way to do it over network then?
hmm, some other control commands do work with it
for me, ctrlEnable was working with it
I doubt that heavily. strongly, even
wtf
I don't know why you want to remoteExec them?
if you use remoteExec it may work, but only on the local machine
as in, "hey, send this to everyone and yourself!" and the machine only applies it to itself
that's about it
thats what I thought
but then why wouldnt ctrlEnable work, odd
I am using ace interaction to execute the UI
just don't use it for that
there is a conception mistake in your code
so it executes on whatever the _player is
@winter rose is there another workaround I can use to get this to work? I am just trying to open the UI on another client when they use an ace interaction.. i must be forgetting something
not going there
Tell the client to open their UI in THEIR end
is that not what remoteExec does, exec where the given client is local?
"The order will be executed where the given object is local"
do you remoteExec code, or do you remoteExec the command
I will reexamine my code, thank you @winter rose
setup =
{
params ["_target"];
createDialog "setup";
_tagData = _target getVariable "setup_data";
{
_x params ["_idc", "_data"];
ctrlSetText [_idc, _data];
ctrlEnable [_idc, false];
} forEach _tagData;
};
[_target] remoteExec ["setup", _player];
not sure if I went in the direction I was supposed to, but I moved all my code intended to be run locally under one function.
The _tagData returns what it should, and the fields are disabled, but can still not set the text. rip
are you sure _data has correct string?
How do people here stay motivated to work on a (larger) project if you don't have a community continuously playing the stuff you're making? It feels very lonely to me and I struggle to finish my tasks not only but also because of that. I worked on a gamemode I was less interested in than my main project for years since it was much more rewarding to be surrounded by a community
Release it to the public I guess?
It's very, very WIP still because I was focused on that less interesting project for a good while ๐
Sometimes you just do stuff for yourself and you don't care who else likes it, as long as you love doing it 
!code
```sqf
// your code here
hint "good!";
```
โ
// your code here
hint "good!";
What if I'm not doing it for myself (only)? The development process itself is sometimes interesting, sometimes painful. I enjoy the end result itself the most by far, I get my kicks from seeing others enjoying it
JF_LoaderDialog_loadButton=
{
_display = findDisplay 110;
_ctrl = _display displayCtrl 30;
_index = lbCurSel _ctrl;
_displayData = _display getVariable ["JV_LoaderDialogData",[]];
_obj = _displayData select 0;
_giver = _displayData select 1;
_vTrunkSize = _obj getVariable ["JV_vTrunkSize",0];
_vTrunk = _obj getVariable["JV_vTrunk",[]];
_giverData = _giver getVariable ["JV_vItemsAvalible",[[]]];
_vItemDeposit = (_giverData select _index);
_vItem = [_vItemDeposit select 0] call JF_returnvItemInfos;
_usedvSpace = [_obj] call JF_calculateUsedvTrunkSpace;
_vSize = _vItem select 1;
///check if we have space
_int = floor ((_vTrunkSize -_usedvSpace) / _vSize);
if (_int > 0 && lbCurSel 30 != -1) then
{
// [_obj, "CopperOre",1] call JF_createvItemsInvTrunk;
// [_obj, "CopperIngot",1] call JF_createvItemsInvTrunk;
[_obj, _vItem select 0,1] call JF_createvItemsInvTrunk;
/////refresch lnb
_vTrunk = _obj getVariable["JV_vTrunk",[]];
lnbClear 500;
{
lnbAddRow [500,[(_x select 0), str (_x select 1),"0"]];
}forEach _vTrunk;
_usedvSpace = [_obj] call JF_calculateUsedvTrunkSpace;
ctrlSetText[102, "Space: "+ str _usedvSpace +"/"+ str _vTrunkSize];
};
};
i teste4d this function now and i have a problem, as soon as it runs it looks like _index = lbCurSel _ctrl;gets kinda frozen, does not change
any ideas
a button runs this function ...
ctrl 30 is a combo box
if i press the button, its like _index stays the same all the time
if that doesnt work, any similar gui parts like the combo box ? type 4
lbCurSel 30
try
lbCurSel _ctrl
Generally speaking. Try to avoid the syntax that uses idc but instead use the one that directly references the control
If that doesn't help. Add some logging to make sure all variables are what they are supposed to be.
it does not , the code uses this in line 5 and 6
would you help me and explain, how do i do the logs?
who do i check runtime state of variables ? im pretty new
i want the _indec _vItenDeposit and _vItem to be logged every thime this function fires, diag_log format ["%1, %2, %3", _ index, _vItedDeposit, _vItem];
_vehicle isKindof "Car"
diag_log format ["%1, %2, %3", _index, _vItemDeposit, _vItem]; is this ok ?
ooh, does it matter how far down the class hierarchy it is? e.g if it's CarC : CarB : CarA : Car, would it still return true for whether a CarC is Car?
Yes
okie, thank
I spent 3 months on making a mission and another 3 months on remaking that mission, both didn't get more than 40 subscribers but I do it because I like the idea and premise
(And a test to my skills)
Just always expect something to not succeed and you are doing it only for your fun and amusement
@drifting portal wanna team up ? so we can waste our time together ๐
I just finished working on a project I need to rest lol
im coding a new rpg framework (and im a total noob), so if someone is interested in guiding me , pm me, i ahve a private server and the mission will be definitly played ...
Yeah, it's true that you can never know whether your project will succeed or not. But my reward is seeing others enjoying their time! My own experience is mostly meaningless to me, or maybe better put, it's meaningful only if it exists in the context of bigger picture
How can I tell an UAV to fly at an exact point in the world?
I'd like it to fly carelessly straight into wherever I want it to go
You want it to crash?
I guess make it so that when it reaches a certain area it directs itself towards the point to crash into and give it a speed boost
Or you could use velocityTransformation or Bis_fnc_UnitCapture
Funny coincidence, the project I'm talking about is a RPG framework (or more like a gamemode and not a framework if strictly defined). I wish you the best of luck, since based on my experience RPG is the hardest category (or one of the hardest at least) in game/Arma development to get it right. The code gets complex quite easily too, but I find the game design the most difficult aspect of it since everything in multiplayer RPGs is very context sensitive
Unit capture won't work out for me since I don't want it to be a scripted event, I want the drone to "dynamically" follow the point
sure I can script the movement of the drone myself but i don't think it'd be realistic
I'm not sure why you need it to pass through an exact point if its not a scripted sequence
What, exactly, is the effect youre trying to achieve? From the scenario's player's perspective.
i do not think rpg is the hardest, since rpg is based a lot in game mechanics, which can be added 1 by 1, a lot of the times you just add 1 new vItem with working actioons ...
rpg can be developed in different ways, all other styles have a specific
I have a server only trigger that does [48, [0.049, 0.09, 87]] remoteExec ["setFog", 0]; from an sqf file (and a couple different things).
What's weird - the fog doesn't appear for my player unit when testing this on a dedicated server but when I go into spectator mode it actually works.
also tried to do ["setFog", 2] before but it didn't work properly too
I'd like my drone under which I strapped a RPG ammo to crash into a vehicle when I trigger an action
^^^^^^
Is the vehicle controlled and moving, or static and this is just for show/recording?
moving
Do you have any mods loaded? I cant think of any that negates weather effects but best to rule out first.
basically just a piloting assist that automatically crashes the drone into whatever
yeah, there are a couple of mods loaded, ill try to go through them
whats also interesting, when I do skiptime (around 1 hour) the fog appears
okay, ive tried skipTime 1 before doing the setFog
and it works properly now
I mean, you are also giving it like 48 seconds to grow to that value :p
Down to the player perspective: are you saying that in your scenario, you want the player to watch a drone fly into a vehicle on command?
@manic sigil sup!
You're probably going to want some kind of setVelocity/setVectorDirAndUp/setVelocityTransformation stuff. Trying to get the AI to do it on its own is likely to be either impossible or not worth the effort
As Nikko said; the AI is all about avoiding hitting things. Overwriting that is gonna be a real trick; either forcing the drone to do it, or deleting the drone and replacing with a guided munition with a drone attachTo'd the top.
morning gents (and ladies), could someone please explain the table for me? in particular nbits, how do the bits actually break down, please?
https://community.bistudio.com/wiki/CfgWeapons_Config_Reference#Types
Ive never played with this, but disable the AI and then set the velocity? Is this viable?
Yeah, though youre gonna be doing some funky things to get it to seek out a dynamic target. Not impossible, just technical. Id pull up BIS_fnc_EXP_camp_guidedProjectile and see how they managed it.
Hmmmmmm. As an alternative for the question OP, may I suggest trying to make this problem simpler?
Using vectorFromTo should make it fairly simple as long as you don't need proportional guidance (leading)
or better yet, I am really after the getNumber (configFile >> "CfgMagazines" >> _magazineClass >> "type"), where are these enumerated in the docs, if at all, please...
which I gather is also partially dependent on the weapon type? i.e. getNumber (configFile >> "CfgWeapons" >> _weaponClass >> "type")
thanks...
sorry for the late response, yeah I want to make it fly to the target on command
I'll try to script something believable, thanks for the help
This is why I ask for player perspective, it gets the intent across easier and leads to more feedback ๐
saves you guys more time too
i.e. suicide drone?
yep, tho calling it a "programatically driven hazardous flying object" sounds prettier
depending how awake you are ๐ also drop whatever waypoints it might currently have... but I think that's going to be the wrinkle, I think, the AI does not generally behave like that. good luck, good hunting!
I wont deprive you of a valuable learning experience from programming it yourself, but Id be remiss if I didnt point out there are some existing suicide drone mods already on the workshop :p
while {is3DEN} do
{
(systemTime apply {if (_x < 10) then {"0" + str _x} else {str _x}}) params ["_year", "_month", "_day", "_hour", "_minute", "_second", "_millisecond"];
_ctrlTimer ctrlSetText (format ["%1:%2:%3",_hour,_minute,_second]);
_ctrlTimer ctrlSetTooltip (format ["System Time:\n%4:%5:%6\n%3/%2/%1",_year,_month,_day,_hour,_minute,_second]);
uiSleep 1;
};```
I'm wondering if maybe I should do a waitUntil or something for the second to change, then begin the loop, so it doesn't initialize the loop at 1 second and 99 miliseconds xD
Also might make a clock viewable from the menu. So if you want to know the time, just pause the game.
Or maybe it should be in the map, or in game- Thoughts?
System time* not the in game time :P
I think it's going to be the same regardless since you're using systemtime
Yea, but the uiSleep will make it so it updates only 1 time every second
Hello, is it possible to detect when a player leaves the server or fails to connect using a script included in a mod?
yes but it runs on the server, not the client
you mean you want to make that check in client?
yes
well maybe you can use this: https://community.bistudio.com/wiki/getClientState
thks i look that
Hello! not sure how to google this but is there way to press the "ESC" button twice with SQF?
To do what?
I've got some ACE Spectator remnants in the "Select respawn location" screen after dying that only disappear after hitting ESC twice.
Looks like this: https://imgur.com/a/NseHHaS
just a guess but u could try closeDialog on that OR closeDisplay
Hello, I have problem with my function. I execute it with the "preInit" argument for loads when the game starts, but when i use spawn to create a loop within the function, it doesn't work. Do you have a solution to resolve this problem?
is destrType the most reliable way to check if some object is destructible?

