Modding Help SitCoverImage stacking with image under it.

Discussion in 'Starbound Modding' started by vladvo, Sep 20, 2021.

  1. vladvo

    vladvo Void-Bound Voyager

    I made a car in game. Windows, doors, seats etc. Decorative purpose only. Object file, everything as usual. Windows are 50% transparent. Sitcoverimage has doors and windows. Windows are 50% transparent, as in original image. When I sit in the car cover image is rendered over the original car image. The problem is that windows from original and cover image stack and they become less transparent. Is there an easy way to avoid that without creating animation ?
     
  2. vladvo

    vladvo Void-Bound Voyager

    Well, seems it is impossible without lua.


    function update()
    local occupied = world.loungeableOccupied( entity.id() )
    if occupied then
    animator.setAnimationState("GlassState","open", false)
    else
    animator.setAnimationState("GlassState","closed", false)
    end
    end


    {
    "animatedParts" : {
    "stateTypes" : {
    "GlassState" : {
    "default" : "closed",
    "states" : {
    "closed" : {
    "frames" : 1
    },
    "open" : {
    "frames" : 1
    }
    }
    }
    },

    "parts" : {
    "glass" : {
    "properties" : {
    "centered" : false
    },

    "partStates" : {
    "GlassState" : {
    "closed" : {
    "properties" : {
    "image" : "<partImage>:<color>.closed"
    }
    },

    "open" : {
    "properties" : {
    "image" : "<partImage>:<color>.open"
    }
    }
    }
    }
    }
    }
    }
    }
     
  3. That1Rand0mChannel

    That1Rand0mChannel Industrial Terraformer

    Lua is everything in Starbound Modding, if you haven't learned Lua already, you should eventually start.
     

Share This Page