Modding Help adding a function to a headpiece

Discussion in 'Starbound Modding' started by bizzy401, Dec 19, 2013.

  1. bizzy401

    bizzy401 Subatomic Cosmonaut

    As many of you already know, I created Night Vision Googles. I would like to add the ability to turn them on and off without taking the headpiece off.(maybe with some form of hotkey). I already downloaded the sound file I would like to use for this, but I am not sure if it is even possible. So if anyone knows a way to apply a function i would be forever grateful.

    Thanks for the help.
     
  2. Black--snow

    Black--snow Cosmic Narwhal

    There isn't any function like this, unfortunately.

    To make matters worse, Lua can't be integrated with items.
     
  3. bizzy401

    bizzy401 Subatomic Cosmonaut

    I figured as much. I wonder if I can at least add a sound file that plays when the item is equipped...
     
  4. Black--snow

    Black--snow Cosmic Narwhal

    You might be able to use ActionOnReap, though I don't know what it actually does. :p
     
  5. bizzy401

    bizzy401 Subatomic Cosmonaut

    Wow, I never heard of that tag...I need to research what that actually does, lol.
     
  6. Nightmares

    Nightmares Scruffy Nerf-Herder

    Code:
      "actionOnReap" : [
        {
          "action" : "sound",
          "file" : "[path/to/file]"
    
        }
    
      ]
     
  7. bizzy401

    bizzy401 Subatomic Cosmonaut

    Thanks, I'll try that.
     
  8. Nightmares

    Nightmares Scruffy Nerf-Herder

    I don't know how you'll have them turn on/off without taking them off until key mapping is available, though. Or a reliable way to tell if you have the item on.
     

Share This Page