Jump to content

MechSlayer

Member
  • Content Count

    64
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About MechSlayer

  • Rank
    Corporal

Profile Information

  • Gender
    Male
  • Location
    Spain

Recent Profile Visitors

143 profile views
  1. MechSlayer

    VIdeo Player

    I was searching something like that for 1 hour and didn't found anything xD so I tried another way.
  2. I need to get the part of a unit that has been damaged, i've already tried with "_selection" from the Damage eventhandler but it always says "body", any Idea?
  3. { if (_x side == east) then {_x addEventHandler ["HandleDamage", { params ["_unit", "_selection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; _damage = _damage/2 //Receive two times less damage use * if you want it to receive more damage _damage; }];}; } forEach allPlayers;
  4. { if (_x side == east) then {_x addEventHandler ["HandleDamage", {1}];}; } forEach allPlayers; For players only and for AI and Players { if (_x side == east) then {_x addEventHandler ["HandleDamage", {1}];}; } forEach allUnits;
  5. I was playing around with the setObjectTexture and ctrlSetText functions, and after some time I made this, a kind of video player (actually it isn't a video just around 3000 frames running very fast). It works pretty well, only if you are stuck on 60FPS. The screen gets pretty bugged if you have a change of 3-4 fps but it doesn't apply for dialogs. Here's the mission if you want to test it. If the video and audio aren't synced just play with the sleep inside the functions. I converted the video to frames using VLC.
  6. Okey fixed by using [] spawn instead of call
  7. Now it won't continue after the "call GSO_fnc_necesidades; GSO_fnc_InitCliente = { cutText ["","BLACK OUT"]; waituntil {!(IsNull (findDisplay 46))}; cutText [format ["Recuperando datos de %1", name player],"BLACK OUT"]; [player] remoteExecCall ["Servidor_fnc_crearJugador", 2]; sleep 6; [] spawn GSO_fnc_configuraciones; [] spawn GSO_fnc_necesidades; 1 cutRsc ["HUD","PLAIN",-1,false]; call GSO_fnc_hud; (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == 219) then {[] spawn GSO_fnc_abrirMenu;};"]; cutText ["", "PLAIN"]; ["Datos cargados", "info", 5] spawn GSO_fnc_notificaciones; };
  8. Thanks, gonna try it
  9. Hmm strange, I made it work like this before. I need to run them separate because one must go slower than the other
  10. I have this code GSO_fnc_necesidades = { while {true} do { _sed = player getVariable "sed"; _sed = _sed - 1; player setVariable ["sed", _sed, true]; Sed = _sed; sleep 5; }; while {true} do { _hambre = player getVariable "hambre"; _hambre = _hambre - 1; player setVariable ["hambre", _hambre, true]; Hambre = _hambre; sleep 10; }; }; And I call it with [] spawn GSO_fnc_necesidades; The problem is that it runs only the first while loop, any fix?
  11. I've got a problem, when I set a picture that's inside a RscTitles and I try to change the file (photo.paa) to another, it keeps showing the first one. It only changes if I change the name of the file. .hpp class RscTitles { class RscProgress { type = 8; style = 1; colorFrame[] = {0,0,0,1}; colorBar[] = {1,1,1,1}; texture = "#(argb,8,8,3)color(1,1,1,1)"; w = 1; h = 0.03; }; class HUD { idd = 5000; movingEnable = 0; enableSimulation = 1; enableDisplay = 1; duration = 9999999999999; fadein = 0.1; fadeout = 2; name = "HUD"; onLoad = "player setVariable ['stats', _this, true];"; class controlsBackground { class Progress: RscProgress { idc = 1100; colorBar[] = {0.91,0.024,0.024,1}; x = 0.874062 * safezoneW + safezoneX; y = 0.71 * safezoneH + safezoneY; w = 0.02625 * safezoneW; h = 0.042 * safezoneH; }; }; class controls { class RscPicture_1200: RscPicture { idc = 1200; x = 0.834688 * safezoneW + safezoneX; y = 0.626 * safezoneH + safezoneY; w = 0.13125 * safezoneW; h = 0.42 * safezoneH; }; }; }; }; .sqf 1 cutRsc ["HUD","PLAIN",-1,false]; _display = (player getVariable "stats" select 0); _texto = _display displayCtrl 1100; _foto = _display displayCtrl 1200; _foto ctrlsetText "Fotos\persona.paa"; while {true} do { _dano = damage player; _vida = 1 - _dano; _texto progressSetPosition _vida; sleep 0.5; };
  12. Thanks. If you find any failure or have any idea for improvements tell me
  13. Just a script where you can create interactions without touching the code. It supports Images and text (No background color). It opens with the Left Windows Key. You can add new interactions by editing "Interacciones\initInteracciones.sqf". Inside it's the syntaxis. When you'r writing the Condition or the script to execute you must use ' ' instead of " ". Here's the mission Some screenshots
  14. MechSlayer

    Set button image

    Haha no problem, thanks.
  15. MechSlayer

    Set button image

    I mean removing the blackness when you move the mouse over the button
×