Jump to content

Elevator Script for Players and Vehicles [WIP/Prototype]


Axe Cop

Recommended Posts

 

By the sounds of it you haven't followed the instructions properly.

Just one more thing, as I use the "MetalFloor_Preview_DZ" for the elevator stop by default, if you want to keep it like that you have to add that class to your allowed objects in Epoch, otherwise Epoch will delete it right after you upgrade a metal floor to a stop point. 
To do that the class needs to be added to the file "dayz_code\init\variables.sqf", at line 466 there is a list "dayz_allowedObjects", just add "MetalFloor_Preview_DZ" to that list and copy the file to your mission folder as usual (the file is referenced in the init.sqf). if you don't want to do that just replace the stop class with this config variable:

ELE_StopClass = "MetalFloor_Preview_DZ";

THIS WORKED>. elevator is FUNCTIONAL... 

 

Only thing is.. that u still need 2 pieces of metal floor, crowbar, and toolbox   

to craft the elevator..

 

once completed when u go back into server.. u will see the metal floor on the floor for the elevtor start FLOOR..

and u will see th lock box in the hieght the elevator will rise.. once u reach that level the Lockbox disappears.

 

if you want a better item just change 

 

ELE_StopClass = "MetalFloor_Preview_DZ";

 

change that ... MetalFloor_Preview_DZ.... to what ever item u want to see in the sky.. for the level the elevator will reach

 

u can find that line in the Elevator / elevator_ini.sqf...

 

Thanks guys great Script.. 

 

If anyone needs help   

SKype : Deadlokd

Link to comment
Share on other sites

I am having a problem as well with the metalfloor_preview_dz class.

My variables.sqf looks like this :

//Daimyo Base Building 1.2 Variables
/*
These variables are defined to work globally to ONLY CLIENT scripts and not to the server or other players
They help to communicate to other Client scripts etc.
Example: remProc for example stands for remove process. Meaning if your in the process of removing an object
remProc will == true; This way if you try to begin removing it again, remProc will already be true and exit out
with "Your already trying to remove this";
Not all variables are boolean true or false but hopefully you get the idea
*/
	//Strings
	globalSkin 			= "";
	allbuildables_class = [];
	allbuildables 		= [];
	allbuild_notowns 	= [];
	allremovables 		= [];
	wallarray 			= [];
	structures			= [];
	CODEINPUT 			= [];
	keyCode 			= [];
	//Booleans
	remProc 			= false;
	hasBuildItem 		= false;
	rem_procPart 		= false;
	repProc 			= false;
	keyValid 			= false;
	procBuild 			= false;
	currentBuildRecipe 	= 0;
	removeObject		= false;
	s_player_deleteBuild_b = -1;

	
	server_admin_list = ["xxxxxxxx"];
	test_builder = ["xxxxxxxxx"];
	
DZE_isRemovable = ["M240Nest_DZ","ParkBench_DZ","Plastic_Pole_EP1_DZ","Hedgehog_DZ","Sandbag1_DZ","Fort_RazorWire","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Fence_corrugated_DZ","CanvasHut_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","Land_Fire_Barrel"];

so i dont haven allowedObjects variable there....and even if i create an array and just add MetalFloor_Preview_DZ in it, it still gets removed..

 

Any help ? Btw....which variables.sqf do you guys have ? Cause the BaseBuilding master file doesnt have it...and default Epoch doesnt have it as well.

 

-Thanks

Link to comment
Share on other sites

Yeah, thats a typical BaseBuilding variables.sqf with an extra addition of an array for the fn_self_actions.sqf.

 

Hmmmm, i see what you mean now....i'll try and use the .sqf you gave me....although i am pretty sure i gotta watch out for the initializers there....my guess is they'll break my fn_self_actions actions.

 

Thanks axe

Link to comment
Share on other sites

Yeah, thats a typical BaseBuilding variables.sqf with an extra addition of an array for the fn_self_actions.sqf.

 

Hmmmm, i see what you mean now....i'll try and use the .sqf you gave me....although i am pretty sure i gotta watch out for the initializers there....my guess is they'll break my fn_self_actions actions.

 

Thanks axe

I have no idea what you are talking about, use the file you have in your dayz_code.pbo and add the metal floor preview, nothing else! :D how can that break aynthing in your self action? :o

Without the variable "dayz_allowedObjects" you are not able to build anything, so it is in epoch by default! :D

Link to comment
Share on other sites

hmmm, i created an elevator and it was working fine....but now that the server restarted the 'top' floor is down on the ground now.

is this a dayz epoch bug ? cause i've noticed it with Base Building  buildings as well.

 

Its as if the y axis value in the database was set to 0 when the server restarted.

Link to comment
Share on other sites

Never noticed something like that before, but if you had that before could be a bug or your database contains is somehow damaged.. I had that a few monthnago some weird entries with wrong data, can happen if the data is to long and gets cut off like big inventories or somethng..hard to say :/

Link to comment
Share on other sites

Never noticed something like that before, but if you had that before could be a bug or your database contains is somehow damaged.. I had that a few monthnago some weird entries with wrong data, can happen if the data is to long and gets cut off like big inventories or somethng..hard to say :/

 

http://dayzepoch.com/forum/index.php?/topic/1351-modular-buildings-are-aligned-to-the-ground-level-after-restart/?p=10803

 

I'll try this in my server's server_monitor.sqf and see on the next server restart.

Oh i hope this will fix this cause i died twice trying to build the 2nd floor :)

 

The database looks good, so the server must be resetting the values:

Base Elevator: [89.725,[9150.08,11026.7,-0.164]]

1st Floor:       [271.173,[9150.27,11027.1,6.087]]

 

The last one is the height right ? Looks good, so its probably this fix i am implemented. I'll post tomorrow morning the results.

 

Thanks

 

 

 

EDIT : Yup, that fixed it :)

Link to comment
Share on other sites

http://dayzepoch.com/forum/index.php?/topic/1351-modular-buildings-are-aligned-to-the-ground-level-after-restart/?p=10803

 

I'll try this in my server's server_monitor.sqf and see on the next server restart.

Oh i hope this will fix this cause i died twice trying to build the 2nd floor :)

 

The database looks good, so the server must be resetting the values:

Base Elevator: [89.725,[9150.08,11026.7,-0.164]]

1st Floor:       [271.173,[9150.27,11027.1,6.087]]

 

The last one is the height right ? Looks good, so its probably this fix i am implemented. I'll post tomorrow morning the results.

 

Thanks

 

 

 

EDIT : Yup, that fixed it :)

Good, are you using the BB 1.2 stuff or where did the the bug come from?

Link to comment
Share on other sites

Good, are you using the BB 1.2 stuff or where did the the bug come from?

 

Yeah i am using the BB 1.2 (with more buildings materials) but the bug was in dayz_server.pbo.

By default it had the check only for TentStorage and static buildings....changing that to all_buildables fixes everything.

My guess of BB 1.2 and any building constructed by the user.

It will always get the proper coordinates to place objects, at the exact locations written in the db.

Link to comment
Share on other sites

Im having issues accessing the elevators menu through some of the stops. It looks like the stop is preventing access to the elevator as is i find a corner where the elevator is not lined up with the stop I can access the elevator options.

 

I Think if the elevator stopped slightly higher so it is just sticking through the stop this will fix the issue What can I change to do this or is there another fix for it?

Link to comment
Share on other sites

Im having issues accessing the elevators menu through some of the stops. It looks like the stop is preventing access to the elevator as is i find a corner where the elevator is not lined up with the stop I can access the elevator options.

 

I Think if the elevator stopped slightly higher so it is just sticking through the stop this will fix the issue What can I change to do this or is there another fix for it?

Ok that might be a problem because the default stop class has the same size as the elevator itself so you can't get a target on it..

your idea with stopping the elevator a little bit higher than the stop should work i think, should be easy to adjust that in the code.

 

try this, file elevator_functions.sqf, line 167 sets the destination "_dest" of the next stop point, just elevate the z-value a little and see how that works out:

_dest = getPosATL _nextStop;
_dest set [2, (_dest select 2) + 0.05]; // add this line, "2" is the z value

in that example I've added 0.05 metres to the z-value, play arount with that a littel and see how it looks like. :)

Edited by Axe Cop
Link to comment
Share on other sites

I added the line and now the elevators are not available nor are the upgrades and I could not find any errors in the RPT file any idea? 

oops sorry I see an error, the last ")" should be "]"..

_dest set [2, (_dest select 2) + 0.05]; // add this line, "2" is the z value

that should fix it

Link to comment
Share on other sites

I'm thinking of using this script to make helipad transfer units.  You land your heli on one outside the hanger and it moves your heli into the hanger.  Saves me having to fly them in like mission impossible, and it keeps them safe from griefers.  Great script, genius :)

Link to comment
Share on other sites

I'm thinking of using this script to make helipad transfer units.  You land your heli on one outside the hanger and it moves your heli into the hanger.  Saves me having to fly them in like mission impossible, and it keeps them safe from griefers.  Great script, genius :)

nice idea, but remember Epoch does not save the position if you don't get in and start the engine at least once or something. same with vehicle tow/lift you have to get in the vehicle so it will be saved to the database i think.

Link to comment
Share on other sites

nice idea, but remember Epoch does not save the position if you don't get in and start the engine at least once or something. same with vehicle tow/lift you have to get in the vehicle so it will be saved to the database i think.

 

Yep, I lose track of how many times I have to explain this to my players.  Every restart I get at least 2 or more complaints that towed vehicles have disappeared.. I've even forgot to do it myself a few times.  There has to be a way Axe Cop, there just has to be a way lol :D

Link to comment
Share on other sites

Yep, I lose track of how many times I have to explain this to my players.  Every restart I get at least 2 or more complaints that towed vehicles have disappeared.. I've even forgot to do it myself a few times.  There has to be a way Axe Cop, there just has to be a way lol :D

Sure there in an easy way, just do a manual sync after you untowed the vehicle, thats all :P

Link to comment
Share on other sites

Isn't the towing/lifting related to a BE filter ? pretty sure i read it was a setpos filter but i might be wrong

I think you mean something different, when you have the BE filters not configured players will get kicked, but we mean just vehicles not saving their position that has nothing to do with BattlEye.

I didn't go through the code but I think vehicles only get synced when you are sitting inside or accessing the gear..

Link to comment
Share on other sites

  • 3 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...