[QUOTE=Netheous;45699285]How is that a risk lol?[/QUOTE]
I suppose it depends on what the object is? Laggy components can cause massive glitchy computer explosions! or at least that's what I've been told.
rbreslow: is there a vmt command
rbreslow: to scale textures down
rbreslow: that are too high res
rbreslow: im using them as decals so i cant do it ingame
[QUOTE=rbreslow;45703989]rbreslow: is there a vmt command
rbreslow: to scale textures down
rbreslow: that are too high res
rbreslow: im using them as decals so i cant do it ingame[/QUOTE]
...Why is your question in instant message format?
Is OnKeyCodePressed only supposed to work on Frames?
I got a custom derma panel that inherits from "Panel" (I tried from several, for example "DPanel" and "EditablePanel" ) and the function just isn't calling, even when SetKeyBoardInputEnabled is enabled (why is there 2 functions that does the same thing? SetKeyboardInputEnabled and SetKeyBoardInputEnabled?)
[code]
local PANEL = {}
function PANEL:Init()
self:SetKeyBoardInputEnabled( true )
end
function PANEL:OnKeyCodePressed( code )
print( "pressed: " .. code )
end
vgui.Register( "DSomePanelName", PANEL, "Panel" )
[/code]
Edit: Forgot to mention, this panel is placed inside a panel whos parent is a DFrame
[code]
DFrame -v
DPanel -v
DSomePanelName
[/code]
Adding the function inside the DFrame works fine, but that's not what I need.
Edit: Fixed it by creating a TextEntry with size 0, 0 as a child of DSomePanelName and redirecting focus to that and using the functions of TextEntry.
[QUOTE=zeaga;45704537]...Why is your question in instant message format?[/QUOTE]
Because I originally asked it on Steam.
Strange question but it doesnt need its own thread, how do I embed Youtube videos onto Facepunch? I've tried Vid and Media tags but nothing seems to work for me...
[url]https://www.youtube.com/watch?v=7GHFk4FRf2E&feature=youtu.be[/url]
-snip-
[QUOTE=Exho;45708503]Strange question but it doesnt need its own thread, how do I embed Youtube videos onto Facepunch? I've tried Vid and Media tags but nothing seems to work for me...
[url]https://www.youtube.com/watch?v=7GHFk4FRf2E&feature=youtu.be[/url][/QUOTE]
Remove the s from https.
Haha... got ninja'd
Anyway, yeah, https:// needs to lose the 'S' and if you don't want to type then you can always just click this button [IMG]http://i.imgur.com/zlXFSFG.png[/IMG] and it will ask you for the link address
but I really think this is the wrong thread?
[QUOTE=Shenesis;45707406]ClientsideModels parented to an entity seem to have some sort of delay if a certain model is also parented:
[vid]http://puu.sh/aUXlz/cb8819e36a.webm[/vid]
The model I used to do this is [B]models/player/items/soldier/cigar.mdl[/B] (which is an effect prop from TF2), but I am sure there are more models out there that can cause this. Is there some kind of flag on those that causes this?[/QUOTE]
Some tf2 models (Specially effects) have their origin too far away from 0,0,0
That makes really hard to bonemerge/attach models that aren't intended to tf2 models, like miscs
Anyway, you can use BonePosition methods for change the position of that origin, so you can attach the model
I've always wondered but never really looked for an answer. What exactly is the purpose of addons/addons.txt and gamemodes/gamemodes.txt ?
[QUOTE=zeaga;45711481]I've always wondered but never really looked for an answer. What exactly is the purpose of addons/addons.txt and gamemodes/gamemodes.txt ?[/QUOTE]
For addons.txt, pretty sure its use is to provide the workshop with addon info.
If you don't post the code, we can't help effectively.
Quick question, how would I remove DarkRP HUD with hook.Remove?
You can disable it. Go to darkrpmodification/lua/darkrp_modules/hudreplacement/ and then open cl_hudreplacement.
What causes the white screen on render?
Sometimes I stuff up rendering and the world goes white.
Figured out and fixed.
[QUOTE=Icejjfish;45712082]You can disable it. Go to darkrpmodification/lua/darkrp_modules/hudreplacement/ and then open cl_hudreplacement.[/QUOTE]
Or you just disable the DarkRP HUD [url=https://github.com/FPtje/darkrpmodification/blob/master/lua/darkrp_config/disabled_defaults.lua]where you are supposed to do so[/url] (line 31). I don't think you should use hook.Remove, every server owner can quickly disable this if they plan on using your add-on, and if it's for private use, even less reason to use hook.Remove, I suppose.
If I create a map with multiple pathways for NPCs/Nextbots and all of them are blocked off but one, will the Nextbox know what to do automatically or will it just sort of get confused?
[QUOTE=NiandraLades;45713093]If I create a map with multiple pathways for NPCs/Nextbots and all of them are blocked off but one, will the Nextbox know what to do automatically or will it just sort of get confused?[/QUOTE]
If they are blocked off by the actual world, they should renavigate. But if something like a prop is blocking it, they will just ignore the prop and try to go through it.
How to make player invisible/clippable to make the illusion that they are dead.
[QUOTE=rbreslow;45713234]How to make player invisible/clippable to make the illusion that they are dead.[/QUOTE]
[url=http://wiki.garrysmod.com/page/Enums/COLLISION]COLLISION_GROUP_IN_VEHICLE[/url]
[QUOTE=zeaga;45711481]I've always wondered but never really looked for an answer. What exactly is the purpose of addons/addons.txt and gamemodes/gamemodes.txt ?[/QUOTE]
The gamemodes.text is used to set up things in the menu: what gamemodes to associate with GM_ or RP_. It can also be used to set up settings the gamemode in the menu, like max props. Launch the game, go to the start a game, click sandbox and notice the settings at the right. Now, go to garrysmod/gamemodes/sandbox/sandbox.text and view it's content. You'll understand.
[QUOTE=Ott;45713272][url=http://wiki.garrysmod.com/page/Enums/COLLISION]COLLISION_GROUP_IN_VEHICLE[/url][/QUOTE]
Got it.
How do I override DTextEntry to not auto scroll when pressing enter and it goes out of the boundaries.
I want to remove the auto scroll all together, including the scrolling with the arrow keys.
It's definitely not a problem, but more so a question:
I've decided to take up learning gLua, but I was wondering if it would be easier to do so on a Linux or a Windows machine? Currently the desktop I would be working on is running Ubuntu 14.04, but I also have the option of switching it over to Windows 8.1. This would be my first code language I'd actually be learning/practicing also.
[QUOTE=Exigent;45713941]It's definitely not a problem, but more so a question:
I've decided to take up learning gLua, but I was wondering if it would be easier to do so on a Linux or a Windows machine? Currently the desktop I would be working on is running Ubuntu 14.04, but I also have the option of switching it over to Windows 8.1. This would be my first code language I'd actually be learning/practicing also.[/QUOTE]
It doesn't really matter, but you may be coding more work arounds on a Linux machine, which can be good for learning.
[QUOTE=AnonTakesOver;45713972]It doesn't really matter, but you may be coding more work arounds on a Linux machine, which can be good for learning.[/QUOTE]
But what about in the long run? Sorry I don't know if you're able to answer this, but like say I want to expand onto other languages after this, would Linux/Ubuntu still be an ideal OS for learning other languages like Java, C#, C++, etc.?
[QUOTE=Exigent;45714017]But what about in the long run? Sorry I don't know if you're able to answer this, but like say I want to expand onto other languages after this, would Linux/Ubuntu still be an ideal OS for learning other languages like Java, C#, C++, etc.?[/QUOTE]
Java can run on [I]any[/I] platform! :suicide: (Programming jokes for days about this...)
C# is pretty much Win only, sans Mono.
I'd do Linux since you can pretty much go from Linux to any other environment and work, whereas Windows to Linux will bring you more obstacles.
[QUOTE]Saying Java is good because it works on all platforms is like saying anal sex is good because it works on all genders.[/QUOTE]
[quote][IMG]http://i.imgur.com/NtwRyXk.png[/IMG]
They forgot to give Java its own caricature, along with the text.
Java can do all the things the others can do...
<java personification here>
And it has the downsides of all of them![/quote]
[QUOTE=Revenge282;45714112]Java can run on [I]any[/I] platform! :suicide: (Programming jokes for days about this...)
C# is pretty much Win only, sans Mono.
I'd do Linux since you can pretty much go from Linux to any other environment and work, whereas Windows to Linux will bring you more obstacles.[/QUOTE]
Your microwave is probably running Java... ( check it, it essentially runs on anything )
[QUOTE=Exigent;45713941]It's definitely not a problem, but more so a question:
I've decided to take up learning gLua, but I was wondering if it would be easier to do so on a Linux or a Windows machine? Currently the desktop I would be working on is running Ubuntu 14.04, but I also have the option of switching it over to Windows 8.1. This would be my first code language I'd actually be learning/practicing also.[/QUOTE]
To become a good developer you need to really understand a few principles, languages come second. The more you know and understand, the easier it'll be to pick up new languages.
For your OS choice, Windows may be the better choice ( autorefresh out of the box without needing to create your own work-around which needs to be executed in the console each time, which could be faster by only refreshing the one file that was updated but that's beside the point )... If your code is to be run on a Linux server, understand that Linux treats uppercase and lowercase characters as completely different characters ( technically they are ), so ensure you adopt some standard but keep all filenames lowercase.
There are a lot of resources out there to use, find them and use them! Here is a wall of text that'll hopefully help:
[B]Notepad++ upgrades[/B]
How to install the Syntax Highlighting XML:
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/notepadpp_highlighting/installing_gmod_lua_text_highlighting.lua.html[/url]
Garry's Mod Notepad++ Lua Syntax Highlighting:
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/notepadpp_highlighting/GmodLua.xml[/url]
If you want other nice features, replace these in the %appdata%\notepad++ config or plugin dir:
This adds DarkRP wiki search, Old and new Garry's Mod Wiki search, and a macro called Trim trailing and save ( removes blank space at end of line and saves file; super useful )
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/shortcuts.xml[/url]
This edits to add default Lua syntax highlighting built-in
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/functionList.xml[/url]
This changes the right-click menu to be useful ( for my purpose, but it is easy to change )..
[url]https://dl.dropboxusercontent.com/u/26074909/_dev_tools/contextMenu.xml[/url]
> denotes sub-menu / menu open with tab-indent to show contents and de-dent to go back to parent
[B]Menu changed slightly[/B]
[code]Right click >
Save [ Trim Trailing ]
Export to HTML
--------------------
Reload File
Open Current Files' Folder
--------------------
Garry's Mod Wiki Search
Garry's Mod Old Wiki Search
Garry's Mod DarkRP Wiki Search
Search Google
--------------------
Edit >
Cut
Copy
Paste
Delete
--------------------
Select ALL
--------------------
UPPERCASE
lowercase
--------------------
Hide Lines
--------------------
Text Highlighting >
Clear All Styles
--------------------
Using 1st Style
Using 2nd Style
Using 3rd Style
Using 4th Style
Using 5th Style
--------------------
Clear 1st Style
Clear 2nd Style
Clear 3rd Style
Clear 4th Style
Clear 5th Style
--------------------
Plugin Commands >
Open Color Picker
--------------------
Base64 Encode
Base64 Decode
--------------------
ASCII -> HEX
HEX -> ASCII
--------------------
Open Plugin Manager
--------------------
[/code]
[B]And if you're looking for something to get you right into development, ie drag and drop files and reload ( but look at base, terrortown, sandbox, darkrp, or whatever game-modes out there to get a feel )[/B]:
If you want something to make development easier use this: [url]https://bitbucket.org/Acecool/acecooldev_base/src/[/url]
rename the folder, the txt file, and the name at the top of the txt file in quotes. Then, drag and drop files.
You can create the folder structure by typing install in console; or download and extract this in the gm folder: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/acecooldev_base_folder_struct.rar[/url]
Folder structure: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/acecooldev_base/documentation/folder_structure_and_how_to_use_it.txt[/url]
File loading options: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_redistributable/acecooldev_base/documentation/file_recursive_inclusions.txt[/url]
Basically, client/ server/ and shared/ folders update the realm state in the recursive loading function meaning when one of those folders is opened, they will load in the relevant realm unless the filename contains information telling it to load into a different realm or not at all ( x_*.lua, _x_*.lua and _x.lua )..
maps/ folders load maps/<map_name>/* on OnReloaded and InitPostEntity so that if you spawn entities, it won't change the EntIndex value of map entities so that a hash-map can be used to remove existing entities with this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/entities/entity_getid_mapping_system.lua.html[/url]
This is my game-mode and how files are loaded: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_file_structure/files_order.txt[/url]
Take note as to what was said above and look at files changing the realm they're loaded in on the fly in a shared/ folder.
[code][32] = [SHARED] :: gamemode/shared/classes/elevator/_sh_elevator.lua
[33] = [CLIENT] :: gamemode/shared/classes/elevator/cl_elevator.lua
[34] = [SERVER] :: gamemode/shared/classes/elevator/sv_elevator.lua
[35] = [SHARED] :: gamemode/shared/classes/jobs/_class_jobs.lua
[36] = [SERVER] :: gamemode/shared/classes/jobs/_sv_class_jobs.lua
[37] = [SHARED] :: gamemode/shared/classes/networking/_sh_networking.lua
[38] = [CLIENT] :: gamemode/shared/classes/networking/cl_networking.lua
[39] = [SERVER] :: gamemode/shared/classes/networking/sv_networking.lua
[40] = [SHARED] :: gamemode/shared/classes/npc/_sh_npc.lua
[41] = [CLIENT] :: gamemode/shared/classes/npc/cl_npc.lua
[42] = [SERVER] :: gamemode/shared/classes/npc/sv_npc.lua
[43] = [SHARED] :: gamemode/shared/classes/class_bullets.lua
[44] = [SHARED] :: gamemode/shared/classes/class_card.lua
[45] = [SHARED] :: gamemode/shared/classes/class_cards.lua[/code]
It just makes it easier to group like files together and load it into a specific realm.
Unlimited folder nesting is supported.. It is as easy and dragging and dropping files into folders.
Also, you can disable auto-refresh with the autoloader; just type loadgm to refresh the game-mode. If you add a new file, type loadgm and save the new file once to have it detected ( with autorefresh on ). It works in Linux too, without autorefresh! I'll be adding a lot of things to the bitbucket such as helper-functions, wrappers, metatable objects / "classes", etc... Basically, it makes it easy to make a new game-mode by providing a lot of the building blocks, or with the simple system ( just using the auto-loader ) to make file-loading easy without having to mess with AddCSLuaFile or include functions.
[B]And some helpful threads:[/B]
Hey, welcome to FacePunch. This forum is for devs that need help working on things. Here are some resources to help you get started:
----------------------------------------------
General Learning Lua Help Thread ( Contains links to helpful topics, and websites ): [url]http://facepunch.com/showthread.php?t=1337945[/url]
Problems that don't need their own thread ( All simple questions / quickies should go here, but please do not post a question here AND make a new topic.. ): [url]http://facepunch.com/showthread.php?t=1411111[/url]
OLD Probl
[video=youtube;MWa_EggDLN0]http://www.youtube.com/watch?v=MWa_EggDLN0[/video]
EDIT:
For some reason it never updated my post...
[url]https://github.com/Facepunch/garrysmod-issues/issues/1424[/url]
RenderTargets are broken. :l
Sorry, you need to Log In to post a reply to this thread.