Jump to content
  • 0

AxeCops Elevators in 1.0.6.1


neverwinter80

Question

Hello Epoch Community

i have installed AxeCops fantastic elevator mod and it works great with some tweaking on 1.0.6.1, what my issue is if i keep using MetalFloor_Preview_DZ as the stop class they disappear.

My question is has the name of this item changed in the update, or is there a setting that disallows this item to remain persistent?

i have not seen anything in InfiStar that is blocking it either.

Link to comment
Share on other sites

Recommended Posts

  • 0
@neverwinter80
I think it uses the same id

\@DayZ_Epoch\addons\dayz_code\Configs\CfgExtra\snappoints.sqf

class MetalFloor_Preview_DZ: FloorsWallsStairs {
		points[] = {
		{0,0,0.011,"Pivot"},
		{0, -2.64, 0.025,"Back"},
		{0, 2.64, 0.025,"Front"},
		{-2.64, 0, 0.025,"Left"},
		{2.64, 0, 0.025,"Right"}
		};
		radius = 12;
	};

axecop said

Quote

ELE_StopClass = "MetalFloor_Preview_DZ";

Replace the classname with whatever you like.

try using WoodFloor_Preview_DZ

Link to comment
Share on other sites

  • 0

Found these in the init.sqf of some old files I have - I didn't see them in the install instructions on github.

Not sure if they are useful anymore ...

//Elevator
ElevatorScript = true;
ELE_MaxRange = 100; // maximum range the elevator can travel / stop points can be built (in meter)
ELE_Speed = 5; // speed of the elevator (meters per second)
ELE_StopWaitTime = 0; // disable the wait time if you call the elevator
ELE_RequiredBuildTools = ["ItemToolbox", "ItemCrowbar"]; // required tools for building an elevator and elevator stop
ELE_RequiredBuildItems = [["PartGeneric",4], "PartEngine", "ItemGenerator", "ItemJerrycan"]; // required items to build an elevator
ELE_RequiredBuildStopItems = [["PartGeneric",4]]; // required items to build an elevator stop
ELE_StopClass = "MetalFloor_Preview_DZ";

 

Link to comment
Share on other sites

  • 0

in a very quick look,, the only file that seems needs modify is the elevator_build.sqf  by

Spoiler

private ["_args","_option","_obj","_id","_elevatorStop","_dist"];

if (dayz_actionInProgress) exitWith { cutText ["Upgrade already in progress." , "PLAIN DOWN"]; };
dayz_actionInProgress = true;

player removeAction s_player_elevator_upgrade;
s_player_elevator_upgrade = 1;
player removeAction s_player_elevator_upgrade_stop;
s_player_elevator_upgrade_stop = 1;

_args = _this select 3;
_option = _args select 0;
switch (_option) do {
	case "build": {
		_obj = _args select 1;
		_id = [_obj] call ELE_fnc_generateElevatorId;
		if (_id == "") exitWith { cutText ["invalid elevator ID generated", "PLAIN"] };
		if ((ELE_RequiredBuildTools call AC_fnc_hasTools) && {ELE_RequiredBuildItems call AC_fnc_checkAndRemoveRequirements}) then {
			["Medic", ELE_MaxRange] call AC_fnc_doAnimationAndAlertZombies;
			ELE_elevator = [_obj, _id] call AC_fnc_swapObject;
			titleText ["Elevator Built", "PLAIN"];
		};
	};
	case "build_stop": {
		_obj = _args select 1;
		if (isNil "ELE_elevator") exitWith { cutText ["no elevator selected", "PLAIN"] };
		_dist = _obj distance ELE_elevator;
		if (_dist > ELE_MaxRange) exitWith { cutText [format["Elevator Stop is to far away from Elevator (%1 > %2)", _dist, ELE_MaxRange], "PLAIN"] };
		_id = [ELE_elevator] call ELE_fnc_getNextStopId;
		if (_id == "") exitWith { cutText ["Elevator Stop already exists or to many (max. 9 per Elevator)", "PLAIN"] };
		if ((ELE_RequiredBuildTools call AC_fnc_hasTools) && {ELE_RequiredBuildStopItems call AC_fnc_checkAndRemoveRequirements}) then {
			["Medic", ELE_MaxRange] call AC_fnc_doAnimationAndAlertZombies;
			_elevatorStop = [_obj, _id, ELE_StopClass] call AC_fnc_swapObject;
			titleText ["Elevator Stop Built", "PLAIN"];
		};
	};
};

dayz_actionInProgress = false;
s_player_elevator_upgrade = -1;
s_player_elevator_upgrade_stop = -1;

 

 

Link to comment
Share on other sites

  • 0

receiving some errors trying to get this to work, I did change the folder structure to something similar to service_points so it reads the files properly, applied fix from @juandayz for the elevator_build.sqf but I still am running into undef variables from elevator_init.sqf.

Error in expression <,"_elevatorStop"];

player removeAction s_player_elevator_next;
s_player_elevato>
  Error position: <s_player_elevator_next;
s_player_elevato>
  Error Undefined variable in expression: s_player_elevator_next
File mpmissions\__CUR_MP.Chernarus\scripts\elevator\elevator_actions.sqf, line 3
"Elevator script initialized"
Error in expression <evator_select = -1;
player removeAction s_player_elevator_upgrade;
s_player_elev>
  Error position: <s_player_elevator_upgrade;
s_player_elev>
  Error Undefined variable in expression: s_player_elevator_upgrade
File mpmissions\__CUR_MP.Chernarus\scripts\elevator\elevator_init.sqf, line 78

any help would be greatly appreciated guys!

 

Link to comment
Share on other sites

  • 0
Just now, ViktorReznov said:

receiving some errors trying to get this to work, I did change the folder structure to something similar to service_points so it reads the files properly, applied fix from @juandayz for the elevator_build.sqf but I still am running into undef variables from elevator_init.sqf.


Error in expression <,"_elevatorStop"];

player removeAction s_player_elevator_next;
s_player_elevato>
  Error position: <s_player_elevator_next;
s_player_elevato>
  Error Undefined variable in expression: s_player_elevator_next
File mpmissions\__CUR_MP.Chernarus\scripts\elevator\elevator_actions.sqf, line 3
"Elevator script initialized"
Error in expression <evator_select = -1;
player removeAction s_player_elevator_upgrade;
s_player_elev>
  Error position: <s_player_elevator_upgrade;
s_player_elev>
  Error Undefined variable in expression: s_player_elevator_upgrade
File mpmissions\__CUR_MP.Chernarus\scripts\elevator\elevator_init.sqf, line 78

any help would be greatly appreciated guys!

 

you need add the action to your custom variables. If u dont understand what i mean

showme your fn_selfactions.sqf the part when you add the elevator_upgrade and elevator_next

Link to comment
Share on other sites

  • 0

@ViktorReznov  example:

if i add this actions in fn_selfactions:

_iscrate = _typeOfCursorTarget in DZE_DEATHMATCH_crates;
if (_iscrate) then {
	if (s_player_dragbox < 0) then {
		_text = "Drag Box";
		s_player_dragbox = player addAction [format["%1",_text], "scripts\others\player_dragbox.sqf", _cursorTarget, 0, false,true];		
	};
} else {
	player removeAction s_player_dragbox;
	s_player_dragbox = -1;
};

then i will need:

in fn_selfactions.sqf near of bottom find:

// Custom below

and bellow add:

player removeAction s_player_dragbox;
	s_player_dragbox = -1;

And in my custom variables.sqf  find:

//Player self-action handles
dayz_resetSelfActions = {

and before the bracket who close this section add:

s_player_dragbox = -1;

so its looks:

//Player self-action handles
dayz_resetSelfActions = {
//a lot of default actions
s_player_dragbox = -1;
};
Link to comment
Share on other sites

  • 0

yes, i have them there, however they were commented out. May have been from when I have was having server troubles, will retest and repost

	// Custom below
	s_givemoney_dialog = -1;
	s_bank_dialog = -1;
	s_player_checkWallet = -1;
	s_player_copyToKey = -1;
	s_player_claimVehicle = -1;
	s_player_zhide2 = -1;
	s_player_zhide3 = -1;
	s_player_wreckloot = -1;
	s_player_elevator_next = -1;
	s_player_elevator_previous = -1;
	s_player_elevator_select = -1;
	s_player_elevator_upgrade = -1;
	s_player_elevator_upgrade_stop = -1;
	s_player_elevator_call = -1;
	s_player_elevator_id = -1;
};
call dayz_resetSelfActions;

thats how i had them

EDIT: Yup, i ddnt have both variables.sqf and selfActions.sqf edited, no errors and working now, tyvm

Link to comment
Share on other sites

  • 0

I can corroborate others findings. I'm able to get the elevators working, but I cannot add more than one stop. I've tried changing it to woodfloor_preview_dz and have both that and the metalfloor preview in the variables. Neverwinter, would love to see your files as to what you changed to accommodate 9 stops?

Link to comment
Share on other sites

  • 0
1 hour ago, oldmatechoc said:

Should be able to, once I'm done with the script I'm writing atm I'll take a look with you. @kingpapawawa

https://github.com/noxsicarius/DayZ-Epoch-Elevator/blob/master/elevator/elevator_functions.sqf#L138

		format ["Elevator must be at stop %1 to upgrade",_nextStopId] call dayz_rollingMessages;

edit - That is actually not right, _nextStopId is not the number of the last stop... but its getting me closer =)

for now this will do.
 

		format ["Move elevator to last stop before building next stop"] call dayz_rollingMessages;

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...