Jump to content

Elevator Script for Players and Vehicles [WIP/Prototype]


Axe Cop

Recommended Posts

Ok. Totally lost. I installed the script.

I'm at the point where I need to add the metal floor preview to the variables.sqf file.

I can't find it.

 

I'm hosting my server with Vilayer. And am using the vilayercodecustom.

 

So, checked in the vilayercodecustom\dayz_epoch folder, and nothing.

And in the vilayercodecustom\missions\epoch.tavi folder, and nothing.

 

The code should reside (from my understanding) in the vilayercodecustom\dayz_epoch\init\variables.sqf, but there is no such file there.

 

Anyone here uses this script and hosts with Vilayer?

 

Please help.

Link to comment
Share on other sites

Well I've mentioned it many times but here you go again: the file can be found in your client files on YOUR PC!

e.g. "C:\Program Files (x86)\Steam\SteamApps\common\Arma 2 Operation Arrowhead\@DayZ_Epoch\addons\dayz_code.pbo" extract that and there is the file init\variables.sqf in there :)

I thought there would be a FAQ in this forum with basic question like that, I guess not :D

Link to comment
Share on other sites

Hi Axe Cop.

 

I'm hoping you or someone here can point me in the right direction. I read through the entire thread, and it seems nobody has had a similar issue.

 

First, the install went great, and I used the changes for testing purposes (removed the build requirements).

 

I get the white options to upgrade to elevator and elevator stop. My ground floor upgrades fine (at least it tells me "Elevator Built"). When I click on the floor I wish to upgrade into a stop, it says "no elevator selected", and I have no option to select an elevator on the one I just built. I know the most recent elevator built should be the default selected, so I'm not sure what's happening.

 

Thanks for continuing support even though you don't play epoch anymore!

 

Regards

Link to comment
Share on other sites

@rustman3h: weird, but hard to say why this is happening to you (and only you). :/

Only reason I can think of if the global variable gets overridden by some other script, but that is very unlikely because I chose the variable name carfeully: ELE_elevator

so I have no idea without debugging your own code on your server its hard to say, sorry.

Link to comment
Share on other sites

Installed this and put it wheres its supposed to be. Make floors and upgrade to elevator. Then make floor top then upgrade to stop then floor disappears. Get on elevator and doesn't work. Let me know what I need to do to make it work. . Would other scripts make it not work. Evac chopper and so on. 

 

My start up is 

if (!isDedicated) then {
	//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
// ////Evac Chopper
	_nil = [] execVM "custom\JAEM\EvacChopper_init.sqf";
// ////Evac Chopper End
	//Run the player monitor
	_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
	_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";	
	
	//Lights
	[false,12] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
Link to comment
Share on other sites

So we've thought of another use for this script. An openable metal roof to allow helicopters in to land. I understand it would require the setup of multiple elevators and each would need triggering, that's fine, but what I'm curious about is if anyone has worked out a way to lock them so they require a code? Or is there a way to make only one stop able to call and send the elevator without it teleporting the person on top of it?

Link to comment
Share on other sites

@BudBell please read the installation instruction, it should be clear why your floor disappears when you build an elevator stop and I've said this like 10 times in this thread because nobody reads the instructions!? :D

 

@Havoc302 should be possible what you want with some small modifications, locking the elevator too but the problem with that is where do you save the code? that is the thing without any changes to the database Epoch uses the CharacterID column in the database to save the code for saves and doors, but for the elevator that is used to save the elevator id and stuff.. because I did not want to change the database for the elevator to work (as you might see many people in this thread can't even install it as is and with a custom database it gets alot harder to installer haha).. but of course a custom database would be best way to do that. That might also resuklt in some changes of the default Epoch scripts, so it is possible but with some small changes in the epoch database and scripts, that is why I didn't release something like this.

Link to comment
Share on other sites

@BudBell please read the installation instruction, it should be clear why your floor disappears when you build an elevator stop and I've said this like 10 times in this thread because nobody reads the instructions!? :D

 

@Havoc302 should be possible what you want with some small modifications, locking the elevator too but the problem with that is where do you save the code? that is the thing without any changes to the database Epoch uses the CharacterID column in the database to save the code for saves and doors, but for the elevator that is used to save the elevator id and stuff.. because I did not want to change the database for the elevator to work (as you might see many people in this thread can't even install it as is and with a custom database it gets alot harder to installer haha).. but of course a custom database would be best way to do that. That might also resuklt in some changes of the default Epoch scripts, so it is possible but with some small changes in the epoch database and scripts, that is why I didn't release something like this.

 

 

OK I GOT IT TO WORK. I didn't have a variable script. Mine is thru the BEF. So I made on and works fine.  

Questions the tools to build can be less or something else and still work?

Link to comment
Share on other sites

Questions the tools to build can be less or something else and still work?

I guess you want to change the build requirements (tools and items)? Again that is described in the first post as well or what do you need? :)

// config variables, you can put those in your init.sqf where all other configs for Epoch are
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
Link to comment
Share on other sites

There are no access restrictions yet! Any player can built or use an elevator with this version, so keep that in mind if you want to use it on a live server. I already have some ideas to use the default car keys to use an elevator, that should work.. unless your have some better ideas for access control? :)

Does anyone know if the elevator still can be accessed by any player ? or is it now tied to the plot pole or something ?

Anyone got this working with 1.0.5.1 ?

Thinking of installing this on the weekend – we will get some awesome bases with this script. B)

Link to comment
Share on other sites

It should work with 1.0.5.1, because this script is more or less interdependent from the Epoch code it will work unless they change some major things. :)

And the elevator can be used by anyone, if you want some restriction you can add that yourself to the menu popup or something, should be fairly easy to restrict access.

Link to comment
Share on other sites

Same issue here.  Can create the elevator and first stop, but when I try to activate it, the metal floor just sits there flashing and all attempts to do anything else get the elevator is already active message.  No errors in the log files either.

 

thanks

Link to comment
Share on other sites

Ok, I started over on mine and it woks, but is flooding the client log with this error.

ELE_fnc_hasNextStop = {
priv>
  Error position: <_stop
};



ELE_fnc_hasNextStop = {
priv>
  Error Undefined variable in expression: _stop
File mpmissions\__CUR_MP.Napf\scripts\elevator\elevator_functions.sqf, line 103
Error in expression <earObjects [ELE_StopClass, _maxRange]);
_stop
};

I have also seen other scripts tossing out Undefined variable errors.  Did the scripting engine change with the new arma 2 version?

Link to comment
Share on other sites

Hi Axe Cop,

 

could you enlighten me regarding the effect I described here:

 

 

In short: it looks like objects built in close proximity to an elevator stop are swept along with the moving elevator if they have been built after updating the metal floor to a stop.

 

What would be the reason for this? What is 'close' and how would one circumvent this effect (leaving some space between the elements would leave space for bullets, too ;-)

Link to comment
Share on other sites

The elevator attaches near players and vehicles to the platform so it won't fall of when moving (because of desync etc things might fall off when not attached properly).

here the part of my code for that (elevator_functions.sqf):

// attach near entities to the elevator platform
_attachments = [];
{ _x attachTo [_elevator]; _attachments set [count _attachments, _x]; } forEach (_elevator nearEntities ELE_Size);

you can see I used the nearEntities script command with the range of the my global config value ELE_Size, you can try and set entity class names to restrict what entities are attached to the elevator (see the linked wiki entry) or decrease the ELE_Size.

 

Maybe try this, change

_elevator nearEntities ELE_Size

to

_elevator nearEntities [["Man", "LandVehicle"], ELE_Size]

if you only want to attach players and land vehicles to the elevator, it should exclude the Epoch building items (not tested),

Link to comment
Share on other sites

I'm getting 
 

"Elevator script initialized"
Error in expression <false];
};
} else {
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.Panthera2\Addons\elevator\elevator_init.sqf, line 71

In my Client RPT, running 1051, 112555

Link to comment
Share on other sites

Somehow my RPT shows 15:05:52 "Error: Elevator script should NOT be started on the server"

Running epoch 1.0.5.1, vilayer host, infistar

yeah i put that error in there because many admins put the script in the wrong place and this is so you can see the position in the init.sqf is nor correct.. check the installation again :)

 

I'm getting 

 

"Elevator script initialized"
Error in expression <false];
};
} else {
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.Panthera2\Addons\elevator\elevator_init.sqf, line 71

In my Client RPT, running 1051, 112555

ok that's weird, maybe they have changed the behavior for global variables, still this should be no error but just a warning.. stupid Arma2 patch I have to recode the script when I have some time, but it should still work if you ignore the errors, at least it is for other users or then don't have the new script engine, i don't know.

Link to comment
Share on other sites

yeah i put that error in there because many admins put the script in the wrong place and this is so you can see the position in the init.sqf is nor correct.. check the installation again :)

 

ok that's weird, maybe they have changed the behavior for global variables, still this should be no error but just a warning.. stupid Arma2 patch I have to recode the script when I have some time, but it should still work if you ignore the errors, at least it is for other users or then don't have the new script engine, i don't know.

I have no reported issues with the script and I know it's like a favored feature on my server. I just like to get errors out of the way.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...