Script Cleanup

This commit is contained in:
Skaronator
2013-11-30 21:42:16 +01:00
parent 65b5b362bd
commit 33cb816ace
4 changed files with 15 additions and 40 deletions

View File

@@ -15,8 +15,7 @@ _NV = player getvariable ["NV", ["OFF", 0.1]];
_NVOn = (_NV select 0); _NVOn = (_NV select 0);
_OldAperture = (_NV select 1); _OldAperture = (_NV select 1);
if(_NVOn == "ON") if(_NVOn == "ON") exitwith
exitwith
{ {
setaperture -1; setaperture -1;
ppEffectDestroy ppColor; ppEffectDestroy ppColor;
@@ -28,7 +27,6 @@ exitwith
ppEffectDestroy ppColor; ppEffectDestroy ppColor;
ppEffectDestroy ppBlur; ppEffectDestroy ppBlur;
ppColor = ppEffectCreate ["ColorCorrections", 1999]; ppColor = ppEffectCreate ["ColorCorrections", 1999];
ppColor ppEffectEnable true; ppColor ppEffectEnable true;
ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3]; ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3];
@@ -40,16 +38,13 @@ ppInversion ppEffectEnable false;
ppInversion ppEffectAdjust [1,1,1]; ppInversion ppEffectAdjust [1,1,1];
ppInversion ppEffectCommit 0; ppInversion ppEffectCommit 0;
*/ */
//diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _OldAperture, _NV1,_NV2,_NV3];
diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _OldAperture, _NV1,_NV2,_NV3];
ppBlur = ppEffectCreate ["dynamicBlur", 505]; ppBlur = ppEffectCreate ["dynamicBlur", 505];
ppBlur ppEffectEnable true; ppBlur ppEffectEnable true;
ppBlur ppEffectAdjust [.2]; ppBlur ppEffectAdjust [.2];
ppBlur ppEffectCommit 0; ppBlur ppEffectCommit 0;
aperture = 0.0001; aperture = 0.0001;
while { aperture < _oldAperture } do while { aperture < _oldAperture } do
{ {
@@ -58,13 +53,9 @@ while { aperture < _oldAperture } do
sleep 0.001; sleep 0.001;
}; };
player setVariable ["NV", ["ON", _oldAperture]]; player setVariable ["NV", ["ON", _oldAperture]];
player setVariable ["NV1",_NV1]; player setVariable ["NV1",_NV1];
player setVariable ["NV2",_NV2]; player setVariable ["NV2",_NV2];
player setVariable ["NV3",_NV3]; player setVariable ["NV3",_NV3];
s_pz_player2 = player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"]; s_pz_player2 = player addAction ["Vision", "\z\addons\dayz_code\actions\pzombie\pz_vision.sqf", [], 0, false, true, "nightVision", "_this == _target"];
exit;

View File

@@ -5,7 +5,6 @@ _caller = _this select 1;
_id = _this select 2; _id = _this select 2;
// _gen removeAction _id; // _gen removeAction _id;
// array from tweaking settings // array from tweaking settings
_new = _this select 3; _new = _this select 3;
@@ -13,9 +12,7 @@ _NVx = _new select 0;
// get first rbg + m // get first rbg + m
_NV = player getvariable [_NVx,[0.0, 0.0, 0.0, 0.0]]; _NV = player getvariable [_NVx,[0.0, 0.0, 0.0, 0.0]];
_increase = (_new select 1); _increase = (_new select 1);
_index = 0; _index = 0;
{ {
_NV set [_index,(_NV select _index) + _x]; _NV set [_index,(_NV select _index) + _x];
@@ -45,11 +42,9 @@ if(_NVOn == "ON") then {
ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3]; ppColor ppEffectAdjust [1, 1, 0, _NV1, _NV2, _NV3];
ppColor ppEffectCommit 0; ppColor ppEffectCommit 0;
diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _newap, _NV1,_NV2,_NV3]; //diag_log format ["DEBUG: Aperture : %1 First %2 Second %3 Third %4", _newap, _NV1,_NV2,_NV3];
player setVariable ["NV", ["OFF", _newap]]; player setVariable ["NV", ["OFF", _newap]];
} else { } else {
player setVariable ["NV", ["ON", _newap]]; player setVariable ["NV", ["ON", _newap]];
}; };
exit;

View File

@@ -3,9 +3,7 @@
Author: Kane "Alby" Stone Author: Kane "Alby" Stone
Expanded to allow all meats as input by: [VB]AWOL - DayZ Epoch Expanded to allow all meats as input by: [VB]AWOL - DayZ Epoch
Description: Description: Allows a player to tame/domesticate a dog. Script is applied to object via addAction.
Allows a player to tame/domesticate a dog.
Script is applied to object via addAction.
Variables: Variables:
_target = Object that action is attached too. _target = Object that action is attached too.
@@ -46,7 +44,7 @@ if(_removed == _countIn) then {
_animalID = _dog getVariable "fsm_handle"; _animalID = _dog getVariable "fsm_handle";
_animalID setFSMVariable ["_isTamed", true]; _animalID setFSMVariable ["_isTamed", true];
sleep 1; sleep 1;
diag_log format["DEBUG: %1, id: %2 [%3]",_dog,_animalID,completedFSM _animalID]; //diag_log format["DEBUG: %1, id: %2 [%3]",_dog,_animalID,completedFSM _animalID];
if (!moveToCompleted _dog) then { if (!moveToCompleted _dog) then {
_dog moveTo (position _dog); _dog moveTo (position _dog);
}; };

View File

@@ -2,28 +2,19 @@ private ["_markerstr","_class","_name","_type","_position","_radiusA","_radiusB"
if ("ItemMap_Debug" in items player) then { if ("ItemMap_Debug" in items player) then {
// _world = toUpper(worldName); // _world = toUpper(worldName);
_maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
_maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"]; _maptype = ["NameCityCapital","NameCity","NameVillage","NameLocal"];
_config = configFile >> "CfgWorlds" >> worldName >> "Names";
for "_i" from 0 to (count _config -1) do {
_class = _config select _i; //Returns a conif
_name = getText (_class >> "name");
for "_i" from 0 to (count _config -1) do { for "_i" from 0 to (count _config -1) do {
_position = getArray (_class >> "position"); _class = _config select _i; //Returns a conif
_name = getText (_class >> "name");
_radiusA = getNumber (_class >> "radiusA"); _type = getText (_class >> "type");
_position = getArray (_class >> "position");
_radiusB = getNumber (_class >> "radiusB"); _radiusA = getNumber (_class >> "radiusA");
_radiusB = getNumber (_class >> "radiusB");
if (_type in _maptype) then { if (_type in _maptype) then {
diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]); diag_log(format["Config Type, Name: %1 / Type: %2 / Position: %3, Passed",_name,_type,_position]);