-
Content Count
941 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by moricky
-
Limited Access to Objects in Editor?
moricky replied to infiltrator_2k's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It's based on scope config property. A lot of objects are hidden to prevent cluttering lists too much, buy I agree the rules are rather unclear and the current state is confusing. The new 3D editor will allow showing all objects. -
We have some internal coding guidelines, let me answer to you questions according to them. 8 (mainly because of compatibility with Windows Notepad, where it cannot be changed) Not required. Handy when separating large blocks of code, useless when used between each line. Required when code continues after semicolon on the same line. Not required. Functions folder is used in addons. Missions doesn't need to follow this rule. Doesn't affect functionality, it's only for sorting. Capitalization is recommended, but not required.
-
3CB Kill Zeagle - Disable Zeus Eagle & Notification
moricky replied to Gudsawn's topic in ARMA 3 - ADDONS & MODS: COMPLETE
Disabling the eagle was possible since the release (you can also use different object, for example "seagull") myCuratorModule setVariable ["birdType",""]; Notifications cannot be currently disabled. I added the possibility, it should be available in the next patch: myCuratorModule setVariable ["showNotification",false]; Also, the exploit with recompile = 1 will be fixed. Sorry. -
Displaying the Escape/Pause Menu
moricky replied to legman's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
While you can open the menu using createDialog or createDisplay, it won't work correctly. I'm afraid there's currently no way how to force open functional pause menu. -
server machine time
moricky replied to fn_Quiksilver's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Scripting command missionStart could help. -
You initialized the ammobox with allowAll param, which automatically adds every weapon and item no matter what you whitelisted. If you want to customize the contents, don't use the param. More info can be found on Biki.
-
The issue should indeed be resolved in 1.42, it was just accidentally omitted in the change log. I'll add it there.
-
Unique variable for object
moricky replied to champ-1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
When two different scripts are using one variable name for different purposes, they risk much more than this. That's why it's good practice to use variable prefixes. However, I'll consider expanding BIS_fnc_objectVar with condition checking if custom var is already used and assigning a generic one if it does. -
Unique variable for object
moricky replied to champ-1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Don't call setVehicleVarName, the function will do it for you. The command is analogous to naming an object in the editor, so the function accepts it and won't try to assign a generic name. -
Unique variable for object
moricky replied to champ-1's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I suggest to use BIS_fnc_objectVar. When object has a custom name from the editor, it will use it, otherwise a new one is assigned. The name is unique no matter where the function is called from and is preserved even after respawn. Most of our missions and modules are using this function. Examples: _objVar = _object call BIS_fnc_objectVar; _object = missionNamespace getVariable _objVar; -
Mission author is actually innocent in this case, it was my mistake. Affects all official missions which are using custom scripted functions. Fixed, should be available soon.
-
Suggestion for Description.EXT Switches.
moricky replied to thecoolsideofthepillow's topic in ARMA 3 - GENERAL
Our current 3D editor plan agrees with you ;) -
[CODE SNIPPET] Marker Color Names to Arrays
moricky replied to austin_medic's topic in ARMA 3 - MISSION EDITING & SCRIPTING
There's a function for that ;) _colorRGBA = (configfile >> "CfgMarkerColors" >> _color >> "color") call BIS_fnc_colorConfigToRGBA; -
Configuring new voice profile
moricky replied to Pomi Git's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
I published the internal radio protocol documentation I've wrote a few years ago, I hope it helps. -
What does _generalmacro do?
moricky replied to Chairborne's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Some config properties are generated automatically (e.g., "nameSound", which sets how to unit appears in radio protocol, is computed based on unit's role and equipment, so coders won't need to set it manually). _generalMacro property is added to all objects which underwent this process to help with debugging. -
Configuring new voice profile
moricky replied to Pomi Git's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
CfgVoice >> [VoiceClass] >> protocol defines which radio protocol will be used (e.g., "RadioProtocolENG"). Protocol class can then be found directly in the config root. I must warn you that protocol configuration is one of the most complicated things in Arma 3, so I suggest to take existing protocol structure and replace it with custom files. The list of all words to be recorder is in [ProtocolClass] >> Words. For example official protocol has 691 words. Have fun ;) -
For some reason, FSM state names are not saved correctly. Current: /*%FSM<STATE "BaseWestGuer">*/ class /*%FSM<STATEPRECONDITION>*//*%FSM</STATEPRECONDITION>*/ { ... }; Expected (after re-saving it at my PC using FSM editor in Steam default A3 tools): /*%FSM<STATE "BaseWestGuer">*/ class BaseWestGuer/*%FSM<STATEPRECONDITION>*//*%FSM</STATEPRECONDITION>*/ { ... }; Honestly, I have no idea why is it happening, all other FSM data e.g., links, inits, etc.) are correct. Are you doing something out of ordinary when editing the file? If you create a new FSM ORBAT file, will it be the same? Could you heck if FSMs compiled with other configs (e.g., scriptedFSM.cfg, executable using execFSM) are broken as well?
-
AI players NOT deducting tickets but human players are. Help
moricky replied to owmyeye's topic in ARMA 3 - MISSION EDITING & SCRIPTING
To each unit's init (replace _unit by this in that case). If you're creating some units on the fly, you have to call it on them as well. -
AI players NOT deducting tickets but human players are. Help
moricky replied to owmyeye's topic in ARMA 3 - MISSION EDITING & SCRIPTING
By default, the ticket system works only for players. You'll have to call BIS_fnc_respawnTickets every time an AI unit dies: _unit addEventHandler ["killed",{[_this select 0,-1,true] call bis_fnc_respawnTickets;}]; -
Dialogs - Transparency in Pictures
moricky replied to Armitxes's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Try saving the file with _ca suffix. -
[format ["<t align = 'center'>%1</t>",localize "STR_ON_Connections_05"],localize "STR_ON_Connections_04",true, false, nil, false, false] spawn BIS_fnc_guiMessage or [<t align = 'center'>" + localize "STR_ON_Connections_05" + "</t>",localize "STR_ON_Connections_04",true, false, nil, false, false] spawn BIS_fnc_guiMessage Don't forget to use localize.
-
Splendid Camera Removes Fog
moricky replied to IndeedPete's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi, the Splendid camera shouldn't be adjusting fog in any way. When I'm trying it on my PC (Steam Dev), fog remains unchanged after entering the camera. How are you setting fog? What's its value after entering the camera (check using fogParams command)? Are you running any mods which could change the camera script (check the path in functions viewer)? -
Grid Refrence to World Position
moricky replied to big_wilk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This was a nice coding exercise. BIS_fnc_gridToPos coming to your dev version soon ;) It works with any possible grid configuration, including rectangular grids, various offsets, letter denotations or custom format. /* Author: Karel Moricky Description: Converts grid coordinates to world position. Correct results outside of the map area are not guaranteed. Parameter(s): 0: STRING - grid returned by mapGridPosition command Returns: ARRAY in format [[gridX:Number,gridY:Number],[gridWidth:Number,gridHeight:Number]] */ private ["_posGrid","_cfgGrid","_offsetX","_offsetY","_zoomMax","_format","_formatX","_formatY","_stepX","_stepY"]; _posGrid = [_this,0,mapgridposition position cameraon,[""]] call bis_fnc_param; //--- Extract grid values from world config _cfgGrid = configfile >> "CfgWorlds" >> worldname >> "Grid"; _offsetX = getnumber (_cfgGrid >> "offsetX"); _offsetY = getnumber (_cfgGrid >> "offsetY"); _zoomMax = 1e99; _format = ""; _formatX = ""; _formatY = ""; _stepX = 1e10; _stepY = 1e10; { _zoom = getnumber (_x >> "zoomMax"); if (_zoom < _zoomMax) then { _zoomMax = _zoom; _format = gettext (_x >> "format"); _formatX = gettext (_x >> "formatX"); _formatY = gettext (_x >> "formatY"); _stepX = getnumber (_x >> "stepX"); _stepY = getnumber (_x >> "stepY"); }; } foreach configproperties [_cfgGrid,"isclass _x",false]; //--- Get grid format private ["_iX","_iY","_formatXcount","_formatYcount"]; _iX = -1; _iY = -1; {if (_iX < 0) then {_iX = _format find _x;};} foreach ["X","x"]; {if (_iY < 0) then {_iY = _format find _x;};} foreach ["Y","y"]; _formatXcount = count _formatX; _formatYcount = count _formatY; //--- Convert letters to numbers private ["_replaceBefore","_replaceAfter","_posGridX","_posGridY","_fnc_lettersToNumbers"]; _replaceBefore = toarray " 0123456789abcdefghijklmnopqrestuvwxyz"; _replaceAfter = [-1,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]; _posGridX = _posGrid select [_iX,_formatXcount]; _posGridY = _posGrid select [_iY + _formatXcount - 1,_formatYcount]; _fnc_lettersToNumbers = { _array = toarray tolower (_this select 0); _count = _this select 1; _step = _this select 2; _result = 0; { _result = _result + (_replaceAfter select ((_replaceBefore find _x) max 0)) * _step * 0.1 * 10^(_count - _foreachindex); } foreach _array; _result }; _posGridX = [_posGridX,_formatXcount,_stepX] call _fnc_lettersToNumbers; _posGridY = [_posGridY,_formatYcount,_stepY] call _fnc_lettersToNumbers; _formatX = [_formatX,_formatXcount,_stepX] call _fnc_lettersToNumbers; _formatY = [_formatY,_formatYcount,_stepY] call _fnc_lettersToNumbers; _posGridX = _posGridX - _formatX; _posGridY = _posGridY - _formatY; //--- Get map size (ToDo: Universal detection by new scripting command) private ["_ctrlMap","_mapPos1","_mapPos2","_mapSize"]; _ctrlMap = finddisplay 12 displayctrl 51; _mapPos1 = _ctrlMap ctrlmapscreentoworld [0,0]; _mapPos2 = _ctrlMap ctrlmapscreentoworld [1,0]; _mapPos1 set [2,0]; _mapPos2 set [2,0]; _mapSize = round ((_mapPos1 vectordistance _mapPos2) / ctrlmapscale _ctrlMap); //--- Correct vertical pos, which for legacy reasons starts in top left, not bottom left corner if (_stepY > 0) then {_offsetY = _offsetY + _stepY;}; //--- Return the position [[_offsetX + _posGridX,_mapSize - _offsetY - _posGridY],[abs _stepX,abs _stepY]] -
how to make trigger detect only land units? (not air)
moricky replied to Coolinator's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This condition is faster than checking for individual Z coordinates: count (thisList unitsBelowHeight 2) > 0 -
Grid Refrence to World Position
moricky replied to big_wilk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Rather than compiling the grid string, you can simply use parseNumber, it's about 2.5x faster. Also, please note your solution will work only on terrains which are using numeric notation with 3 digits. For example South Asia from Take On is using 4 digits, and older islands, unless reconfigured, may be using alphabet as well (good ol' Bc64). The grid is defined in CfgWorlds >> [WorldName] >> Grid