Modding Help Changing an Objects Sprite/Image file?

Discussion in 'Starbound Modding' started by lerahk, Mar 2, 2017.

  1. lerahk

    lerahk Scruffy Nerf-Herder

    I'm wondering if it's possible to change the image used by an object with .lua script? For example let's say I have a TV object, and i want it to change to a different channel every time the player activates it thus using a whole different (yet one of the exact same size) sprite sheet for all X number of channels.
     
  2. Ultimate sandvich

    Ultimate sandvich Scruffy Nerf-Herder

    I think this is possible, although I'm not that familiar with scripts yet. But a switch for example, has an on texture and an off texture. Maybe take a look at how that works, and then try to change it so that it does that what you want?

    Actually, while typing this I took a quick look and it might not even be a script, I think it's just an animation file. (I looked at /objects/wired/smallwallswitch/smallwallswitch.object, which refers to the animation /objects/wired/switch/switchtoggle2.animation)
     
  3. IHart

    IHart Scruffy Nerf-Herder

    It does not have to be different sprite sheets, you could put it all in one image file.
     
  4. lazarus78

    lazarus78 The Waste of Time

    You mainly just need an animation file. The only Lua I would think would be necessary at best, would be to change animation states
     
  5. bk3k

    bk3k Oxygen Tank

    Well if you want to see what's possible, check out the mannequin. Heavy use of <tag> switching.
     

Share This Page