Help with elevators...

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
Dac Vin

Help with elevators...

Post by Dac Vin »

I'm trying to do an elevator that bring you down in a secret base (Beginning of my mapping try: It should start automatically and you cant­­­­­­­­ use it) and now i need all the elevator sectors (more than one, because of the lighting involved) to move at the same time. But i cant figure how to do that; only the main sector go down with Elevator_LowertoNearest (probably because the rest stop on THAT sector). Anybody know how to do it?
User avatar
Enjay
 
 
Posts: 27306
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

OK, not sure how you have set things up, and I can't remember how elevators work. I think they work by moving to other sectors - so they must be comparing their height with the other sectors. A bunch of sectors joined together may not be able to do this, so I would use a script to lower the floors and ceilings at the same time and simulate an elevator that way.
Dac Vin

Post by Dac Vin »

I thought that too. But when i try to use a FloorandCeiling tag, i get this error:
Function floorandceiling_lowertonearest is used but not defined
What does that mean?
User avatar
Enjay
 
 
Posts: 27306
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

It means you have used an instruction that is not defined anywhere - in this case, because it does not exist. I'd use these:

Floor_LowerByValue (tag, speed, height)
Ceiling_LowerByValue (tag, speed, height)

and for going up...

Floor_RaiseByValue (tag, speed, height)
Ceiling_RaiseByValue (tag, speed, height)

or these (which I've never actually tried, but they should work)

FloorAndCeiling_LowerByValue (tag, speed, height)
FloorAndCeiling_RaiseByValue (tag, speed, height)

Stick any of them them in a script and specify how far you want the floor and ceiling to move. So, you're not moving to the nearest floor, or anything like that, you are moving the floor and ceiling by a predetermined number of units which you can set to be the same value as required to move to the nearest floor.
User avatar
Nanami
Posts: 1066
Joined: Tue Jul 15, 2003 5:13 pm
Location: That little island pritch created.
Contact:

Post by Nanami »

Oh, I had a really good example that I made with 4 floors "above" eachother that you can travel to... and it tells you what floor you're on and if somehow the elevator is on another floor there's a switch to return it... but the code is extremely messy, so I won't post it because it's just a big pile of garbage.
Dac Vin

Post by Dac Vin »

Oh, i was using a LowerToValue tag, instead of LowerByValue. Now it should work...
User avatar
Hirogen2
Posts: 2033
Joined: Sat Jul 19, 2003 6:15 am
Operating System Version (Optional): Tumbleweed x64
Graphics Processor: Intel with Vulkan/Metal Support
Location: Central Germany
Contact:

Post by Hirogen2 »

http://zdoom.org/files/examples/elevator.zip for the multi-floor elevator.
Locked

Return to “Editing (Archive)”