Jump to content

7erra

Member
  • Content Count

    753
  • Joined

  • Last visited

  • Medals

Everything posted by 7erra

  1. You want to disable the damage of the computer but still be able to damage it? What?
  2. 7erra

    respawn group AI help please.

    _mrkPos1 = getMarkerPos "spawn1Inf"; _mrkPos2 = getMarkerPos "spawn2Inf"; if ( allPlayers findIf { _mrkPos1 distance _x < 50 OR _mrkPos2 distance _x < 50 } != -1 ) then { // Whatever }; This condition will execute the "then" statement when at least one player is closer than 50m to either one of the markers.
  3. 7erra

    respawn group AI help please.

    Is that script a loop? I can't really see why it should continuously spawn units.
  4. That's a hard one. I have been trying several things to get a linebreak in a listbox but nothing worked so far. These are the commands I tried: _list lbAdd format ["line1%1line2", linebreak]; // endl, toString[10], "<br/>", "\n" I then took a look at how arma does it. Turns out that the "linebreak" you can see in the picture above is only happening if the entry has a too long text. The thing is that I couldn't even reproduce that effect. Even after copying the relevant configs it wasn't so I guess it is engine related (aka Arma magic).
  5. 🤔 disableUserInput true; 💇‍♂️ (Please don't actually use it)
  6. Add a keydown UIEH to your dialog: _display displayAddEventhandler["KeyDown",{ params ["_display","_key"]; if (_key == 1) exitWith {true};// ESC pressed while dialog is open, overwrite default behaviour false }]; Keep in mind that this will make your dialog not closeable unless you have other means to close it, like a button, at hand.
  7. Apparently you can use a STRUCTURED_TEXT control as background and assign the EH to this control though
  8. STATIC: No BUTTON: Yes SLIDER: Yes (Enter delayed, Exit only when focused) COMBO: No LISTBOX: No TOOLBOX: Yes CHECKBOXES: Yes PROGRESS: No HTML: No ACTIVETEXT: Yes (on the letters) TREE: Yes STRUCTURED_TEXT: Yes CONTROLS_GROUP: No SHORTCUTBUTTON: Yes XLISTBOX: Yes XSLIDER: Yes/No (delayed, exit only when dragging) MAP_MAIN: No Just tested the EHs on some control types and these are the results. Seems kind of random to me. In the cases of the SLIDER and XSLIDER the EH were really wonky.
  9. 7erra

    BIS_fnc_spawnVehicle is not working

    root has to be local: _root
  10. 7erra

    [Help] HoldAction to Classname

    Hmm problem with that is a bit worse performance: With the action added to the player it is evaluated the entire time. Not possible: Still wondering why the previous codes didnt work though.
  11. Not possible with scripts but with editing the config. Maybe move the thread here: https://forums.bohemia.net/forums/forum/162-arma-3-addons-configs-scripting/ Also: secondary and launcher slot are the same thing. Rifle = primary, launcher = secondary, pistol = handgun. As far as I know there is a config entry "allowedSlots" which describes where you can put the item but that's not my field of expertise.
  12. 7erra

    [Help] HoldAction to Classname

    That code is not gonna work bc you are missing several brackets. ["CUP_t_malus1s", "init", { params ["_entity"]; _entity addAction ["Pick Apple", { params ["_target","_caller","_id"]; hint "Picking apple..."; _caller playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; _caller addItem "gen_apple"; hint "Gathered One Apple"; }]; } ] call CBA_fnc_addClassEventHandler;
  13. 7erra

    [Help] HoldAction to Classname

    //Pick Apples ["CUP_t_malus1s", "init", { params ["_entity"]; [ _entity, // Object the action is attached to "Pick Apples", // Title of the action "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Idle icon shown on screen "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Progress icon shown on screen "_this distance _target < 3", // Condition for the action to be shown "_caller distance _target < 3", // Condition for the action to progress {}, // Code executed when action starts {}, // Code executed on every progress tick { params ["_target", "_caller", "_actionId", "_arguments"]; _caller playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; _caller addItem "gen_apple"; hint "Gathered One Apple"; }, // Code executed on completion {}, // Code executed on interrupted [], // Arguments passed to the scripts as _this select 3 2, // Action duration [s] 0, // Priority false, // Remove on completion false // Show in unconscious state ] call BIS_fnc_holdActionAdd; } ] call CBA_fnc_addClassEventHandler; The _caller variable in the completed code has to be defined first.
  14. 7erra

    [Help] HoldAction to Classname

    this variable is not available in the eh code: //Pick Apples ["CUP_t_malus1s", "init", { params ["_entity"]; [ _entity, // Object the action is attached to "Pick Apples", // Title of the action "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Idle icon shown on screen "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", // Progress icon shown on screen "_this distance _target < 3", // Condition for the action to be shown "_caller distance _target < 3", // Condition for the action to progress {}, // Code executed when action starts {}, // Code executed on every progress tick { _caller playMoveNow "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon"; _caller addItem "gen_apple"; hint "Gathered One Apple"; }, // Code executed on completion {}, // Code executed on interrupted [], // Arguments passed to the scripts as _this select 3 2, // Action duration [s] 0, // Priority false, // Remove on completion false // Show in unconscious state ] call BIS_fnc_holdActionAdd; } ] call CBA_fnc_addClassEventHandler;
  15. 7erra

    [Help] HoldAction to Classname

    Are you trying to add it to a terrain object? Because then it wont work as terrain objects are not the same as "normal" objects.
  16. 7erra

    [Help] HoldAction to Classname

    CBA adds this functionality: https://github.com/CBATeam/CBA_A3/wiki/Adding-Event-Handlers-to-Classes-of-Objects
  17. Mabye using Dammaged EH or HitPart EH would help. Both have the projectile as a param. Checking the damage against the death threshold (1) should have the same result as a killed EH.
  18. Hmm I might have seen that before... 😄 Just a suggestion: you can update the search results while the user is typing. Here is the script I use: https://github.com/7erra/-Terra-s-Editing-Extensions/blob/master/TER_editing/gui/scripts/RscNamespaceVars.sqf Just a simple spawned KeyDown UIEH with a check if the text of the editbox changed. This works for listboxes with not that many entries. If there are quite a few and the engine takes too long for each lnbAdd then it might happen that the user can type faster than the listbox updates and results from the previous search get carried over if that makes sense.
  19. Place a trigger and then there are some enviromental sounds under Trigger: Effects. Mabe you find one of the sounds fitting.
  20. Hi and welcome to ArmA3 scripting 🙂 On getting started: The pinned topics in this forum should give a good introduction. Having programming experience will ofc make it easier. The 3den Editor is a very good tool for making missions. You can basically create an entire mission with either no scripting at all or at least only a few lines. As soon as you have to work with a config which is not achieveable with the description.ext (mission config). Let's assume you want to make a new GUI. No problem for the description.ext so no mod needed. But now you dont like the vanilla a3 buildings and want to change the appearance/model. Now you'd have to make a world config (config.cpp) as it is done in mods. Some config related features can be changed via scripts but that is more of an exception. The game type can be defined in the editor. Under Attributes >> Multiplayer >> Type you can choose from a list of supported game types. KOTH is a bit of a special case because it won the Make Arma Not War contest for best multiplayer mission. From the launcher it does. The ingame browser is old and honestly really bad. On some occasions it might happen that the hosting community uses a very specific modset which is not available on the steam workshop though. At some point the mission file will become really big. Models and textures would take up quite a lot of network traffic. Either the server would start lagging for everyone else or it would take hours to download the mission file. Also, the mission file will change from time to time requiering each client to redownload the mission including the modded parts. Seperating configs and missions is a good way to stay flexible. Hope that helps 😉
  21. Huh seems like it. I tried the following code but no log entry appeared for the HandleDisconnect EH while the EntityRespawned EH logged the args as expected: if (isServer) then { addMissionEventHandler ["HandleDisconnect", { diag_log "Diconnect"; diag_log _this; diag_log "Discconnect End"; params ["_unit", "_id", "_uid", "_name"]; ["save", [nil, _unit]] call TER_fnc_handleLoadout; }]; addMissionEventHandler ["EntityRespawned", { diag_log "Repawn:"; diag_log _this; diag_log "Repawn End"; params ["_entity", ["_corpse", objNull]]; ["load", [nil, _entity]] call TER_fnc_handleLoadout; }]; };
  22. This is my mod's cfgFunctions (at least part of it): class CfgFunctions { class TER { class 3den { file="\TER_Editing\fnc"; class exportCfg { }; class findHouseType { }; class showBuildingPos { }; class exportMarker { }; class clearInventory { }; }; }; }; Where TER_Editing is the pbo folder.
  23. if (isServer) then { addMissionEventHandler ["HandleDisconnect", { params ["_unit", "_id", "_uid", "_name"]; ["save", [nil, _unit]] call TER_fnc_handleLoadout; }]; addMissionEventHandler ["EntityRespawned", { params ["_entity", ["_corpse", objNull]]; if (isNull _corpse) then { ["load", [nil, _entity]] call TER_fnc_handleLoadout; }; }]; }; Can be pasted into the module where TER_fnc_handleLoadout is declared. I am not sure about the EntityRespawned EH because the PlayerConnected EH fires before the player controls a unit and this is the closest EH I could find to have the unit as a param. I am also not sure if the EH fires at the beggining of the mission or when a player joins.
  24. Here is a script I wrote for another topic that does this exact thing: Just adjust the variables and you should be good to go.
×