s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Components
Door
chevron_left
Components
class
Door
Constructors
functions
Door
Properties
data_object
AnimationCurve
data_object
AutoClose
data_object
AutoCloseDelay
data_object
CloseFinishedSound
data_object
CloseSound
data_object
CloseTooltipDescription
data_object
CloseTooltipIcon
data_object
CloseTooltipTitle
data_object
IsLocked
data_object
IsUsable
data_object
LinkedDoor
data_object
LockedSound
data_object
LockedTooltipDescription
data_object
LockedTooltipIcon
data_object
LockedTooltipTitle
data_object
Mode
data_object
OnClose
data_object
OnOpen
data_object
OpenAwayFromPlayer
data_object
OpenFinishedSound
data_object
OpenSound
data_object
OpenTooltipDescription
data_object
OpenTooltipIcon
data_object
OpenTooltipTitle
data_object
Pivot
data_object
SlideOffset
data_object
Speed
data_object
StartOpen
data_object
State
data_object
TargetAngle
Methods
functions
Close
functions
Open
functions
Toggle
Door
class
Sandbox.Mapping
.
account_tree
extends
Component
sealed
Sandbox.Engine
build
Constructors
1
Door
(
)
data_object
Properties
30
AnimationCurve
Curve
Animation curve to use, X is the time between 0-1 and Y is how much the door is open to its target angle from 0-1.
AutoClose
bool
Automatically close after opening.
AutoCloseDelay
float
Delay before automatically closing (in seconds). -1 means stay open.
CloseFinishedSound
SoundEvent
Sound to play when a door has finished closing.
CloseSound
SoundEvent
Sound to play when a door is closed.
CloseTooltipDescription
string
CloseTooltipIcon
string
CloseTooltipTitle
string
IsLocked
bool
Is this door locked?
IsUsable
bool
Can this door be opened by pressing it.
LinkedDoor
Door
Optional linked door that opens when this door opens. Useful for double doors.
LockedSound
SoundEvent
Sound to play when a door is interacted with while locked.
LockedTooltipDescription
string
LockedTooltipIcon
string
LockedTooltipTitle
string
Mode
DoorMode
Whether this door rotates or slides.
OnClose
Doo
Called when the door is closed.
OnOpen
Doo
Called when the door is opened. Receives the GameObject that opened it.
OpenAwayFromPlayer
bool
Open away from the person who uses this door.
OpenFinishedSound
SoundEvent
Sound to play when a door is fully opened.
OpenSound
SoundEvent
Sound to play when a door is opened.
OpenTooltipDescription
string
OpenTooltipIcon
string
OpenTooltipTitle
string
Pivot
GameObject
Optional pivot point, origin will be used if not specified. The pivot's rotation defines the hinge axis - the door rotates around the pivot's up axis. Orient the pivot so its up axis points sideways to make a trapdoor.
SlideOffset
Vector3
Local-space offset the door slides to when fully open.
Speed
float
Speed. Degrees per second for rotating, units per second for sliding.
StartOpen
bool
Start in the open position.
State
DoorState
TargetAngle
float
How far should the door rotate.
functions
Methods
3
Close
(
)
Closes the door. Does nothing if already closed or closing.
Open
(
presser
)
Opens the door. Does nothing if already open or opening.
Toggle
(
presser
)
Toggles the door between open and closed states.
Inheritance
Component
Door
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.