-
Content Count
753 -
Joined
-
Last visited
-
Medals
Everything posted by 7erra
-
Creating Table Dialog
7erra replied to NumbNutsJunior's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I don't have any experience with the ControlsTable either and it seems to be a rather unused asset as the CT_CONTROLS_TABLE isn't even included in the export function BIS_fnc_exportGUIBaseClasses with the "all" parameter. I have looked through the config for the server browser and BIS doesn't use it either. Instead they are going for a RscListBox: I will try to replicate something like this but if someone is faster then here you go :) -
Change flag by script when captured area
7erra replied to Spoor's topic in ARMA 3 - MISSION EDITING & SCRIPTING
How about an actually capturable flagpole? /* Author: 7erra Description: Makes a flag pole capturable Parameter(s): 0: OBJECT - Flag (optional) 1: CODE - Code executed after the cap Returns: NUMBER - Action ID of the Hold Action Example: [this] call TAG_fncName; [this,{hint "Capped";}] call TAG_fncName; */ #define FLAG_PATH(TEXTURE) (format ["\a3\data_f\flags\%1.paa",TEXTURE]) #define NATO_FLAG FLAG_PATH("flag_nato_co") #define CSAT_FLAG FLAG_PATH("flag_csat_co") #define AAF_FLAG FLAG_PATH("flag_aaf_co") #define EMPTY_FLAG FLAG_PATH("flag_white_co") #define HOLDACTION_PARAMS ["_flag", "_caller", "_actionId", "_arguments"] #define FLAG_ARRAY [NATO_FLAG,CSAT_FLAG,AAF_FLAG,EMPTY_FLAG] #define SIDE_ARRAY [west,east,independent,civilian] #define OWN_FLAG(ARG_SIDE) (FLAG_ARRAY select (SIDE_ARRAY find ARG_SIDE)) params ["_flag",["_afterCommand",{}]]; _flag setflagAnimationPhase 1; _flag setFlagTexture EMPTY_FLAG; _flag setVariable ["TER_flagSide",civilian]; _icon = "\a3\ui_f\data\igui\cfg\holdactions\holdaction_takeoff2_ca.paa"; _duration = 10; _addID = [_flag, "Capture Flag", _icon, _icon, "_target getVariable [""TER_flagSide"",civilian] != side _this",//condition show "true", {//code start }, {// code progress -> set flag height params (HOLDACTION_PARAMS+["_progress", "_maxProgress"]); _relProgress = _progress/_maxProgress; if (_relProgress < 0.5) then { _flag setFlagAnimationPhase (1-(2*_relProgress)); } else { if (_relProgress == 0.5) then {_flag setFlagTexture OWN_FLAG(side _caller)}; _flag setFlagAnimationPhase ((2*_relProgress)-1); }; }, {// codeCompleted params HOLDACTION_PARAMS; _flag setVariable ["TER_flagSide",side _caller]; [] call (_arguments select 0); }, {//codeInterrupted //revert params HOLDACTION_PARAMS; _flag setFlagAnimationPhase 1; _side = _flag getVariable ["TER_flagSide",civilian]; _flag setFlagTexture OWN_FLAG(_side); }, [_afterCommand], _duration, 1.5, false] call BIS_fnc_holdActionAdd; _addID ---EDIT--- Function for the init line further down below -
allPlayers will work in SP too but only list all active players (connected). playableUnits returns all units that might be controlled by a player and includes ai units, doesn't work in SP. The first syntax is not very reliable. Try to always use the alt syntax where you define the control beforehand. ^agreed. Though this will require some better understanding of the descritption.ext. There are enough tutorials out there to take a look at (KK's tutorial, perspective of another newbie, Iceman's tutorial*) . If you need further help you can also ask me. *this is where I started off from Here is my (working) code: description.ext class TER_RscTestDialog { idd = 73000;// only important for this number }; script.sqf: createDialog "TER_RscTestDialog"; _display = findDisplay 73000;// unique idd _playerList = _display ctrlCreate ["RscListbox",1500]; _playerList ctrlSetPosition [-0.3,0.02,0.48793,0.744756]; // viable only for your screen. Try to use safeZone, GUI_GRID and/or pixelGrid variables instead _playerList ctrlCommit 0;// no need for the short delay as the controls will start wherever their base defines are set { _playerList lbAdd name _x;// no need to set the data. can also be returned with lbText (see below) } forEach allPlayers; _button = _display ctrlCreate ["RscButtonMenu",-1]; _button ctrlSetPosition [0.625,0.2,0.423497,0.276817]; // see above _button ctrlCommit 0; _button ctrlSetText "Name of player"; _button ctrlAddEventHandler ["ButtonClick",{ // eh is better since setButtonAction uses .sqs and not .sqf syntax params ["_button"]; _playerList = (findDisplay 73000) displayCtrl 1500; _curName = _playerList lbText (lbCurSel _playerList); // better syntax, other one is not reliable hint _curName; }]; PS: and some advice as you are new to the whole ui editing: it can get really frustrating but the possibilities are incredible and there is no better feeling than getting it to work
- 11 replies
-
- 1
-
- rsclistbox
- listbox
-
(and 1 more)
Tagged with:
-
EDEN - Disable [ENTER] to start mission
7erra replied to PingWing's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The code for the activation via enter button is baked into the config: // cfg3den, line 3555 class MissionPreviewSP { text="$STR_3DEN_Display3DEN_MenuBar_MissionPreviewSP_text"; data="MissionPreview"; shortcuts[]={28,156}; //28 = ENTER ; 156 = NUMPAD ENTER }; And: class ctrlShortcutButton: ctrlDefaultButton { ... shortcuts[]= { "0x00050000 + 0", 28, 57, 156 }; ... }; class ButtonPlay: ctrlShortcutButton { ... }; Which means that you'd have to modify the config itself with a mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1420348567 -
How to disable manual saves but keep triggered saves?
7erra replied to lv1234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Because this is exactly what he doesn't want as far as I understood? The first parameter ist manual saving (escape menu save) while the second one is creating an autosave when the command is issued. -
How to disable manual saves but keep triggered saves?
7erra replied to lv1234's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Depending on how you trigger the triggered saves you could do this: //mission start: enableSaving [ false, false ]; //trigger (or whenever you want to save) enableSaving true; enableSaving [false,true]; -
The problem with this script is that it uses a small position change many times a second: while {(_aktw > 0) && !(_target getVariable "_down")} do { _aktw = _aktw - _dw; _target setPos (_frstRail modelToWorld [(_aktW - 0.15),0,-0.10]); sleep 0.01; }; This will lead to undesired behaviour when playing on a server as the targets will be teleporting over the rail for everyone else who hasn't executed the script (is not local). The script is not MP compatible, as Steffi states: Translated:
- 1 reply
-
- 1
-
[SOLVED] __EVAL/__EXEC problem
7erra replied to 7erra's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
So this is what it feels like to be the DAU Wouldn't this also apply to the safeZone values then? Done that. The tooltip works and has a line break. Will do that via PN. If I get any results and solve the problems I'll get back to this thread. -
[SOLVED] __EVAL/__EXEC problem
7erra replied to 7erra's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Thank you very much. I'm now getting used to them. Well I already got two: When using your tools the config won't compile with the following error: config.cpp In File P:\<path>\file.hpp: Line 337 bad eval/exec Rap or Derap error This is the line: tooltip = __EVAL( format ["Line 1%1 Line 2%1Line 3%1Line 4:""String in string""%1Line 5",toString [10]] ); //WORKS: tooltip = "Text"; And another error: Each time I try to start Eliteness.exe English (probably not correctly translated): The procedure entry point "??0CStringU@@QEAA@PEBD@Z" could not be found in the DLL "C:\Program Files (x86)\Mikero\DePboTools\bin\Eliteness.exe" Original (German): ------------------------------------------ Yeah I defined them elsewhere but didn't want to put the whole code in here for the sake of readability. Here they are: The GUI_GRID is the default grid which BIS uses for dialogs themselves. pixelH is a variable which is used by the engine just like safeZoneH and has been introduced with the 3den Editor I think (at least it uses those variables). I'm sorry but I'm kind of noobish when it comes to technical terms. What is game time? And what are those values? ------------------------------------------ I've got all my knowledge from the BIS site and the BISim site. Haven't found your documentation yet though. Thanks . I always wondered why a3's configs were looking so strange with all this free space in gui configs. Thank you for the time and sorry for the wall of text, 7erra -
v1.3 - "Debug console: Page 2" update Just pushed an update to live. Check out the changes at the Steam Workshop page. Video will be added at some point and pictures will follow as well. Still struggling with finding a working version of mikero's PBO Tools so I can get away from Addon Maker though. Hope you like it, 7erra EDIT Video and pictures are up-to-date
-
[SOLVED] __EVAL/__EXEC problem
7erra replied to 7erra's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Currently I'm using Addon Builder. I'd rather use pboproject but wasn't able to get my hands on a working version. Guess so. But the order of the classes shouldn't be changed as this would lead to potentially undefined base classes if you were suggesting this. Not sure about macros though. -
Add the right suppressor to rifle
7erra replied to Undeceived's topic in ARMA 3 - MISSION EDITING & SCRIPTING
_cfgArray = getArray (configfile >> "CfgWeapons" >> _yourWeapon >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems"); _supressor = [nil, selectRandom _cfgArray] select (count _cfgArray > 0); _unit addPrimaryWeaponItem _supressor; -
Hey everyone, I am trying to get a RscCombo inside of a controls group (RscControlsGroupNoScrollbars) but it seems that you can't change the current selection by clicking on it. Instead you have to use the command lbSetCurSel. Does anyone know more about that? Here's the example code (escape menu has to be open): _grp = (findDisplay 49) ctrlCreate ["RscControlsGroup",-1]; _grp ctrlSetPosition [0,0,1,1]; _grp ctrlCommit 0; _ctrl = (findDisplay 49) ctrlCreate ["RscCombo",-1,_grp]; _ctrl ctrlSetPosition [0,0,1,0.028*safeZoneH]; _ctrl ctrlCommit 0; {_ctrl lbAdd str _x} forEach [1,2,3,4,5]; Thanks, 7erra
-
Alright I found the problem (Problem 4: In front of the PC). The player character was set captive (though I still don't know how). Obviously the player was therefore side civillian, but the group was the desired side. Sorry for the inconvenience.
- 1251 replies
-
Haha same The workaround with finding the position of the RscCombo won't work either since you expand it and then it exceeds the control area. Anyway I'm going to remove the EH though I'm afraid that I'm going to damage something in an other mod or in the vanilla game... Wow I looked at the rscdebugconsole.sqf so many times and always wondered where the debug console was... Thanks again @Larrow!
-
Thanks @Larrow. Giving up on the abillity to select the debug console's command line by clicking anywhere on the screen is quite a draw back. I'll try to find a workaround with something like checking if the area you clicked on belongs to the RscCombo. Where did you find ? Seems to be an onLoad event...
-
getVariable for first time connecting players [Solved]
7erra replied to 56Curious's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Oh no need to credit me ;) I am happy to help ^^ -
Pretty sure not. I've tried without mods, with cba, and with your mod. I'm gonna doublecheck too.
- 1251 replies
-
@R3vo It seems that your mod is disabling the join command (on purpose or on accident?) for the unit that is controlled by the player. When previewing the mission I tried to execute [player] joinSilent (createGroup east) while playing as a west soldier to make me switch sides. It was no problem when I played as another unit in the editor, it only appears with the one which has the player attribute checked. It's not gamebreaking but maybe you wanted to know. Edit: --- SOLVED: ---
- 1251 replies
-
- 1
-
Flat position without trees/bushes/etc - Tanoa
7erra replied to HazJ's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Have you tried BIS_fnc_findSafePos? I don't know if terrain objects are also included in the objDist param. -
getVariable for first time connecting players [Solved]
7erra replied to 56Curious's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Even though it works, this kind of scripting is not good practice. The variable name is way too general and might get overwritten by another mission or mod. Simply solve this by butting a tag before your global and persistent variables, eg TAG_returningPlayer. Also I, personally, am not a big fan of the profileNamespace variables as it crowds the user's namespace (try count allVariables profileNamespace and see what I mean...). IMHO the better solution would work something like this: // initPlayerServer.sqf params["_player","_didJIP"]; _playerServerHistory = profileNamespace getVariable ["TAG_playerServerHistory",[]]; //get variable from the server/hosting client _playerUID = getPlayerUID _player;// get the unique player ID if (_playerUID in _playerServerHistory) then { //is player in the UID array? // already joined the server at least once 0 = execVM "someFileForReturningPlayers"; } else { 0 = execVM "someFileForNewPlayers"; _playerServerHistory pushBackUnique _playerUID;// add the uid to the local array profileNamespace setVariable ["TAG_playerServerHistory",_playerServerHistory];// update the persistent array }; The main advantage is that you won't have to rely on the client to keep his profileNamespace (in case he wipes it with eg ({profileNamespace setVariable [_x,nil];} forEach (allVariables profileNamespace);). With this script you are also able to wipe the server history if needed so everyone gets to see the intro again. The only place where the varaible is stored is the server's/host's profileNamespace. Be aware that the script is running locally to the server/host so any client sided commands will have to be remoteExec'ed. On the other hand the array will not be transferred to other hosts or servers so if your mission is running on multiple servers then the intro will be played each time you join a new server. -
Hello everyone! I noticed that the GUI_GRID variable used by the GUI Editor was broken and it bothered me for months now. With more experience in sqf language and some basic modding knowledge I was able to adjust the settings of the GUI Editor (though BIS didn't make it easy for me...). What does this mod do? This mod makes the GUI_GRID variable, which is selected by default in the GUI Editor, usable again. What is the GUI_GRID variable? - GUI Coordinates BIKI page It is usually defined in the description.ext/config.cpp/dialog.hpp/defines.hpp: // Default grid #define GUI_GRID_WAbs ((safezoneW / safezoneH) min 1.2) #define GUI_GRID_HAbs (GUI_GRID_WAbs / 1.2) #define GUI_GRID_W (GUI_GRID_WAbs / 40) #define GUI_GRID_H (GUI_GRID_HAbs / 25) #define GUI_GRID_X (safezoneX) #define GUI_GRID_Y (safezoneY + safezoneH - GUI_GRID_HAbs) Where can I get it? From the Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=1392852622 Source files: https://github.com/7erra/GUI_GRID-Fix How do I use it? Simply open up the GUI Editor in the escape menu. The default grid will already be adjusted. Is it biodegradable? What? Where can I report bugs? Right here as a reply on GitHub: https://github.com/7erra/GUI_GRID-Fix/issues on Steam as a discussion: https://steamcommunity.com/sharedfiles/filedetails/discussions/1392852622 Please be sure to check GitHub whether your issue is already known. I hope I could help anyone who wanted to use the GUI_GRID, 7erra
-
[SOLVED] [Addon Builder] .jpg in binarized .pbo
7erra replied to 7erra's topic in ARMA 3 - BI TOOLS - GENERAL
It seems to be possible because a3 did it too. The editorpreviews_f.pbo contains a folder with .jpg files. -
Multi line RscEdit and line break
7erra replied to zapat's topic in ARMA 3 - MISSION EDITING & SCRIPTING
So if anyone stumbles upon this here is a solution: class RscEdit // default RscEdit { ... }; class RscEditMulti: RscEdit { style = ST_MULTI; }; Linebreaks are accomplished with toString [10] Also there is a default A3 class called RscEditMulti -
this && ({_x == "HandGrenade"} count magazines player) == 0 magazines count Put this in the condition. The trigger should activate when the player has no handgrenades left. But be aware that the RGN grenade has a different classname. If you want to count for both then use: this && {_x in ["MiniGrenade","HandGrenade"]} count magazines player == 0