Skip to main content

sm.portal

Associated object type: Portal

A portal moves objects inside a box to another box in another place.

Functions

addWorldPortalHook

sm.portal.addWorldPortalHook( world, name, portal )
Server-Only

Adds a hook that a new world can find to hook up the other side of a portal.

Arguments:
  • world [ World ]: The target world.
  • name [ string ]: The portal name.
  • portal [ Portal ]: The portal.

createPortal

sm.portal.createPortal( size )
Server-Only

Creates a new portal.

Arguments:
Returns:

destroy

sm.portal.destroy( portal )
Server-Only

Destroys the portal.

Arguments:

popWorldPortalHook

sm.portal.popWorldPortalHook( name )
Server-Only

Finds and pops the world hook for this world if present.

Arguments:
  • name [ string ]: The portal name.
Returns:
  • [ Portal ]: The portal. Nil if nothing was found.