Jump to content

Schatten

Member
  • Content Count

    694
  • Joined

  • Last visited

  • Medals

Community Reputation

214 Excellent

3 Followers

About Schatten

  • Rank
    Master Sergeant

Profile Information

  • Gender
    Male
  • Location
    Minsk, Belarus

Recent Profile Visitors

1387 profile views
  1. @sil.lau@free.fr, you can also use this code: if (([obj1, obj2] findIf { (player distance _x) < 20 }) >= 0) then { ... };
  2. Yes, your code should look like this: ["notification"] remoteExecCall ["BIS_fnc_showNotification", opfor];
  3. Sure, use remoteExecCall command and pass OPFOR side as target.
  4. @Tory Xiao, try to use this code snippet, _direction = getDir _object; _object setVelocity [100 * (sin _direction), 100 * (cos _direction), 0]; AFTER setting up position. Regarding according to BIKI, There seems to be something wrong with height passed to setPos command.
  5. @Ibragim A, this code, getArray (configfile >> "CfgVehicles" >> "I_G_Mortar_01_F" >> "assembleInfo" >> "dissasembleTo"); returns ["B_Mortar_01_weapon_F", "B_Mortar_01_support_F"] This code, getText (configfile >> "CfgVehicles" >> "I_Mortar_01_weapon_F" >> "assembleInfo" >> "assembleTo"); returns "I_G_Mortar_01_F" Unfortunately, for I_Mortar_01_support_F assembleTo property is empty.
  6. @Preywinder, use this condition: this and { (time - (thisTrigger getVariable ["ActivatedAt", 0])) >= 10 * 60 } Also add this line into "On act." field: thisTrigger setVariable ["ActivatedAt", time];
  7. I found the solution. First, I move a control from my Rsc_SCH_hud display class to the root of description.ext file: class Rsc_SCH_hud_unitInfo: RscControlsGroupNoScrollbars { ... }; Next, I wrote the function (SCH_hud_fnc_drawUnitInfo) to draw the control: #include "\a3\ui_f\hpp\defineResincl.inc" #include "definitions.hpp" disableSerialization; _displays = uiNamespace getVariable ["IGUI_displays", []]; _index = _displays findIf { (ctrlIDD _x) == IDD_UNITINFO }; _display = if (_index >= 0) then { _displays select _index } else { displayNull }; if (isNull _display) exitWith { }; _control = _display displayCtrl UNIT_INFO_IDC; if (isNull _control) then { _control = _display ctrlCreate ["Rsc_SCH_hud_unitInfo", UNIT_INFO_IDC]; }; ... Because I need to display custom unit info, I find display with IDD IDD_UNITINFO. Finally, I use this code to launch the function: addMissionEventHandler ["Draw3D", { call SCH_hud_fnc_drawUnitInfo; }]; I use Draw3D instead of EachFrame, because the first MEH stops when the game looses focus, so seems it's more effective (it's my guess, I didn't check).
  8. Yea, as I wrote in the first message, it's plan B. Anyway, thanks! Nope. I use Draw3D to display something in 3D space (for example, unit names above their heads using drawIcon3D) and EachFrame to display something in 2D space (HUD elements in my case).
  9. @pierremgi, here are some source code: class Rsc_SCH_hud { duration = 1; fadeIn = 0; fadeOut = 0; idd = -1; onLoad = "call SCH_hud_eh_onRscLoad;"; class ControlsBackground { ... }; }; SCH_hud_eh_onRscLoad = compileFinal (preprocessFileLineNumbers (PATH + "\onRscLoad.sqf")); SCH_hud_var_layer = ["SCH_hud"] call BIS_fnc_rscLayer; addMissionEventHandler ["EachFrame", { SCH_hud_var_layer cutRsc ["Rsc_SCH_hud", "PLAIN", 1, false]; }]; I didn't find in Arma source code any global variable, that used to determine if pause menu is open. Seems, that pause menu layer hides other displays. I tried to use cutRsc without layer, but no luck.
  10. Hi! I have custom HUD, whose resource is placed in RscTitles class in description.ext. The problem is that the HUD is continues displaying when, for example, pause menu is open, but unit info, stance indicator, GPS, etc. isn't. Is there a way to implement the same logic? The easiest way I think is to add checking for existence of pause menu display. But it's not elegant way, because my HUD is displaying when Splendid Camera is launched too, so I also need to check for existence of the Camera display too.
  11. @Liberty Bull, you made a typo in parseText command.
  12. Schatten

    Muzzles Names

    @fin_soldier, weapon muzzles can be found here: configFile >> "CfgWeapons" >> _weaponClassName >> "muzzles"
  13. Schatten

    Name Tags JIP issues

    It contains if !(hasInterface) exitWith {}; at the beginning, so it will work only on client PCs. I would recommend to rewrite the script that it will be client only.
  14. @dernikkl1, try this: { _x action ["GetOut", _vehicle]; } forEach ((crew _vehicle) - [player]);
  15. @Dj Rolnik, trigger statements are local, i.e. they are executed by each client. At the same time you use remoteExec. It means that if the trigger condition is true, the code placed in "On activation" field is executed by each client. This leads to duplicating actions. To solve the problem either make your trigger server only, or don't use remoteExec.
×