Giter Site home page Giter Site logo

swep_construction_kit's People

Contributors

clavus avatar enderjrv avatar rynoxx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

swep_construction_kit's Issues

Editing worldmodels on the fly?

Hello! What I've been trying to do is create a single melee weapon model that can take on different appearances depending on what item a player has equipped in Pointshop 2. Right now, all I'm trying to do is allow them to choose between several colors of lightsaber, which will only require the skin to be edited.

It works fine for the person who is holding the saber, it always appears to be the right color in both first person and third person modes, but to anyone else who is looking at them it appears to be the default color that I specify.

    local Melee = self.Owner //Code removed here because you have to pay for it. It just 
                             //returns the name of the item in the player's "Melee" slot
    if Melee == nil then
        self.VElements["SaberY"].skin = 5 //The default skin, same as the starting one.
        self.WElements["SaberY"].skin = 5
    else
        if Melee == "Red Lightsaber" then
            self.VElements["SaberY"].skin = 4
            self.WElements["SaberY"].skin = 4
        elseif Melee == "Blue Lightsaber" then
            self.VElements["SaberY"].skin = 0
            self.WElements["SaberY"].skin = 0   
        elseif Melee == "Green Lightsaber" then
            self.VElements["SaberY"].skin = 1
            self.WElements["SaberY"].skin = 1       
        elseif Melee == "Purple Lightsaber" then
            self.VElements["SaberY"].skin = 3
            self.WElements["SaberY"].skin = 3
        end
    end

This is the code I have written to make it change skins, and as stated above it only works for the player actually holding the saber. It's located inside the SWEP:Think() function. I've thrown everything I can think of trying to get it to work, but I just can't get it. Any help you could provide would be appreciated.

Cant Drag Recently Renamed Items

You cant drag position/angle of a newly named item.
It returns to normal if you switch to another element and come back to the recently named one.

(question) Removing sprites

Hi Clavus, you can remove a model from a table on the fly using something like
if CLIENT then for _, v in pairs( self.WElements ) do if v.modelEnt and IsValid(v.modelEnt) then v.modelEnt:Remove() end end end
But is it possible to remove sprites in a similar fashion?

Add support for translucent material overrides on models

When setting up the world models, if you give it a translucent material override then it doesnt draw it correctly. You should draw these from the SWEP:DrawWorldModelTranslucent hook.

I will make a pull request when I have time.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.