floor and ceiling lower (95) & Floor and ceiling raise (96)

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
doomexpert
Posts: 103
Joined: Tue May 04, 2010 7:57

floor and ceiling lower (95) & Floor and ceiling raise (96)

Post by doomexpert »

can i set a limit on how far the elevator can go? so bottom heigt limit and upper height limit to that elevator/floor? cause i want to make a realistic elevator. that from the inside you cant see the lift is moving up or down. unbehalf some window. because with that action in format doom in hexen format, the lift can go unlimited up or down with a with a given value. the floor must be able to go down 1 floor and 1 up from the middle so there are 3 heights. now the floor can now only up or down with the same given value. it would be nice to choose if the floor can go from the upper to down so you can choose wich floor, but i dont know what the best options are. so from the ground floor the lift can 1 down to basement and 1 up. and there is no option to call the elevator on that spicific floor? it would be cool if i can call the elevator from each of the 3 floors, but now its simply a basement, i want to call only the elevator on one floor without telling the elevator to go up or down, just going to a sertain height. wther the elevator is up or down. But remember the option 95 & 96 cause the floor and ceiling and some internal sector must also act and go with the elevator, i set the linedef in the elevator sector so the texture travel also with the elevator. the option 95 and 96 in doom in hexen format, i choose that option because then the ceiling can also travel with the floor and same with sectors in the elevator, just the same sector tag. now the problem to call the elevator to the ground floor that there is no option i think.only to call the elevator up or down, but i dont know how to tell the elevator to call the elevator everytime to a sertain height, nomatter if its up or down.

now im also thinking to make a lift with 3d sectors so it would be more realistic, but then you have different problems. the problem is how do you say to the door that the door cant open when the elevator is not on the floor. that you are.
User avatar
Kappes Buur
Persecution Complex
Posts: 176
Joined: Tue Apr 05, 2011 4:30
Location: British Columbia

Re: floor and ceiling lower (95) & Floor and ceiling raise (

Post by Kappes Buur »

There are so many options for this. Perhaps the following can get you started.

Of course, you could use these specials
  • 95:FloorAndCeiling_LowerByValue (tag, speed, height)
    96:FloorAndCeiling_RaiseByValue (tag, speed, height)
to simulate an elevator.

However, ZDoom has specials just for such a construct
  • 245:Elevator_RaiseToNearest (tag, speed)
    246:Elevator_MoveToFloor (tag, speed)
    247:Elevator_LowerToNearest (tag, speed)
which makes it a bit easier as you don't have to calculate the height.

In a multifloor map, the determination of which floor to travel to and stop at the
correct floor is usually done with ACS scripting, correlating the player's z-position
with the z-position of the elevator. Which is quite involved.

Another interesting idea was used by ace All of those do not address your idea of a closed cab, though.
For that you have to make use of 3D-floors.
I made a simple 3D elevator some time ago. It just goes up one floor at a time.
While it is not a closed cab either, it does show the idea. Or you could select floors via a conversation as RV-007 was trying to do.
doomexpert
Posts: 103
Joined: Tue May 04, 2010 7:57

Re: floor and ceiling lower (95) & Floor and ceiling raise (

Post by doomexpert »

Kappes Buur wrote: 246:Elevator_MoveToFloor (tag, speed)
i dont know how to call a floor to the players z heigt, that would be awsome. that what im looking for.

i think:

{
Ceiling_MoveToValue (const:values
Floor_MoveToValue (const values
TagWait

now i have this:

script 8 (void)
{
Floor_MoveToValue(86,7,142,0);
ceiling_movetovalue(86,7,236,0);
TagWait (86);
}
script 9 (void)
{
Floor_MoveToValue(86,7,-178,0);
ceiling_movetovalue(86,7,-92,0);
TagWait (86);
}
script 10 (void)
{
Floor_MoveToValue(86,7,-18,0);
ceiling_movetovalue(86,7,76,0);
TagWait (86);
}

that works :)
Locked

Return to “GZDoom”