Default Sandbox nanos world package
Please refer to the Official Sandbox Documentation Page for more information on how to customize and make use of this package.
The Sandbox game-mode exports the following functions to the global scope:
-- Adds a Notification in the screen
---@param type NotificationType Type of the notification to display
---@param id string Unique ID used to store if the notification was already displayed to the player
---@param message string The message to display
---@param duration number Duration in seconds of the notification
---@param delay number Time in seconds to wait until display the notification
---@param force? boolean To force it to be displayed regardless if it was already displayed before
function AddNotification(type, id, message, delay, force)Example:
-- Displays the message 'playing with friends is much more fun!' after 10 seconds, for 5 seconds
AddNotification(NotificationType.Info, "FRIENDS", "playing with friends is much more fun!", 5, 10)-- Function to set all needed events on local character (to update the UI when it takes damage or dies)
---@param character Character
function UpdateLocalCharacter(character)Also the Sandbox game-mode have the following events:
You can call it from server side to spawn a sound
Events.BroadcastRemote("SpawnSound", location, sound_asset, is_2D, volume, pitch)You can call it from server side to spawn a sound attached
Events.BroadcastRemote("SpawnSoundAttached", actor, sound_asset, is_2D, volume, pitch)Those Packages can be loaded together Sandbox and the item will show up in the Spawn Menu!