Jump to content

Elevator Script for Players and Vehicles [WIP/Prototype]


Axe Cop

Recommended Posts

Hi, nice script & work like a charm but i have error in my rpt at start:

 

z\addons\dayz_epoch\models\metal_floor_ghost.p3d: No geometry and no visual shape

 

any idea ? :)

just ignore it, nothing to worry.. but I never got a message like that :D

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Why couldn't this script use the Fuel variable instead? Or at least the Inventory column? I'm just thinking the Fuel column would be a better spot, since building objects don't use that field at all. Couldn't we edit a file some where to exclude the Metal floor and its _Preview from having the fuel column reset to 0? I would imagine there would be some way to accomplish this. I don't really understand how the HiveWrite/Read files function as to requiring some mods to need to modify the .dll's, so maybe using Fuel would need that, and if so not really a plausible change. But, if we could "simply" change the epoch scripts to not change the fuel field for certain object types, when fuel is > 6976, then, I could again use Take Ownership again from the plot pole, instead of changing it to my ID and ruining my elevator.

 

I guess editing the take ownership to not take ownership of items with ID > 69759999, would do the trick in that case, but, using an independent field would be better I think. This would also allow for secure options. It could then use the CharacterID field to check ownership/friendly status of owner before giving access to operate it.

Link to comment
Share on other sites

@bualdoot actually that is not a bad idea, but I have no idea if you can manipulate the fuel column that easily on buildings, it might not work.

With a custom HiveExt.dll you would have all the freedom you need and can save whatever you like obviously, but for this script I wanted to keep it simple as I know there are many complications with a custom DLL, also many admins don't have that much experience, I use a custom DLL for one of my other scripts and get many questions about it and people don't know how to use it etc.. you know :)

Link to comment
Share on other sites

Should be pretty easy.

 

For fuel, call update_object.sqf -> update position to save the objects fuel (via a PV).  Amend Server_monitor.sqf to read data from the fuel field on object load and if the object is of a particular class.  Just make sure the DB field is the correct Type for the data that needs to be stored.

 

I did the same in A Plot for Life when saving the owners PlayerUID in the worldpace field of the buildable objects.

 

Feel free to take a look at the code if it would be of any help.

Link to comment
Share on other sites

  • 2 weeks later...

@bualdoot actually that is not a bad idea, but I have no idea if you can manipulate the fuel column that easily on buildings, it might not work.

With a custom HiveExt.dll you would have all the freedom you need and can save whatever you like obviously, but for this script I wanted to keep it simple as I know there are many complications with a custom DLL, also many admins don't have that much experience, I use a custom DLL for one of my other scripts and get many questions about it and people don't know how to use it etc.. you know :)

 

Ah. Ya, I'm not really sure either. The DLL thing is why i opted for ZUPA's SC 3.0, instead of souls 2.0, or the others. I guess I'll have to fiddle around with it and find out.

 

Should be pretty easy.

 

For fuel, call update_object.sqf -> update position to save the objects fuel (via a PV).  Amend Server_monitor.sqf to read data from the fuel field on object load and if the object is of a particular class.  Just make sure the DB field is the correct Type for the data that needs to be stored.

 

I did the same in A Plot for Life when saving the owners PlayerUID in the worldpace field of the buildable objects.

 

Feel free to take a look at the code if it would be of any help.

 

Sounds simple enough :) I use your P4L 2.34, and really like that it uses the inventory field. Some times I worry that having P4L, doormanagement, plot management, and I'm sure some others all on my server right now, using the inventory field, is going to cause the field to be over the length limit or something and cause problems ( I actually do have an issue occasionally with worldspace data too long, for metal floors (maybe others) at the moment). Which is why I'm hoping we can use the fuel field, or maybe the hitpoints fields or something (with the stock dll files). I'll definitely take some more looks at your files.

 

So, I'll try your suggestion for file edits and see what I can do. I'm not as experience in arma scripting as you guys are, but, hopefully I can make it work.

Link to comment
Share on other sites

  • 2 weeks later...

don´t work for me. My Client .rpt says :

 

if ([_ct] call ELE_fnc_isElevatorStop) then {
if (s_pla>
  Error position: <ELE_fnc_isElevatorStop) then {
if (s_pla>
 Error Undefined variable in expression: ele_fnc_iselevatorstop
File mpmissions\__CUR_MP.Chernarus\Scripts\elevator\elevator_init.sqf, line 61
Error in expression <t], 0, false];
 
and
 
if ([_ct] call ELE_fnc_isElevator) then {
if (s_player_>
  Error position: <ELE_fnc_isElevator) then {
if (s_player_>
 Error Undefined variable in expression: ele_fnc_iselevator
File mpmissions\__CUR_MP.Chernarus\Scripts\elevator\elevator_init.sqf, line 41
Error in expression <t], 0, false];
 
 
aaaand
 
 
Error Undefined variable in expression: _this
File mpmissions\__CUR_MP.Chernarus\Scripts\elevator\elevator_init.sqf, line 6
Link to comment
Share on other sites

 

don´t work for me. My Client .rpt says :

 

if ([_ct] call ELE_fnc_isElevatorStop) then {
if (s_pla>
  Error position: <ELE_fnc_isElevatorStop) then {
if (s_pla>
 Error Undefined variable in expression: ele_fnc_iselevatorstop
File mpmissions\__CUR_MP.Chernarus\Scripts\elevator\elevator_init.sqf, line 61
Error in expression <t], 0, false];
 
and
 
if ([_ct] call ELE_fnc_isElevator) then {
if (s_player_>
  Error position: <ELE_fnc_isElevator) then {
if (s_player_>
 Error Undefined variable in expression: ele_fnc_iselevator
File mpmissions\__CUR_MP.Chernarus\Scripts\elevator\elevator_init.sqf, line 41
Error in expression <t], 0, false];
 
 
aaaand
 
 
Error Undefined variable in expression: _this
File mpmissions\__CUR_MP.Chernarus\Scripts\elevator\elevator_init.sqf, line 6

 

 

Then, I am sorry to report, either you have installed it incorrectly or it is conflicting with other mods you have installed. I had to add these to my variables to stop some client spam and the elevator install now works exactly as it was intended.

	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;
Link to comment
Share on other sites

  • 2 weeks later...
  • 5 months later...
  • 1 month later...
  • 1 month later...
  • 3 weeks later...
  • 1 month later...

Hey guy!

But there is no variable declaration _stop in the file elevator_functions.sqf. I do not have a problem and vanishing point of stopping here?

UPDATED: I downloaded from het latest version and it works. Although the version has not changed))

Link to comment
Share on other sites

  • 3 months later...

Hi!

Plz help with my error

Error in expression <earObjects [ELE_StopClass, _maxRange]);
_stop
};
 
 
 
ELE_fnc_hasNextStop = {
priv>
  Error position: <_stop
};
 
 
 
ELE_fnc_hasNextStop = {
priv>
  Error Undefined variable in expression: _stop
File mpmissions\__CUR_MP.chernarus\scripts\elevator\elevator_functions.sqf, line 101
"ELE_fnc_getNextStop next stop id -1 is out of range"

 

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...

anybody got this working in epoch 1062? i had it working in 106 and 1061 but dosent seem to work on 1062 unless ive missed soemthing, i get the options to turn metal floors in to elevator and elevator stop, it also takes the items from inventory but nothing seems to happen, no elevator select and not able to build stop cos of no elevator

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...