Portal
Associated namespace: sm.portal
A userdata object representing a portal in the game.
Values:-
id
[ int ]Get
: (Server-Only) The portal's id.
Operation | Description |
---|---|
Portal == Portal | Checks if two instances of Portal refer to the same Portal . |
Functions
getContentsA
portal:getContentsA()
Server-Only
Returns the contents of opening A.
Arguments:portal
[ Portal ]: The portal.
- [ table ]: The table of characters and bodies in opening A.
getContentsB
portal:getContentsB()
Server-Only
Returns the contents of opening B.
Arguments:portal
[ Portal ]: The portal.
- [ table ]: The table of characters and bodies in opening B.
getId
portal:getId()
Server-Only
Returns the portal's id.
Arguments:portal
[ Portal ]: The portal.
- [ int ]: The portal's id.
getPositionA
portal:getPositionA()
Server-Only
Returns the position of portal opening A.
Arguments:portal
[ Portal ]: The portal.
- [ Vec3 ]: The position of opening A.
getPositionB
portal:getPositionB()
Server-Only
Returns the position of portal opening B.
Arguments:portal
[ Portal ]: The portal.
- [ Vec3 ]: The position of opening B.
getRotationA
portal:getRotationA()
Server-Only
Returns the rotation of portal opening A.
Arguments:portal
[ Portal ]: The portal.
- [ Quat ]: The rotation of opening A.
getRotationB
portal:getRotationB()
Server-Only
Returns the rotation of portal opening B.
Arguments:portal
[ Portal ]: The portal.
- [ Quat ]: The rotation of opening B.
getWorldA
portal:getWorldA()
Server-Only
Returns the world of portal opening A.
Arguments:portal
[ Portal ]: The portal.
- [ World ]: The world of opening A.
getWorldB
portal:getWorldB()
Server-Only
Returns the world of portal opening B.
Arguments:portal
[ Portal ]: The portal.
- [ World ]: The world of opening B.
hasOpeningA
portal:hasOpeningA()
Server-Only
Returns whether the portal has an opening A.
Arguments:portal
[ Portal ]: The portal.
- [ bool ]: Whether the portal has an opening A or not.
hasOpeningB
portal:hasOpeningB()
Server-Only
Returns whether the portal has an opening B.
Arguments:portal
[ Portal ]: The portal.
- [ bool ]: Whether the portal has an opening B or not.
setOpeningA
portal:setOpeningA( position, rotation )
Server-Only
Sets the portal's opening A.
Arguments:portal
[ Portal ]: The portal.position
[ Vec3 ]: The opening position.rotation
[ Quat ]: The the opening rotation.
setOpeningB
portal:setOpeningB( position, rotation )
Server-Only
Sets the portal's opening B.
Arguments:portal
[ Portal ]: The portal.position
[ Vec3 ]: The opening position.rotation
[ Quat ]: The the opening rotation.
transferAToB
portal:transferAToB()
Server-Only
Transfers objects inside opening A to opening B.
Arguments:portal
[ Portal ]: The portal.
- [ bool ]: Whether the transfer was successful or not.
transferBToA
portal:transferBToA()
Server-Only
Transfers objects inside opening B to opening A.
Arguments:portal
[ Portal ]: The portal.
- [ bool ]: Whether the transfer was successful or not.