Mr H.
Member-
Content Count
597 -
Joined
-
Last visited
-
Medals
Everything posted by Mr H.
-
Issue with custom Mission, Not loading
Mr H. replied to thephilluk's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Are the mods correctly enabled on the server? You should also include server rpt files. -
Where to go next with creating a dialog?
Mr H. replied to anaximandross's topic in ARMA 3 - MISSION EDITING & SCRIPTING
As with everything Arma related it is tedious at first but after a while you'll find it easier and easier. -
Where to go next with creating a dialog?
Mr H. replied to anaximandross's topic in ARMA 3 - MISSION EDITING & SCRIPTING
that's just the 1st step, then you need to export parent classes (ctrl + P) in the GUI editor. Place them in a file called defines.hpp (or any other name it's not important) and the file in the same folder as the file that contains your dialogs. Best practice is to have 3 files: 1) description.ext (mandatory) 2) the file containing your dialogs (see post above) let's call it mydialog.hpp 3) the file that contains your parent classes (defines.hpp) Now for this example description.ext is (always) at the root of your mission but the two other files are in a subfolder called "dialogs". step 1 your description.ext must contains the following lines: #include "dialogs\mydialog.hpp" //make sure that the path and file names are exact or else arma will crash step 2 your mydialog.hpp must contain the following: #include "defines.hpp" //has to be in the same directory or else arma will crash class MyDialog // Change! { idd = 102103; // Change to your random IDD ! movingEnable = false; class controlsBackground { class RscPicture_1200: IGUIBack { idc = 1200; text = "#(argb,8,8,3)color(1,1,1,1)"; x = 15 * UI_GRID_W + UI_GRID_X; y = 5.5 * UI_GRID_H + UI_GRID_Y; w = 33 * UI_GRID_W; h = 25 * UI_GRID_H; }; }; class objects { // define controls here }; class controls { //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT START (by Harbor, v1.063, #Kuqyvu) //////////////////////////////////////////////////////// class Har_List: RscListbox { idc = 1500; text = "Option 1"; //--- ToDo: Localize; x = 5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 31.5 * GUI_GRID_W; h = 11.5 * GUI_GRID_H; colorText[] = {1,1,1,1}; tooltip = "Yes"; //--- ToDo: Localize; }; class Har_Ok: RscButton { idc = 1600; text = "Ok"; //--- ToDo: Localize; x = 10 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Cancel: RscButton { idc = 1601; text = "Cancel"; //--- ToDo: Localize; x = 26 * GUI_GRID_W + GUI_GRID_X; y = 14 * GUI_GRID_H + GUI_GRID_Y; w = 4 * GUI_GRID_W; h = 2.5 * GUI_GRID_H; }; class Har_Frame: RscFrame { idc = 1800; x = 1.5 * GUI_GRID_W + GUI_GRID_X; y = 1.5 * GUI_GRID_H + GUI_GRID_Y; w = 37 * GUI_GRID_W; h = 16 * GUI_GRID_H; }; //////////////////////////////////////////////////////// // GUI EDITOR OUTPUT END //////////////////////////////////////////////////////// }; }; Step 3 SAVE your mission in the editor every time you change any of the above files or else they will not be taken into account by the game. Step 4 in the debug console write : createDialog "MyDialog" // whatever name you have put under class MyDialog You should now see your dialog Step 5 .... you have to code everything else, it would be way to long to do it in detail but here are the ui related commands for your information: https://community.bistudio.com/wiki/Category:Command_Group:_GUI_Control and I strongly recommand you read this before going any further: https://community.bistudio.com/wiki/Dialog_Control as a last piece of advice: it is better to use safezone than to use GUI_GRID for position and size of your controls (they will look the same on any computer, regardless of the user's resolution) -
[HELP] Nested if-statements / Multi-dimensional arrays
Mr H. replied to Zeraw's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This explains that, your arrays are not all of the same size BTW ["FirstAidKit",5],["rvg_antiRad",5,6],["rvg_money",1000,1],["rvg_canisterFuel",1,20],["rvg_toolkit",1,3],["rvg_purificationTablets",5,6] let's say you are at the firs forEach loop: _x is read by the engine as ["FirstA idKit",5] so "FirstAidKid" is _x select 0, and the number is _x select 1. so your line would be something like : { if ((_x select 0) in items player) then { for "_i" from 1 to (_x select 1) do {player removeItem (_x select 0)}; }; }forEach [["itemstring",itemnumber],["itemstring2",itemnumber2]]; -
[HELP] Nested if-statements / Multi-dimensional arrays
Mr H. replied to Zeraw's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Replace each _x by (_× select 0) -
shouldn't happen! Where do you call the script from? Nothing seems wrong with your code.
-
Switch On PC - USB Stick
Mr H. replied to black_hawk_mw2_87's topic in ARMA 3 - MISSION EDITING & SCRIPTING
// begin advertisement My mod includes a usable tablet: https://mrhmilsimtools-arma3-mod.wikia.com/wiki/Soldier_PDA_use_and_framework_guide and a hacking / data downloading tool https://mrhmilsimtools-arma3-mod.wikia.com/wiki/Hacking_tool_guide_and_framework if you're interested // end advertisement 😉 -
Question how to make zombie like attack
Mr H. replied to Stormmy1950's topic in ARMA 3 - MISSION EDITING & SCRIPTING
What you're asking for will require a mod because I don't think vanilla Arma 3 has fitting animations. You could get away with a reskin and some tweaks but honestly that's a lot of trouble to achieve a result that will not be on par with what mods like Ravage or Zombies and demons have to offer -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Didn't know isKindOf accepted anything but a class string is that what your variable points to? -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_shooter isKindOf VD_InfectionInstigator Are you sure about that line? Doesn't make sens to me... -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It will init for every client that connects so yes -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
absolutely! Fairly simple: TAG_yourInitFunction { postInit = 1; // this will start your func after player is loaded }; you can also do it with CBA https://github.com/CBATeam/CBA_A3/wiki/Extended-Event-Handlers-(new) -
Local Variable in Global Space
Mr H. replied to anaximandross's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I can see a typo here: if(_gobalFood > _foodcost) then {// should be _globalFood Which variable is mentioned in the error message? -
What you ask for will require that you detect when the rope is attached and when the rope is detached, the rest is easy but this part is quite tricky (use eventhandlers: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#RopeAttach ) when attaching (in the eh) store the variable on the object yourobject addEventHandler ["RopeAttach", { params ["_object1", "_rope", "_object2"]; _object1 setVariable ["OrgMass",getMass _object1,true]; _object1 setMass YOURNEWMASS; }]; and when the rope is detached yourobject addEventHandler ["RopeBreak", { params ["_object1", "_rope", "_object2"]; _object1 setMass (_object1 getVariable "OrgMass"); }]; I suggest adding the EH to all vehicles at mission startup from script Now for the table of masses to keep I would declare them in a class in the mission description.ext
-
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
And there's many more stuff cba does that people don't know about. Since something like 50 % of mods require it there's a good chance that almost all players who use a modded version of arma have it and if they don't it's a very small download. No worries! When you publish your mod please share the link here so I can try it! -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yes i did the same for the helis but edit boxes return STRINGS so you have to convert them to arrays it's fairly simple: TAG_convert_strings { params ["_string"]; _resultingArray = _string splitString ","; _resultingArray }; ["heli1,heli2,heli3"] call TAG_convert_strings; //Result: ["heli1","heli2","heli3"] note that in the editbox classnames should be written separated by comas but without quotes -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah it is ;-) I think your issue is in the way you define the preinit eh Try this: class Extended_PreInit_EventHandlers { class VD_Apocalypse { init = "call compile preProcessFileLineNumbers '\VDA\CBASettings.sqf'"; }; }; Also you can have a look here, https://github.com/MisterHLunaticwraith/MRHMilsimTools/tree/master/Addons/MRHMilsimTools it's the github rep for my mod,reverse engineering is the way to go! (that's what I did at first, I spent a lot of time browsing ace 3's github to see how they did it, and I still do) -
titleText is not work in MP (on holdAction)
Mr H. replied to KingChiRoll's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I was wrong, after checking the wiki it's just a syntax of remote exec I did not know (I did not know you could pass an object as a JIP parameter ) -
titleText is not work in MP (on holdAction)
Mr H. replied to KingChiRoll's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Also this is wrong -
titleText is not work in MP (on holdAction)
Mr H. replied to KingChiRoll's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Don't use bis_fnc_MP it's deprecated you can remote exec the whole block: [[], { //your code here }] RemoteExec ["Spawn",[0,-2] select isDedicated]; -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Again: cba settings is much easier and has many other advantages over modules for the record when ACE3 switched from modules to cba for all their settings I went on their github and complained, after extensive use I now realize that I was a fool and they were right ;-) -
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
here's the guide for cba settings: https://github.com/CBATeam/CBA_A3/wiki/CBA-Settings-System A few extra info on that: 1) If you want the settings to show up from the editor and onward you need to have "cba_main" in your required addon in the cfg patches It will look something like that: class CfgPatches { class MRHMilsimTools{ units[] = {}; // weapons[] = {}; // requiredVersion = 0.1; // requiredAddons[] = {"cba_main"}; version = 1.16.5; versionStr = "1.16.5"; versionAr[] = {1,16,5}; versionDesc = "MRH Milsim Tools"; versionAct = "call compile preProcessFileLineNumbers '\MRHMilSimTools\about.sqf'"; author = "Mr H."; url = "https://mrhmilsimtools-arma3-mod.wikia.com/wiki/MRHMilsimTools_ARMA3_Mod_Wiki"; }; }; 2) You need to call the function containing the settings from a preprocessed file so call it like this from your config.cpp class Extended_PreInit_EventHandlers { class MRHMilsimTools_CBA_Settings { init = "call compile preProcessFileLineNumbers '\MRHMilSimTools\Functions\SettingsPreInit\CBASettings.sqf'"; }; class MRHMilsimTools_CBA_Settings_keybinds { init = "call compile preProcessFileLineNumbers '\MRHMilSimTools\Functions\SettingsPreInit\CBAKeys.sqf'"; }; }; 3) You will then need to write a function that parses all these settings to make them the variables you neet, this is very easy to do. ////////////////////If you go the modules way: class Logic; class Module_F: Logic { class ArgumentsBaseUnits { class Units; }; class ModuleDescription { class AnyBrain; }; }; class MRH_SAT_POSANDSPEEDINIT_MODULE: Module_F { scope = 2; displayName = $STR_MRH_MODULESATPARAMSDISPLAYNAME; author = "Mr. H"; category = "Satellite"; function = "MRH_fnc_InitFromModule";//aremplir functionPriority = 1; isGlobal = 2; isTriggerActivated = 0; // Menu displayed when the module is placed or double-clicked on by Zeus //curatorInfoType = "RscDisplayAttributeModuleNuke"; // Module arguments class Arguments { class SatSpeed { displayName = $STR_MRH_SATSPEEDDISPLAYNAME; description = $STR_MRH_SATSPEEDSETTINGDESCRIPTION; //tooltip = "Vitesse de déplacement du satellite en km/h(défaut 100kmh)"; defaultValue = "100"; }; }; class ModuleDescription: ModuleDescription { description = $STR_MRH_MODULEDESCRIPTION; sync[] = {"LocationArea_F"}; class LocationArea_F { description[] = { // Multi-line descriptions are supported "First line", "Second line" }; position = 1; // Position is taken into effect direction = 0; // Direction is taken into effect optional = 1; // Synced entity is optional duplicate = 0; // Multiple entities of this type can be synced synced[] = {"AnyBrain"}; // Pre-define entities like "AnyBrain" can be used. See the list below }; }; }; this worked in my satellite mode, it added a line to set up the satellite's speed in the modules attributes. However this was a while ago, if I where to do it now I would use a class attributes something like that: class Attributes // Entity attributes have no categories, they are all defined directly in class Attributes { class UseDefaultAceActions { //--- Mandatory properties displayName = $STR_MRH_MRHMiscItems_scannerUseAceACAttr; // Name assigned to UI control class Title tooltip = $STR_MRH_MRHMiscItems_scannerUseAceACAttrToolTip; // Tooltip assigned to UI control class Title property = "MRH_BS_useActions"; // Unique config property name saved in SQM control = "CHECkBOX"; // UI control base class displayed in Edit Attributes window, points to Cfg3DEN >> Attributes expression = "_this setVariable ['MRH_BS_UseCustomActions',_value]"; defaultValue = "false"; unique = 0; // When 1, only one entity of the type can have the value in the mission (used for example for variable names or player control) validate = "none"; // Validate the value before saving. Can be "none", "expression", "condition", "number" or "variable" condition = "object"; // Condition for attribute to appear (see the table below) typeName = "BOOL"; // Defines data type of saved value, can be STRING, NUMBER or BOOL. Used only when control is "Combo", "Edit" or their variants }; more documentation on that: https://community.bistudio.com/wiki/Eden_Editor:_Configuring_Attributes -
Vertical align RscStructuredText (using as title bar)
Mr H. replied to HazJ's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@HazJ style style = ST_MULTI; accepts parameter lineSpacing = 1; , maybe try to toy with that to make the text reappear but I have my doubts.- 26 replies
-
- 1
-
- rscstructuredtext
- title
-
(and 1 more)
Tagged with:
-
Vertical align RscStructuredText (using as title bar)
Mr H. replied to HazJ's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Maybe by using this style: style = ST_MULTI; (not sure, untested)- 26 replies
-
- rscstructuredtext
- title
-
(and 1 more)
Tagged with:
-
cba Create custom EdenEditor Modules vs. CBA Settings for Addon
Mr H. replied to Vandeanson's topic in ARMA 3 - MISSION EDITING & SCRIPTING
It's a lot of settings. If you're not opposed to having cba as a dependency for your mod maybe you'd be better of using cba settings. As for modules use the 3den attributes to add fields and options