Docs
  • 🍎Stream Avatars
    • Introduction
    • ⏩Quick Setup
    • 📸How to Overlay
      • OBS
      • Streamlabs Desktop
      • XSplit
      • Twitch Studio
      • Unlisted / Other
    • ⚛️Extension
    • ⏩Quick Guide
    • 📬Commands
      • ❗!commands
      • ↕️Selection Commands
        • !random
          • !mass random
          • !change {user} {command} random
        • !avatars
          • !avatar {avatar}
          • !change {user} !avatar {avatar}
          • !change {user} !avatar {avatar} {timer}
          • !mass avatar {avatar}
          • !mass avatar {avatar} {timer}
        • !color
        • !gear
        • !nametags
        • !actions
        • !show
      • ↕️Minigames and Fun Commands
        • !basketball
        • !battleroyale
        • !boss
        • !duel {user} {amount}
        • !slots {amount}
        • !bomb {user}
        • !sling {power} {angle}
        • !fart
        • !quote {#}
        • !roll {#d#}
        • !8ball {question}
        • !freeze {user} {seconds}
        • !pin {user} {x%} {y%} {seconds}
        • !attack {user}
        • !dance
        • !hug {user}
        • !throw
        • !explode {target}
        • !bet {amount} {calltype}
        • !scale {target} {size}
        • !spawn game
        • !screensaver {seconds}
        • ↕️!mass {command}
      • ↕️Shop Commands
        • !shop
        • !buy avatars
        • !buy colors
        • !buy gear
        • !buy nametags
        • !buy actions
      • ↕️Currency Commands
        • !currency
        • !currency add {user} {amount}
        • !currency remove {user} {amount}
        • !currency give {user} {amount}
      • ↕️Gifting Commands
        • !gift {user} lootbox {name}
        • !gift {user} avatar {avatar}
        • !gift {user} gear {gear_set} {gear_piece}
        • !gift {user} color {avatar} {color}
        • !gift {user} nametag {nametag}
        • !gift {user} all true
        • !currency add {user} {amount}
      • ↕️Remove Ownership Commands
        • !remove {user} avatar {avatar}
        • !remove {user} gear {gear_set} {gear_piece}
        • !remove {user} color {avatar} {color}
        • !remove {user} nametag {nametag}
        • !currency remove {user} {amount}
      • !extension
      • !hideavatar
      • !mass {command}
      • !change {user} {command}
      • !spawn {title}
      • !whitelist add {user}
      • !blacklist add {user}
      • !mod add {user}
      • !leaderboard
      • !leaderboard exclude {user}
      • !game exclude {user}
      • !sounds
      • !shoutout {user}
    • 📃Application Settings
      • General
      • Login Details
      • Minigames
      • Avatars And Gear
      • Sounds
      • Nametag Settings
      • Import & Export
      • Shop Editing
      • User Editing
      • ❗Unfinished Docs!
      • ❗Bot Commands
        • ❗Custom Commands
      • ❗Edit Lootboxes
      • ❗Backgrounds
      • ❗Bot Commands
    • 🎨Content Creating
      • Creating Avatars
      • Extension Sorting Order
      • Deleting Avatars, Palettes/Colors, and Gear
      • Creating Gear
      • Creating Colors
      • Creating Backgrounds
      • Creating Bosses
      • Creating Player Classes (boss)
      • Creating Nametags
      • Creating Lootboxes
      • Importing Scripts
      • Importing Private Content
      • Creating Custom Redemptions
      • Creating Extension Thumbnails
      • Creating Custom Language Localization
    • 💫Integrations
      • Stream Deck
    • ❓Support
      • New Platform Additions
      • Various Troubleshooting
      • Data Folder
      • Beta Branch
      • F.A.Q
      • Crash Log - Event Viewer
    • 🤝Stream Avatars Partner
  • ⚙️LUA Scripting API
    • Introduction
    • Quick Start
    • API Reference & Tips
      • 🌎Global Functions
        • log
        • wait
        • yield
        • yieldBreak
        • async functions
        • waitForAsync function
        • stopAsync function
        • get
        • set
        • applyImage
        • waitForAnimation
        • webrequest get/post
        • getUser
        • getUsers
        • getUserById
        • getCurrency
        • addCurrency
        • removeCurrency
        • adjustCurrency
        • getBackground
        • getScriptableBlocks
        • getAvatar
        • getAllAvatars
        • runCommand
        • writeChat
        • setProperty
        • getApp
        • save
        • load
        • addEvent
        • removeEvent
        • keepAlive
      • 🔫Events
        • BankController
        • ServiceController
        • Read Chat
        • Websockets
        • Scriptable Block Trigger
        • Platform Donation
        • App State Change
        • Custom Command
        • Basketball Outcome
        • BattleRoyale Outcome
        • Boss Battle Outcome
        • Boss Battle Player Joined
        • Duel Outcome
        • On JumpCatch Star
        • On Background Switch
        • On Avatar Change
        • On New Viewer
        • On InitializeNewViewer
        • On Follower
        • On Raid
        • On Subscriber
        • On Avatar Spawn
        • On Trigger Object
        • On Hotkey
        • On Purchase
      • 📦Classes
        • App
          • globalAvatarScale {get;set}
          • globalNametagScale {get;set}
          • globalChatBubbleScale {get;set}
          • globalNametagStack {get;set}
          • getResolution
          • platformServiceSettings
          • setResolution
          • setFullscreen
          • getStreamer
          • convertPositionToPercent
          • convertPercentToPosition
          • playSound
          • createBomb
          • pitchSound
          • stopSound
          • soundIsPlaying
          • createGameObject
          • getGameObject
          • createChatBubble
          • createWebsocket
          • removeWebsocket
          • sendWebsocketMessage
          • getAppState
          • sha256_base64
          • getUserFromData
          • getIdsFromData
          • deleteUser
          • exportAvatarImage
          • translateCommand
        • User
          • id {get}
          • isActive {get}
          • isFake {get}
          • lastActiveDate {get}
          • secondsSinceLastActive {get}
          • displayName {get}
          • channelName {get}
          • follower {get}
          • vip {get}
          • subscriber {get}
          • moderator {get}
          • platformModerator {get}
          • platform {get}
          • streamer {get}
          • avatar {get;set}
          • scale {get;set}
          • override_scale {get;set}
          • color {get;set}
          • nametag {get;set}
          • getState
          • getGear
          • setGear
          • setPosition
          • getPosition
          • getWearableAvatars
          • getWearableAvatarColors
          • getWearableGearSetPieces
          • getWearableNametags
          • setTemporaryAvatar
          • setTemporaryColor
          • setTemporaryNametag
          • setTemporaryGear
          • setTemporaryNone
          • clearAllTemporarySelections
          • chatBubble
          • runCommand
          • physics
          • saveUserData
          • loadUserData
        • Physics
          • grounded {get;set}
          • setVelocity
        • ObjectPhysics
          • hasTrigger {get}
          • hasRigidBody {get}
          • layer {get;set}
          • kinemetic {get;set}
          • setVelocity
          • addBoxCollider
          • addCircleCollider
          • addBoxTrigger
          • addCircleTrigger
        • Avatar
          • name {get}
          • getGear
          • getGearPieces
          • getColors
          • getActions
        • GameObject
          • image {get}
          • destroy
          • setAngle
          • setPosition
          • getPosition
          • adjustPosition
          • getScale
          • setScale
          • adjustScale
          • physics
        • Image
          • playAnimation
          • stopAnimation
          • flipX
          • flipY
          • sorting
          • anchor
        • ScriptableBlock
          • id {get}
          • position
      • 📤Helper Class
        • createCooldown
        • checkCooldown
        • setCooldown
        • cooldownTimeLeft
        • startsWith
        • replace
        • split
        • randomElement
        • hasValue
        • matchRegex
Powered by GitBook
On this page
  1. LUA Scripting API
  2. API Reference & Tips
  3. Classes
  4. App

platformServiceSettings

API - Allows controlling of the custom lua streaming platform

You can use this to hook Stream Avatars up to any service you want.

It is not possible to allow the extension to work with a custom platform service.

function output(string_message)
    log('the app wants to send a message to your viewers...');
    log(string_message);
end

return function()

    local app = getApp();

    addEvent('luaPlatformOutput', 'output'); --attaches the event to output()

    local myUserId = 1234;
    local myUserName = 'clonzeh_lua';

    app.platformServiceSettings.SetStreamer(myUserId, myUserName);
    wait(3);
    app.platformServiceSettings.SetUserJoin(myUserId, myUserName);
    wait(3);
    app.platformServiceSettings.AddMessage(myUserId, myUserName, 'hello test');
    wait(3);
    app.platformServiceSettings.AddMessage(myUserId, myUserName, '!mass jump');
    wait(3);
    app.platformServiceSettings.AddMessage(myUserId, myUserName, '!currency');
    wait(3);
    app.platformServiceSettings.SetFollower(myUserId, true);
    app.platformServiceSettings.SetSubscriber(myUserId, true);
    app.platformServiceSettings.SetModerator(myUserId, true);
    wait(1);
    
    app.platformServiceSettings.PlatformCurrencyDonation(myUserId, myUserName, 50, 1000); 
    --they donated 50, the lifetime total is now 1000

    app.platformServiceSettings.CustomCommandRedemption(myUserId, myUserName, 'Redemption Title Here',
        'extra user input here');
    wait(1);
    app.platformServiceSettings.SetUserLeave(myUserId);
    keepAlive();
end
PreviousgetResolutionNextsetResolution

Last updated 2 years ago

⚙️
📦