Jump to content

He-Man

Developer
  • Posts

    808
  • Joined

  • Last visited

  • Days Won

    63

Posts posted by He-Man

  1. What you can try is add an Eventhandler on each part.

    The best is to add it in the script, where the parts are loaded.

    I have not tested it and have not a lot of experiences with this Eventhandler, but you can try it.

    _basepart addeventhandler ["HandleDamage",{
    	params ["_unit","_section","_damage"];
    	_damage = _damage min 0.1;
    	_damage
    }];

    This SHOULD give the Part a max damage of 10% per hit. Also if the damage would normally be higher. But as I said, I have not tested it and I am not sure, if it is working.

    For more Informations: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage

     

    Edit:

    Eventhandler "Hit" could also be interesting for this.

    Eventually someone has more experiences with this EH's and can help here?!

  2. Correct.
    these Variables will be included in 1.1, so I have only made a link to it in my repo (in readme)

     

    Autmatic Door Opener
    
    Install:
    
    copy the files from epoch.mission into your mission file (if init.sqf already exist, paste the code into this file)
    Add the following lines from CfgActionMenu_self.hpp into this file: "epoch.mission\epoch_config\Configs\CfgActionMenu\CfgActionMenu_self.hpp"
    Configure the settings in "epoch.mission\addons\Ignatz_Client_DoorOpener.sqf"
    
    Only for EPOCH 1.0:
    Add this: https://github.com/EpochModTeam/Epoch/commit/2fe4b0ff969ea468cd5600fb86becee215eca5a0  <-------------------------------------------

     

  3. Hey, I have played a bit with this function and have a sample for you.

    This Script will check, if you are in your Plotpole-Range and will open / close the nearest handleable visible Door from your Position.

    Eventually you have to add some Door classes and add a distance check (if wanted).

    To Close the nearest opened Door, just change "_open = true" to "_open = false".

    _open = true;
    _config = 'CfgEpochClient' call EPOCH_returnConfig;
    _buildingJammerRange = getNumber(_config >> "buildingJammerRange");
    _nearjammers = nearestobjects [player,["Plotpole_EPOCH"],_buildingJammerRange];
    if (_nearjammers isEqualTo []) exitwith {
    	["You are not in your PlotPole-Range",5] call Epoch_Message;
    };
    _nearestJammer = _nearjammers select 0;
    if !((_nearestJammer getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) exitwith {
    	["You are not in your PlotPole-Range",5] call Epoch_Message;
    };
    _OpenableItems = ["CinderWallGarage_EPOCH","WoodLargeWallDoorL_EPOCH","WoodLargeWallDoor_EPOCH","Land_BarGate_F","CinderWallDoorwHatch_EPOCH"];
    _NearestDoors = [];
    _fnc_CheckDoorsToOpen = {
    	_NearestDoors = (nearestobjects [_nearestJammer,_OpenableItems,_buildingJammerRange]) select {
    		([_x, "VIEW"] checkVisibility [eyePos player, [(getposasl _x select 0),(getposasl _x select 1),(getposasl _x select 2) + 1.5]]) > 0.5 && (
    		_x animationPhase "open_left" < 0.5 &&
    		_x animationPhase "open_right" < 0.5 &&
    		_x animationPhase "Door_1_rot" < 0.5 &&
    		_x animationPhase "Open_Door" < 0.5
    		)
    	};
    	_NearestDoors
    };
    _fnc_CheckDoorsToClose = {
    	_NearestDoors = (nearestobjects [_nearestJammer,_OpenableItems,_buildingJammerRange]) select {
    		([_x, "VIEW"] checkVisibility [eyePos player, [(getposasl _x select 0),(getposasl _x select 1),(getposasl _x select 2) + 1.5]]) > 0.5 && (
    		_x animationPhase "open_left" > 0.5 ||
    		_x animationPhase "open_right" > 0.5 ||
    		_x animationPhase "Door_1_rot" > 0.5 ||
    		_x animationPhase "Open_Door" > 0.5
    		)
    	};
    	_NearestDoors
    };
    if (_open) then {
    	_NearestDoors = call _fnc_CheckDoorsToOpen;
    }
    else {
    	_NearestDoors = call _fnc_CheckDoorsToClose;
    };
    if (_NearestDoors isequalto []) exitwith {
    	[format ["No Door to %1 found",if (_open) then {"open"} else {"close"}],5] call Epoch_Message;
    };
    _DoorToHandle = _NearestDoors select 0; 
    _value = (if (_open) then {1} else {0});
    _DoorToHandle animate ['open_left', _value];
    _DoorToHandle animate ['open_right', _value];
    _DoorToHandle animate ['Door_1_rot', _value];
    _DoorToHandle animate ['Open_Door', _value];

     

  4. Try this:

    _config = 'CfgEpochClient' call EPOCH_returnConfig;
    _buildingJammerRange = getNumber(_config >> "buildingJammerRange");
    _nearjammers = nearestobjects [player,["Plotpole_EPOCH"],_buildingJammerRange];
    if (_nearjammers isEqualTo []) exitwith {
    	["You are not in your PlotPole-Range",5] call Epoch_Message;
    };
    _nearestJammer = _nearjammers select 0;
    if !((_nearestJammer getVariable["BUILD_OWNER", "-1"]) in[getPlayerUID player, Epoch_my_GroupUID]) exitwith {
    	["You are not in your PlotPole-Range",5] call Epoch_Message;
    };

     

  5. Weird...

    You have changed this?
     

    BRPVP_processZombieHit = compileFinal '
    	params ["_uTarget","_damage"];
    	_hits = getAllHitPointsDamage _uTarget select 2;
    	_uTarget setdamage ((damage _uTarget) + _damage);
    	{_uTarget setHitIndex [_forEachIndex,_x + _damage,true];} forEach _hits;
    ';

    THis should not change anything in the behavior. Or are there any errors in rpt?

  6. On 27.2.2018 at 11:13 AM, Kenobi said:

    Hello Donnovan,
    noticed, that admin menu owners in epochAH.hpp can't see zombie map icons. How to fix it?
    And like Cubitron wrote, fix for damage Epoch system would be appreciated. Thank you very much.

    For the damage:

    Epoch Debug only check "damage Player".

    In this scripts, you do "sethitindex" for all hits, but do not change the overall damage.

    That is the reason, why the damage is not displayed.

    If I have checked it correctly, you can change:

    {_uTarget setHitIndex [_forEachIndex,_x + _damage,true];} forEach (getAllHitPointsDamage _uTarget select 2);

    to

    _hits = getAllHitPointsDamage _uTarget select 2;
    _uTarget setdamage ((damage _uTarget) + _damage);
    {_uTarget setHitIndex [_forEachIndex,_x + _damage,true];} forEach _hits;

     

  7. You could reduce a bit performance with this:
     

    {
    	if (alive _x) then {
    		if (uniform _x == "" || vest _x == "") then {
    			if !(getPlayerUID _x isEqualTo "") then {
    				[uniform _x, vest _x] remoteExecCall ["UniformVestCheck", owner _x];
    			};
    		};
    	};
    } forEach allPlayers;

    Then you only push it, if the player really has no visible uniform / vest for the Server.

     

    Another really helpfull (new) command is "getunitloadout" and "setunitloadout".

    UniformVestCheck =
    {
    	if (typeOf player == "VirtualMan_EPOCH") exitWith {};
    	params ["_uniform", "_vest"];
    	if (!(uniform player isEqualTo _uniform) || !(vest player isEqualTo _vest)) then
    	{
    		player setunitloadout (getunitloadout player);
    		//["The server had to replace your uniform as it was bugged", 5] call Epoch_message;
    	};
    };

    Then the player will just completely reload his loadout...

  8. Oh sorry, this can not work. I have combined it with SEM, so you need SEM running to get AI spawned in.

    You can also try it (I think you will get some errors like "SEM_fnc_spawnAI not found".

    If you are using SEM, there should also come up some AI's.

    I could download the latest officiel version and modify it a bit, but only in a few days.

    If I remember right, the fix was very easy... But it is a long time ago.

  9. We made some tests yesterday and have moved the Door / Gate functions (lock / unlock / open / close) to the Space Bar Menu.

    But all of us 3 Testers have the same opinion. Moving it to the Space menu is a bit confusing, because all other Doors of Map Buildings will stay in mouse wheel menu. So we should not change it.

    But I have talked to DirtySanchez today, because he is already changing something for the Door mechanism.

    He will also change, that opened and locked doors can be closed (currently it can stuck on opened and locked and you are not able to close it until restart)

    I think this was the main problem here (as we have already talked about in private chat).

    This change needs an update for the client files, so it will take some more time to be on the Servers.

  10. As I know, you are playing on our Server...

    I think it is not related on lags (as you already written), but we can test to move the Actions to the Space Bar Menu.

    I will write a prototype I think tomorrow evening.

    Unfortunately I can not block the mouse wheel actions without changing the Client files, so both will be possible then.

    If this works better, I will talk to the other Devs, if we can change it for the next official update.

     

    For the disappearing Backpacks:

    We have some extra anti dupe checks on our Server. First I thought, this checks cause it, but I have no logs, that you have tried to dupe for the last 3 Weeks.

    When has it happened to you? Then I will doublecheck the logs.

×
×
  • Create New...