From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


native int MoveFloor(double speed, double dest, int crush, int direction, bool hexencrush[, bool instant])


Moves the floor of the Sector along with any attached sectors and Actors in it. This is what ZDoom's raising and lowering floors use to change the map geometry.

Note: Any movement done this way will not have interpolation. A MovingFloor must be used to get this effect.


  • speed - The amount to move by. This should be positive with direction determining which way to move.
  • dest - The destination distance from the world origin to cap movement to. Note that this is not the z position in the map. See PointToDist for converting a height to a distance.
  • crush - The amount of damage to deal if a damageable Actor blocked its movement. Setting to -1 will stop the floor from continuing to move.
  • direction - The direction to move vertically. 1 is up and -1 is down.
  • hexencrush - If set to true, stop the floor's movement even if crush isn't -1.
  • instant - If set to true, vertical interpolation for any Actors on the floor is disabled when doing the movement. Default is false.

Return value

Returns the result of the floor movement. This can be one of three values:

  • Sector.MOVE_OK - The floor movement had no issues.
  • Sector.MOVE_CRUSHED - Something was blocking the floor's movement.
  • Sector.MOVE_PASTDEST - The floor reached its destination.


Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.