natoed Posted March 30, 2018 Report Share Posted March 30, 2018 So I've been using the static Radiation since v1.0 as the random Radiation never worked V1.0 no issues worked as it should, now with static Radiation with v1.1 I notice that it only work when your player is looking in the direction of the static Radiation source Look at the static Radiation source the Geiger counter work as it should and debug Radiation stats go up look away from the static Radiation source the Geiger counter stop detecting the Radiation and the debug Radiation stats stop going up til the player looks at the static Radiation source again. fuck i hope the above make sense cheers natoed Grahame 1 Link to comment Share on other sites More sharing options...
natoed Posted March 31, 2018 Author Report Share Posted March 31, 2018 Grahame 1 Link to comment Share on other sites More sharing options...
TheVampire Posted April 1, 2018 Report Share Posted April 1, 2018 The geiger counter is designed to only detect objects in the front 90 degree view of the player, however the radiation should continue to go up regardless. I will check this later today and confirm as I've been playing with it also. Here's the snippet of code from epoch_geiger_simulate.sqf in the mission files: { _reldir = player getRelDir _x; if (_reldir > 315 || _reldir < 45) then { //only capture 90 degrees in front of player _reldir = if (_reldir > 315) then { 360 - _reldir} else {_reldir}; //convert into 0-45 degrees _prc = 100 - (_reldir / 45 * 100); //current direction percent, 45 = 100% _x getVariable "EPOCH_Rads" params ["_str","_intensity"]; _dist = player distance _x; _radIntensity = if (_dist <= _intensity) then { //only capture rads when within distance _rds = (_str / _dist); _rdsPrc = (_prc / 100 * _rds); _rdsPrc } else { 0 }; _rads = _rads + _radIntensity }; } forEach _radObjects; If for some reason you wanted it to work in all directions, you could cut out the direction checking. It would be nice if you could have two settings on the geiger, one that is overall, and one that is directional. natoed 1 Link to comment Share on other sites More sharing options...
Grahame Posted April 1, 2018 Report Share Posted April 1, 2018 Realistically, since the Geiger Counter is detecting gamma radiation (otherwise it would need to be a lot closer) it probably should be omni-directional. In a modern Geiger Counter in designs that have an external probe, it is the photon's interaction with the wall of the tube that generates the electrons that enegize the fill gas That said, so long as rad count increases on the player omnidirectionally we could probably leave the counter as is so that we can use it to detect where the radiation is coming from natoed 1 Link to comment Share on other sites More sharing options...
Grahame Posted April 1, 2018 Report Share Posted April 1, 2018 Looking at the code it looks like the actual radiation effects on the player are in fact omnidirectional. Testing on my dev server to confirm now. natoed 1 Link to comment Share on other sites More sharing options...
Grahame Posted April 1, 2018 Report Share Posted April 1, 2018 Seems like this behaviour is also only for custom radiation sources and satellites, not the locations picked at random at server start... See this code in epoch_server/init/server_init.sqf: Spoiler // pick random radioactive locations _radioactiveLocations = getArray(_epochConfig >> worldName >> "radioactiveLocations"); _blacklist = getArray(_epochConfig >> worldName >> "radioactiveLocBLObjects"); _distance = getNumber(_epochConfig >> worldName >> "radioactiveLocBLDistance"); _radioactiveLocationsTmp = []; if !(_radioactiveLocations isEqualTo []) then { private _locations = nearestLocations[epoch_centerMarkerPosition, _radioactiveLocations, EPOCH_dynamicVehicleArea]; if !(_locations isEqualTo []) then { { _locPOS = locationPosition _x; _nearBLObj = nearestObjects [_locPOS, _blacklist, _distance]; if!(_nearBLObj isEqualTo [])then{_locations = _locations - [_x]}; }forEach _locations; for "_i" from 0 to ((getNumber(_epochConfig >> worldName >> "radioactiveLocationsCount"))-1) do { if (_locations isEqualTo []) exitWith {}; private _selectedLoc = selectRandom _locations; _locations = _locations - [_selectedLoc]; _locSize = size _selectedLoc; _radius = sqrt((_locSize select 0)^2 + (_locSize select 1)^2); _locName = (str(_selectedLoc)) splitString " "; _radioactiveLocationsTmp pushBack [_locName,[random 666,_radius]]; private _position = locationPosition _selectedLoc; _markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet; }; }; _customRadioactiveLocations = getArray(_epochConfig >> worldName >> "customRadioactiveLocations"); if !(_customRadioactiveLocations isEqualTo []) then { { _x params [["_position",[0,0,0]],["_radius",0],["_className",""] ]; if ((!(_position isEqualTo [0,0,0]) && !(_radius isEqualTo 0) && !(_className isEqualTo "")) && ((nearestObjects [_position, _blacklist, _distance]) isEqualTo [])) then{ _object = (_x select 2) createVehicle _position; _object setVariable ["EPOCH_Rads",[random 666,(_x select 1)],true]; _markers = ["Radiation", _position] call EPOCH_server_createGlobalMarkerSet; _object setVariable ["EPOCH_MarkerSet",_markers,true]; }else{ diag_log "EPOCHDebug:Check your custom radioactive locations for errors or blacklisted locations"; }; }forEach _customRadioactiveLocations; }; }; missionNamespace setVariable ["EPOCH_radioactiveLocations", _radioactiveLocationsTmp, true]; which taken together with this in the epoch_code/gui/scripts/geiger/epoch_geiger_simulate.sqf: Spoiler { _reldir = player getRelDir _x; if (_reldir > 315 || _reldir < 45) then { //only capture 90 degrees in front of player _reldir = if (_reldir > 315) then { 360 - _reldir} else {_reldir}; //convert into 0-45 degrees _prc = 100 - (_reldir / 45 * 100); //current direction percent, 45 = 100% _x getVariable "EPOCH_Rads" params ["_str","_intensity"]; _dist = player distance _x; _radIntensity = if (_dist <= _intensity) then { //only capture rads when within distance _rds = (_str / _dist); _rdsPrc = (_prc / 100 * _rds); _rdsPrc } else { 0 }; _rads = _rads + _radIntensity }; } forEach _radObjects; //sum up radiation of all objects in vicinity and in FOV { _location = []; _LocName = (_x select 0) joinString " "; { if( (str _x) == _LocName ) exitwith { _location = _x; }; } foreach EPOCH_nearestLocations; if !(_location isEqualTo []) then { _x select 1 params ["_str","_intensity"]; _dist = player distance getPos _location; _radIntensity = if (_dist <= _intensity) then { _str / _dist } else { 0 }; _rads = _rads + _radIntensity; }; }foreach EPOCH_radioactiveLocations; //sum up radiation of all radiactive locations in vicinity means that only custom sources and satellites - the ones that use the EPOCH_Rads variable - will be directional... presumably to help you find them. I tested the map spawned location based rad sources and it does not matter which direction you are looking your geiger counter will work as in real life natoed and TheVampire 2 Link to comment Share on other sites More sharing options...
raymix Posted May 2, 2018 Report Share Posted May 2, 2018 Hi guys sorry for late response, you are correct, but there are 3 types of sources - object, ambient and global. Satellites are assigned random radiation values during creation. Any object in the world can be assigned this variable and become irradiated on the go, which could create some interesting scenarios. Geiger only picks up directional rads, but player should still get irradiated even if not looking at the source. second type is ambient. This type can be assigned to zones. I think it’s random, but pretty sure that can be manually changed. Third is a server public variable of a static radiation no matter where you are located. This was intended for hardcore servers and forces players to gear up asap. Radiation is mitigated by armor value of player, large portions are mitigated by gas masks (90% i think) and hazmat has 100% protection, but you’re a running target. oh and it’s not gamma, it’s all just beta radiation: https://github.com/EpochModTeam/Epoch/wiki/Radiation-design-document Helion4, He-Man and natoed 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now