Modding Help (animator?).playSound() confounds me

Discussion in 'Starbound Modding' started by Pixelguru26, Apr 1, 2016.

  1. Pixelguru26

    Pixelguru26 Pangalactic Porcupine

    I'm working on a weapon which will use a few different sounds to indicate its state(s), but I can't figure out how the playSound() function works. My questions are as follows:
    • Is it only a function within the animator table? If not, are there any more useful places to call it from?
    • Where does this function retrieve its sounds from? What format should they be in?
  2. C0bra5

    C0bra5 Oxygen Tank

    answer no 1:
    it is also a part of the tech object but it works the same way it works for the animator table

    answer no 2:
    It pulls off the sound from your .animator file,

    if you would want to play a sound you would have to use this:
    .Animator File:
      "sounds" : {
        "activate" : [ "path to sound file eg: /sfx/tech/tech_blink1.ogg" ]
  3. Pixelguru26

    Pixelguru26 Pangalactic Porcupine

    Ahh, wonderful! thank you!

Share This Page