Jump to content

7erra

Member
  • Content Count

    753
  • Joined

  • Last visited

  • Medals

Everything posted by 7erra

  1. to summarize: Your mod folder looks like this on your P: drive: Modname/ ├─ addons/ │ ├─ video/ │ │ ├─ video1.ogg │ │ ├─ config.cpp │ │ ├─ PBOPREFIX the config.cpp contains this: class CfgPatches { class Modname { // Meta information for editor name = "My Addon"; author = "Me"; url = "http://xkcd.com"; // Minimum compatible version. When the game's version is lower, pop-up warning will appear when launching the game. Note: was disabled on purpose some time late into Arma 2: OA. requiredVersion = 1.60; // Required addons, used for setting load order. // When any of the addons is missing, pop-up warning will appear when launching the game. requiredAddons[] = { "A3_Functions_F" }; // List of objects (CfgVehicles classes) contained in the addon. Important also for Zeus content (units and groups) unlocking. units[] = {}; // List of weapons (CfgWeapons classes) contained in the addon. weapons[] = {}; }; }; and your PBOPREFIX: Modname\addons\video now you should be able to play the video with ["\Modname\addons\video\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0];
  2. You don't need the CfgFunctions if you are doing it via mod. This is only if you don't want to make a mod and use the mission directory instead. There isn't anything syntax-wise wrong with the remoteExec statement, try to type it 1:1 instead of copying it, this forum likes to insert invisible characters sometimes.
  3. you also need to add a CfgPatches to your config.cpp and a PBOPREFIX. then you can use the path from your addon: ["\327thVideo\film\video1.ogv"] remoteExec ["BIS_fnc_playVideo", 0];
  4. so for everyone at once at a certain point in the mission just execute ["\path\to\addon\video.ogv"] remoteExec ["BIS_fnc_playVideo", 0]; if you are new to creating addons then I'd check this topic: But it is not necessary to creat an addon to play a video if you only intend to use it once. You can also play a video from the mission directory: [[], { [getMissionPath "path\to\video.ogv"] call BIS_fnc_playVideo; }] remoteExec ["spawn", 0]; This is a dirty solution security and performance wise but at least it's simple. The path is relative to the directory where the mission.sqm is. Here is also the better solution:
  5. Just some things to check: Did you reload the description.ext? You have to go back to 3den or use these tricks. Is the rest of the config correct? A mistake that I often see and also make myself is to not put the controls inside a "Controls" class. Any errors in RPT? Do you have any other controls? Especially the CT_LISTNBOX is tricky as the first two controls with an idc of -1 are used as "buttons". not entirely correct, it's a tutorial on the BIKI (Bohemia Interactive Community Wiki) so it is written by BI and/or the community and in this case that would be all the contributors listed on the history tab 😄
  6. I just did and I am still right? The icon is not drawn when the command is not executed, so the code of the else statement does nothing, this would be more performant: addMissionEventHandler ["Draw3D", { if (time mod 60 <5) then { drawIcon3D ["\a3\ui_f\data\igui\cfg\simpletasks\types\move_ca.paa", [0.73, 0.24, 0.11, 1], ASLToAGL getPosASLVisual operatorOpf, 1, 1, 0]; }; }]; But why waste performance every frame when you don't have to? That time mod check is still unnecessary when you can just do absolutely nothing for 60 seconds with sleep 60. But yes, your approach is valid.
  7. this is way less performant as you execute it every frame so 60 times per second or more. also no for the else part, the icon is only drawn in that single frame. goddamn BI Forum with its invisible characters out of nowhere (char <feff>, so a BOM apparently). I edited the original answer.
  8. Description This dialog is supposed to make the training of firing drills easier. It will show the current target, stats of the last shot and gives the opportunity to evaluate your firing discipline. Features Camera on the target Stats from last shot 3D model and hit position Mini map with position of targets Activate and deactivate selected target MP compatible (tested on dedicated and hosted with 2 players, NOT TESTED WITH JIP) Localized in German and English Picture Usage To add a target to the list add this to the object init: this setVariable ["TER_isTarget", true]; I recommend to only use objects of the type "Pop-Up Target X". Open the dialog with createDialog "TER_target"; Include the following files in your main mission folder (where the mission.sqm is): Add these two lines to your description.ext (or create it): #include "TER_TargetGUI\defines_A3.hpp" #include "TER_TargetGUI\TER_target.hpp" Put this in the initPlayerLocal.sqf (or create it): #include "TER_targetGUI\addEH.sqf" Add the content of the stringtable.xml to your own or copy it as is The TER_TargetGUI folder Download http://www.armaholic.com/page.php?id=33043 (RIP Armaholic) https://drive.google.com/drive/folders/0B8-BL9HKQ_OXWjFnUDhEUGhqejA?usp=sharing (expired) https://drive.google.com/drive/folders/0B8-BL9HKQ_OXWjFnUDhEUGhqejA?resourcekey=0-slVaBtuyLj5IjSDmkcW-2Q&amp;usp=sharing Credits Dialog & scripts: Terra Testing: Aasgeyer Good hunting! Changelog:
  9. ?? no problem on my side. what browser are you using? also thinking about moving it to github
  10. while {true} do { private _drawEHID = addMissionEventHandler ["Draw3D", { drawIcon3D ["\a3\ui_f\data\igui\cfg\simpletasks\types\move_ca.paa", [0.73, 0.24, 0.11, 1], getPos operatorOpf, 1, 1, 0]; }]; sleep 5; removeMissionEventHandler ["Draw3D", _drawEHID]; sleep 60; }; Edit: Invisible characters and empty font error
  11. Man this is one old project of mine. Anyway, I updated the GDrive link so it should be accessible again. I didn't know that those can expire and also didn't get any notifcation...
  12. you have the following situation: class RscText { // bla }; // ... class DialogName { ... class Controls { class MyText: RscText { //... }; }; }; Where RscText is your base class. This works. Now you rename class RscText to class RscText1, so MyText does not know from where to inherit. the #include preprocessor just tells arma to move the content of the file to this line. Check out this page: https://community.bistudio.com/wiki/GUI_Tutorial You'll have to find the script that adds the second action. try to search for BIS_fnc_holdActionAdd.
  13. well the error message tells you what the problem is. The base class RscText is not defined. it is located in LARs\LARs_searchLoot\LARs_lootUI.hpp. In that file is a display class called "LARs_searchLootUI" which has a subclass called "controls" which has a subclass called "SearchText" which tries to inherit from a "RscText" class which does not exist
  14. That's because a class is inheriting from the mentioned class "RscText" which you renamed to "RscText1" (presumably), so ofc arma can't find the base class (RscText).
  15. Have you checked out https://community.bistudio.com/wiki/BIS_fnc_playVideo? When do you want to play the video? at the start of each mission for each player individually or during the mission for everyone at once? or something else?
  16. Tested it and confirmed. Edited my post above.
  17. true. But question: The following setup: Hosted MP Host is player on the east side Another player west AI created on the server for side west Execute remoteExec with west targets Isn't the AI getting targeted as well, so the sound also plays for the server, aka the host on the east side? EDIT: side works fine. as BIKI and @pierremgi say, only players are considered
  18. playSound is the right option. it has local effect and is therefore only heard by the player that executed the command. To make all BLUFOR players hear it we use remoteExec: _object addAction ["Play Sound for BLUFOR", { "soundName" remoteExec ["playSound", allPlayers select {side _x == west}]; }]; The same code can be used for the trigger.
  19. 7erra

    Interactive laptop

    This can be done with an addAction and a custom UI, therefore it's not possible with Eden or Zeus only. A bit of scripting has to be done. https://community.bistudio.com/wiki/addAction https://community.bistudio.com/wiki/Arma:_GUI_Configuration
  20. 7erra

    Image over HUD Issue

    I edited my answer because I messed up on my math. Also, are you aware that Arma caches the paa? Any changes to the paa file are not reloaded. You have to rename your image everytime you change it or restart your game.
  21. CfgFunctions Generator This is a little Python script I wrote to generate a CfgFunctions.hpp file which can be included in the main config (either description.ext or config.cpp). This script assumes the following project structure: A functions folder in the mission/mod directory The python script resides in the "functions" folder Subfolders with the name of the category Function files in those category folders Function files start with "fn_" Here is an example: Folder structure mission.vr/ ├─ description.ext ├─ functions/ │ ├─ Category1/ │ │ ├─ fn_myFunction.sqf │ ├─ Category2/ │ │ ├─ fn_anotherFunction.sqf │ │ ├─ fn_aFunction.sqf │ ├─ generate.py │ ├─ CfgFunctions.hpp Output (in CfgFunctions.hpp): #ifdef DEBUG_ENABLED_FULL allowFunctionsRecompile = 1; allowFunctionsLog = 1; #endif class CfgFunctions { class MIS { class Category1 { class myFunction; }; class Category2 { class aFunction; class anotherFunction; }; }; }; A new file called "CfgFunctions.hpp" will be created in the "functions" folder. It can be added to the config by adding the following line to your description.ext/config.cpp: #include "functions\CfgFunctions.hpp" Installation Install Python Create a new file called "generate.py" in your functions directory Paste the code from below into the file Usage Change the line "tag = 'MIS'" to your tag (only needed to be done once) Open a command-line in the functions directory Execute python3 "generate.py" License MIT generate.py from pathlib import Path tag = 'MIS' folder_functions = Path(__file__).parent.resolve() file_cfg = folder_functions / 'CfgFunctions.hpp' content = [ "#ifdef DEBUG_ENABLED_FULL", "allowFunctionsRecompile = 1;", "allowFunctionsLog = 1;", "#endif", "class CfgFunctions", "{", f"\tclass {tag}", "\t{" ] # Get all categories by looking at the folders categories = [x for x in folder_functions.iterdir() if x.is_dir()] categories.sort(key=lambda x: x.name.upper()) for cat in categories: content.extend([f'\t\tclass {cat.name}', "\t\t{"]) # Get all functions from the files function_files = [f.stem.replace('fn_', '') for f in cat.iterdir() if f.is_file() and f.name.startswith('fn_')] function_files.sort(key=lambda x: x.upper()) for f in function_files: content.append(f'\t\t\tclass {f};') content.append('\t\t};') content.extend(["\t};","};"]) output = '\n'.join(content) file_cfg.write_text(output)
  22. 7erra

    Image over HUD Issue

    What size is the image? It has to be 2^x * 2^y, eg. 256x256, 1024x64 etc.
  23. 7erra

    I can't run fn_keyHandler

    Translation: Please use english (https://forums.bohemia.net/guidelines/ ), the code you posted was translated to turkish as well which makes it unreadable
  24. This should help you: https://community.bistudio.com/wiki/Multiplayer_Scripting. You have to keep in mind where your commands execute. To explain it on the first few lines of your script: if (!isServer) exitWith {}; // [...] if (missionNamespace getVariable ["liveFeedUAV1done", false]) exitWith { cam1 = "camera" camCreate [0,0,0]; This main script is only getting executed on the SERVER. the camCreate command has local effect, the camera is only available on the SERVER. fnc_selectZoom = { Your function is also only declared on the SERVER, the CLIENTs don't know about them. therefore... cam1 camSetFov 0.46599999; will not work as cam1 does not exist nor can you call the function from an addAction that was added via... [_monitor, [ _actionTitle, { private _Value = _this select 3 select 0; [_Value] call fnc_selectZoom; }, [_x],3.3,true,false,"","",8 ]] remoteExec ["addAction", 0]; from the SERVER on all CLIENTS and the SERVER (target: 0, aka everyone). tl;dr: Muliplayer scripting is harder than SP Also: missionNamespace setVariable ["cam1", cam1]; is redundant. No need for that line as cam1 = ... is equivalent to missionNamespace setVariable ["cam1", ...
  25. 7erra

    I can't run fn_keyHandler

    Did you translate the code? can you post the original (in full)? also format the code as code in the post, that would help as well (the "<>" symbol)
×