|
| | #1 (permalink) |
| Advanced Member ![]() Join Date: Jul 2008
Posts: 340
![]() | EDIT: Non-CS plasmas and fixed oscilloscope! Okay, I thought I best move this to the Lua coding forum. I'm trying to change the CS plasma screen model to the PHX plasma screen model for various wire screens. The "big" wire screen is pretty small. Here's one problem: http://www.wiremod.com/forum/58848-post12.html Another problem is with the normal screens (the ones that just show a value), I can't find where the models part of the code is. Code: local MaxTextLength = 20
function TOOL.BuildCPanel(panel)
WireToolHelpers.MakePresetControl(panel, "wire_screen")
panel:AddControl("ComboBox", {
Label = "#WireThrusterTool_Model",
Options = {
["#Small tv"] = { wire_screen_model = "models/props_lab/monitor01b.mdl" },
["#Plasma tv"] = { wire_screen_model = "models/prop_phx/sp_screen.mdl" },
["#LCD monitor"] = { wire_screen_model = "models/props/cs_office/computer_monitor.mdl" },
["#Monitor Big"] = { wire_screen_model = "models/kobilica/wiremonitorbig.mdl" },
["#Monitor Small"] = { wire_screen_model = "models/kobilica/wiremonitorsmall.mdl" },
}
})
panel:AddControl( "PropSelect", {
Label = "#WireThrusterTool_Model",
ConVar = "wire_screen_model",
Category = "",
Models = list.Get( "WireScreenModels" ),
Height = 2
})
Code: panel:AddControl( "PropSelect", {
Label = "#WireThrusterTool_Model",
ConVar = "wire_screen_model",
Category = "",
Models = list.Get( "WireScreenModels" ),
Height = 2
})
Last edited by Bobsymalone; 09-20-2008 at 07:53 PM.. |
| | |
| Sponsored Links | |
| | #2 (permalink) |
| COMPLETE BLOODY BASTARD ![]() ![]() | You'd have to do call list.Set to add your new screen to the WireScreenModels list. And then you'd have to worry about the sizes, etc., but I'm sure you'll figure it out.
__________________ “A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.” —Antoine De Saint-Exupery |
| | |
| | #3 (permalink) | |
| Advanced Member ![]() Join Date: Jul 2008
Posts: 340
![]() | Quote:
I'll have to check list.Set on the Wiki. Thanks! EDIT: Actually, it'd probably be more useful to know where the WireScreenModels list is kept. I haven't been able to find it. Last edited by Bobsymalone; 09-16-2008 at 03:45 PM.. | |
| | |
| | #4 (permalink) | |
| COMPLETE BLOODY BASTARD ![]() ![]() | Quote:
Code: //screens
list.Set( "WireScreenModels", "models/props_lab/monitor01b.mdl", {} )
list.Set( "WireScreenModels", "models/props/cs_office/TV_plasma.mdl", {} )
list.Set( "WireScreenModels", "models/props/cs_office/computer_monitor.mdl", {} )
list.Set( "WireScreenModels", "models/kobilica/wiremonitorbig.mdl", {} )
list.Set( "WireScreenModels", "models/kobilica/wiremonitorsmall.mdl", {} )
Code: if self.Entity:GetModel() == "models/props_lab/monitor01b.mdl" then OF = 6.53 OU = 0 OR = 0 Res = 0.05 elseif self.Entity:GetModel() == "models/kobilica/wiremonitorsmall.mdl" then OF = 0.2 OU = 4.5 OR = -0.85 Res = 0.045 elseif self.Entity:GetModel() == "models/kobilica/wiremonitorbig.mdl" then OF = 0.3 OU = 11.8 OR = -2.35 Res = 0.12 elseif self.Entity:GetModel() == "models/props/cs_office/computer_monitor.mdl" then OF = 3.25 OU = 15.85 OR = -2.2 Res = 0.085 RatioX = 0.75 elseif self.Entity:GetModel() == "models/props/cs_office/TV_plasma.mdl" then OF = 6.1 OU = 17.05 OR = -5.99 Res = 0.175 RatioX = 0.57 end
__________________ “A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away.” —Antoine De Saint-Exupery | |
| | |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
|