×
Create a new article
Write your page title here:
We currently have 276 articles on Waste Of Space Wiki. Type your article name above or create one of the articles listed here!



    Waste Of Space Wiki

    Speaker: Difference between revisions

    Content added Content deleted
    No edit summary
     
    (2 intermediate revisions by 2 users not shown)
    Line 2: Line 2:
    |title1 = {{PAGENAME}}
    |title1 = {{PAGENAME}}
    |image1 = WosSpeaker.png
    |image1 = WosSpeaker.png
    |type = Programming
    |type = Electrical
    |uses = Store and retrieve the data as DataStore
    |recipe = {{#invoke:GetPartInfo|getField|Recipe}}
    |recipe = {{#invoke:GetPartInfo|getField|Recipe}}
    |raw_recipe = {{#invoke:GetPartInfo|getField|Raw recipe}}
    |raw_recipe = {{#invoke:GetPartInfo|getField|Raw recipe}}
    |malleability = {{#invoke:GetPartInfo|getField|Malleability}}
    |malleability = {{#invoke:GetPartInfo|getField|Malleability}}
    |durability = {{#invoke:GetPartInfo|getField|Durability}}
    }}
    }}


    Line 17: Line 17:
    *Speaker:Chat(string message)
    *Speaker:Chat(string message)


    ==Example:==
    ==Example==
    <syntaxhighlight lang="lua" line="1">
    <syntaxhighlight lang="lua" line="1">
    local Speaker = GetPartFromPort(1, "Speaker")
    local Speaker = GetPartFromPort(1, "Speaker")
    Line 27: Line 27:
    ''"Plays audio of length up to 5 seconds, unless it is powered in which case it can play a full audio. When clicked or triggered, it will toggle playing music and will play the song id you give it.''
    ''"Plays audio of length up to 5 seconds, unless it is powered in which case it can play a full audio. When clicked or triggered, it will toggle playing music and will play the song id you give it.''


    {{#invoke:GetPartInfo|getField|Description}}
    ''Speaker:LoadSound(Soundid) will return a Sound object. A Sound object can be modified using properties Soundid, Looped, PlaybackSpeed, Pitch, TimePosition and the methods Play, Pause, Stop, Destroy."''


    ==Misc==
    ==Misc==

    Latest revision as of 19:21, 18 March 2022

    Speakers can play audio much like Boomboxes. Speakers will still play 5 seconds of the audio even when unpowered. Pitch can be changed. Also has a Chat function which shows a bubble chat above the speaker.

    Programming[edit | hide all | hide | edit source]

    • Speaker:PlaySound(soundId)
    • Speaker:LoadSound(soundId)
    • Speaker:ClearSounds()
    • Speaker:Chat(string message)

    Example[edit | hide | edit source]

    local Speaker = GetPartFromPort(1, "Speaker")
    
    Speaker:Chat("hello!") --Bubble chat above speaker
    

    In-game description[edit | hide | edit source]

    "Plays audio of length up to 5 seconds, unless it is powered in which case it can play a full audio. When clicked or triggered, it will toggle playing music and will play the song id you give it.

    "Plays audio of length up to 5 seconds, unless it is powered in which case it can play a full audio. When clicked or triggered, it will toggle playing music and will play the song id you give it. Speaker:LoadSound(SoundId) will return a Sound object A Sound object can be modified using properties SoundId, Looped, PlaybackSpeed, Pitch, TimePositionand the methods Play, Pause, Stop, Destroy"

    Misc[edit | hide | edit source]

    Default size is 2x2x2, but you can resize it. The bigger it is the louder it will sound.

    Configurable[edit | hide | edit source]

    • Audio
    • Pitch

    Gallery[edit | hide | edit source]

    Speaker chat bubble
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.

    Recent changes

  • Axenori • 3 days ago
  • Voivsone • 4 days ago
  • Axenori • 4 days ago
  • Axenori • 5 days ago
  • Cookies help us deliver our services. By using our services, you agree to our use of cookies.