+ Reply to Thread
Results 1 to 10 of 10

Thread: Life Support Addon

  1. #1
    Wirererer seth1010's Avatar
    Join Date
    Feb 2008
    Posts
    204

    Default Vgui

    I was thinking of making an addon (non wire related) but I need that console command that allows you to change the model of lifesupport tanks and other spacebuild related entities. I have seen people with nano chips as their storage generators, and I have seen the command line that allows you to do it. With a small model pack that I am working on I would like the opporitunity to use my models ingame.

    Thanks!
    Šeth

    P.S. Tad2020, you worked on spacebuild, you have to know this!
    Last edited by seth1010; 06-14-2008 at 02:43 AM.

  2. #2
    Wirererer Free Fall's Avatar
    Join Date
    Dec 2007
    Location
    Got digitalized and now lives in his PC's RAM
    Posts
    349

    Default Re: Life Support Addon

    Hah! changing Models of those things is just a trick. The STool got an model-CVar, which you can change in console.

    should be
    "energysystems_model <model you want>" for generators
    "life_support_model <model you want>" for the environment stuff
    "receptacles_model <model you want>" for the storage things

    Or you have to edit the Life-Support STool or even make own ones. Making own Life-Support STool is pretty easy, because the RD2 Library contains a command, so it takes most of the work. just look at the code from the existing ones.

    Good luck for your addon
    Needz moar Lua

  3. #3
    Wirererer seth1010's Avatar
    Join Date
    Feb 2008
    Posts
    204

    Default Re: Life Support Addon

    So would the command "receptales_model ty/test.mdl" change the model of all storage devices to test.mdl?

  4. #4
    Wirererer Free Fall's Avatar
    Join Date
    Dec 2007
    Location
    Got digitalized and now lives in his PC's RAM
    Posts
    349

    Default Re: Life Support Addon

    Quote Originally Posted by seth1010 View Post
    So would the command "receptales_model ty/test.mdl" change the model of all storage devices to test.mdl?
    Well, not of all. just for the one you selected. As i said: It's only a trick, and not the normal way. Because every time you click on another entry in the list, the model Client_ConVar is set to the model of it.
    So, if you really want your models in the list, or use them easily, you would have to code a new sent or modify the old ones
    Needz moar Lua

  5. #5
    Wire Noob Xandu's Avatar
    Join Date
    May 2008
    Posts
    9

    Default Re: Life Support Addon

    And changing the model of all storage related ones makes them not work anymore. The size of the container is set by the model of it (lua checks which model it is, then sets the size) So changing the model there won't do you any good unless you set the size of it too which, I believe, can't be done in console.

  6. #6
    Wirererer seth1010's Avatar
    Join Date
    Feb 2008
    Posts
    204

    Default Re: Life Support Addon

    Quote Originally Posted by Free Fall View Post
    Well, not of all. just for the one you selected. As i said: It's only a trick, and not the normal way. Because every time you click on another entry in the list, the model Client_ConVar is set to the model of it.
    So, if you really want your models in the list, or use them easily, you would have to code a new sent or modify the old ones
    I guess I am not doing this right. I used the string in the console and absolutely nothing happened. I was trying to change the model of the large storage cache to a phx block just to test. Knowing nothing more I typed "receptacles_model (the path to the block)" and nothing happened. I must be missing something and I dont understand what you meant by "the one you selected. "

  7. #7
    Wire Noob Xandu's Avatar
    Join Date
    May 2008
    Posts
    9

    Default Re: Life Support Addon

    Once you select storage from the life support menu, and select the storage you want you will get the tool gun which will spawn the selected storage. At the moment you have your tool gun, type one of those lines in console, spawn the storage and it'll have the new model. But do note storage doesn't work after that anymore, generators do work.

  8. #8
    Wirererer seth1010's Avatar
    Join Date
    Feb 2008
    Posts
    204

    Default Re: Life Support Addon

    Quote Originally Posted by Xandu View Post
    Once you select storage from the life support menu, and select the storage you want you will get the tool gun which will spawn the selected storage. At the moment you have your tool gun, type one of those lines in console, spawn the storage and it'll have the new model. But do note storage doesn't work after that anymore, generators do work.
    Thanks a bunch! I tried it and it works. Now for the lua coding...

  9. #9
    Wirererer seth1010's Avatar
    Join Date
    Feb 2008
    Posts
    204

    Default Re: Life Support Addon

    Alright, thanks so much for your help on the last lua help, but now my VGUI has gone horribly wrong! My Test VGUI (made for testing purposes(thats why its small)) will only show up when you are in the menu i.e. when you press esc.

    My code if you want it is here.


    function TestVGUI( )
    local worldpanel = vgui.GetWorldPanel();

    worldpanel:SetVisible( true );
    worldpanel:MakePopup( );

    local frame = vgui.Create( "Frame", worldpanel ); //Create a frame

    Frame:SetSize( 200, 200 ); //Set the size to 200x200
    Frame:SetPos( 100, 100 ); //Move the frame to 100,100
    Frame:SetVisible( true ); //Visible
    Frame:MakePopup( ); //Make the frame
    Frame:PostMessage( "SetTitle", "text", "Vgui Test" ); //Set the title to "This is the title"

    local button = vgui.Create( "Button", frame ); //Create a button that is attached to Frame

    Button:SetText( "Toggle noclip" ); //Set the button's text to "Click me!"
    Button:SetPos( 30, 5 ); //Set the button's position relative to it's parent(Frame)
    Button:SetWide( 100 ); //Sets the width of the button you're making

    function buttonoClick( )
    RunConsoleCommand("noclip"); //This is called when the button is clicked
    self:SetText( "Clicked" ); //Set the text to "Clicked"
    end
    end

    concommand.Add( "testvgui", TestVGUI );
    If you can help me by getting this to pop up on you hud when you type a command in console that would be great.

    Thanks,
    Seth

  10. #10
    Wire Noob snakesvx's Avatar
    Join Date
    Apr 2007
    Posts
    5

    Default Re: Life Support Addon

    Well remove the WorldPanel stuff

    That's probably what's causing it. You don't have to give a parent.

    So: local frame= vgui.Create( "Frame")
    instead of what you got.

    Not sure if it will work, but in all the menu's I made I never used GetWorldPanel().

+ Reply to Thread

Similar Threads

  1. Life Support
    By willthemage in forum Installation and Malfunctions Support
    Replies: 8
    Last Post: 08-20-2008, 02:06 PM
  2. life support water help
    By ony_the_retard in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 06-27-2008, 04:00 AM
  3. Life Support
    By Turbulence in forum Installation and Malfunctions Support
    Replies: 7
    Last Post: 06-19-2008, 12:36 PM
  4. Need help with life support...
    By trey in forum Installation and Malfunctions Support
    Replies: 5
    Last Post: 07-17-2007, 11:13 AM
  5. Life Support Addon help
    By jonzo4000 in forum Installation and Malfunctions Support
    Replies: 2
    Last Post: 04-02-2007, 09:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots