• Problems That Don't Need Their Own Thread v2.0
    5,020 replies, posted
[QUOTE=Robotboy655;46898818]A trace downwards + Entity.OBBMins[/QUOTE] The only trouble with that is if the prop is touching the ground not on its lowest point
[QUOTE=Cyrill Jones;46898995]The only trouble with that is if the prop is touching the ground not on its lowest point[/QUOTE] Since it's a bounding box, it will be forced to touch the ground from a corner or a face, so a trace from obbmins going downwards will have a very short length (if not naught, who knows, can always fuck up) so it can be easily compared to determine if the prop touches the ground I don't really see where the problem would be Or maybe I'm dumb and the bounding box is always upright and it's bad who knows
I can't find anything in the search about this. Has anyone seen this error before? Everything works perfectly in SinglePlayer, but in Multiplayer I see this being spammed to the console every couple seconds. It's not giving me a line number or anything. I've put print statements in the functions where I do my [i]net.[/i] operations, and this error doesn't coincide with any of the statements coming through. Yes I've restarted gmod. Everything in SP and MP [i]works[/i] correctly, but I don't know why I'm seeing this in the console. [code]Error: Trying to network unacceptable type (table)Error: Trying to network (receive) unacceptable type (table)[/code]
How do I close the "debugsystemui" thing? I am just trying to see the axes of some ents I am making, but I can't close that menu.
If it is vgui, download and use this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_utilities/concommand_clearvgui.lua[/url] -- then type clearvgui in console. -edit- Hitting escape twice got me out of the debug menu. Trying to close the menu caused a bunch of errors to come up. -snip-
[QUOTE=Acecool;46903988]If it is vgui, download and use this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_utilities/concommand_clearvgui.lua[/url] -- then type clearvgui in console. -edit- Hitting escape twice got me out of the debug menu. Trying to close the menu caused a bunch of errors to come up.[/QUOTE] I can only close it by pressing the "quit" button that pops up. But that quits the game too.
Turns out that my error was the result of something else; anti-cheat with one of my meta-methods while sv_cheats is enabled on the client... go figure. Clear vgui didn't work because the vgui appears to be part of menu-state or something else but hitting escape did close it. So you can't use escape to open main menu, escape again to return to game and it be closed? Which OS are you running? That may have something to do with it. I'm running Windowed mode, Windows 7 64...
Why does using DModelPanel:GetModel() give the following error: [I]attempt to call method 'GetModel' (a nil value)[/I] Using it inside a .DoClick function but it doesn't seem to make a difference. Any help is appreciated.
Try DModelPanel:GetEntity():GetModel().
[QUOTE=TheDoggy;46904616]Why does using DModelPanel:GetModel() give the following error: [I]attempt to call method 'GetModel' (a nil value)[/I] Using it inside a .DoClick function but it doesn't seem to make a difference. Any help is appreciated.[/QUOTE] when creating a dmodelpanel, you need to create it with vgui.create and store it in a variable : mypanel = vgui.Create( "DModelPanel" ) Then, you may call DModelPanel methods on the panel you created : mypanelsmodel = mypanel:GetModel() --for example
Is there a way to get all possible user groups? Or does it differ from each admin mod?
[QUOTE=Bo98;46904792]Try DModelPanel:GetEntity():GetModel().[/QUOTE] Thanks mate, worked fine, maybe the [URL="http://wiki.garrysmod.com/page/DModelPanel/GetModel"]wiki[/URL] should be updated or something because that's what I was using.
Anyone know how to call GM hooks in an addon? I'm trying to override the way TTT stylizes ammo names, so I'm trying to call GM:HUDAmmoPickedUp in the addon to take precedence.
[QUOTE=TheDoggy;46905041]Thanks mate, worked fine, maybe the [URL="http://wiki.garrysmod.com/page/DModelPanel/GetModel"]wiki[/URL] should be updated or something because that's what I was using.[/QUOTE] I will add this function for next version, it only makes sense to have GetModel if we have SetModel [editline]11th January 2015[/editline] [QUOTE=wranders;46905060]Anyone know how to call GM hooks in an addon? I'm trying to override the way TTT stylizes ammo names, so I'm trying to call GM:HUDAmmoPickedUp in the addon to take precedence.[/QUOTE] You can do GAMEMODE:HookName or use hook.Add for this if the hook is called with hook.Call, hook.Run or gamemode.Call.
[QUOTE=LegoGuy;46904998]Is there a way to get all possible user groups? Or does it differ from each admin mod?[/QUOTE] You can set up custom group names so there are an essentially unlimited number of options...
What is the purpose of Velocity in the new drive system and how does it react with Origin? Why not just mess about with Origin, because Velocity only seems to work when Origin is set
Because the cmovedata is not only used for the drive system, the object is also used for the player movement system and valve modifies the origins/velocity in stages ( setupmove, move, finishmove ), so that's why they need to keep track of that stuff all the time.
[QUOTE=Jvs;46905739]Because the cmovedata is not only used for the drive system, the object is also used for the player movement system and valve modifies the origins/velocity in stages ( setupmove, move, finishmove ), so that's why they need to keep track of that stuff all the time.[/QUOTE] Is it possible you could hack together a basic car please? This has me stumped and I might better understand the concept if I saw it done on something other than a noclip
Anyone know why the following code isn't working? [code] if input.IsMouseDown( MOUSE_WHEEL_DOWN ) then print("test") end [/code] It's inside of a think hook and the think hook is correctly running, also tried using: input.IsMouseDown input.WasMousePressed input.WasMouseDoublePressed
[QUOTE=Adzter;46907235]Anyone know why the following code isn't working? [code] if input.IsMouseDown( MOUSE_WHEEL_DOWN ) then print("test") end [/code] It's inside of a think hook and the think hook is correctly running, also tried using: input.IsMouseDown input.WasMousePressed input.WasMouseDoublePressed[/QUOTE]i know this might be a dumb question but it's worth a shot.... Is the think hook clientside?
[QUOTE=Carlton Dance;46907270]i know this might be a dumb question but it's worth a shot.... Is the think hook clientside?[/QUOTE] Yeah, but input.IsMouseDown is a clientside function according to the wiki? EDIT: It's worth noting MOUSE_LEFT and MOUSE_RIGHT work fine.
[QUOTE=Adzter;46907293]Yeah, but input.IsMouseDown is a clientside function according to the wiki? EDIT: It's worth noting MOUSE_LEFT and MOUSE_RIGHT work fine.[/QUOTE]Yeah I was just checking so you didn't have it serverside. So that means the mouse_wheel_down isn't functioning. You should report it to robotboy
<snip> I'm gonna find out myself lol... Is there a way to check if cam.IgnoreZ is already true? I would assume cam.IgnoreZ() would return its own value, but idk if it does.
[QUOTE=Ylsid;46905711]What is the purpose of Velocity in the new drive system and how does it react with Origin? Why not just mess about with Origin, because Velocity only seems to work when Origin is set[/QUOTE] Furthermore, the velocity of the move is set so that next frame it is persistent. If you don't set the velocity and instead just set the origin each frame, you can't have acceleration over time. You would only have linear movement.
[QUOTE=Adzter;46907235]Anyone know why the following code isn't working? [code] if input.IsMouseDown( MOUSE_WHEEL_DOWN ) then print("test") end [/code] It's inside of a think hook and the think hook is correctly running, also tried using: input.IsMouseDown input.WasMousePressed input.WasMouseDoublePressed[/QUOTE] Don't use the Think hook for mouse detection... Use the following hooks: [url]http://wiki.garrysmod.com/page/GM/InputMouseApply[/url] -- This is useful for detecting movement, mousewheel, clicks just like CreateMove with my thirdperson script: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/camera/cl_thirdperson_camera_basics.lua.html[/url] ( basic example to show CreateMove can be used but since InputMouseApply has been added, it makes more sense ) [url]http://wiki.garrysmod.com/page/GM/GUIMouseDoublePressed[/url] [url]http://wiki.garrysmod.com/page/GM/GUIMousePressed[/url] [url]http://wiki.garrysmod.com/page/GM/GUIMouseReleased[/url]
On a current map that I have for my server, it's set to where spawns are random. I dont like this. I want to be able to set my own spawn. I've tried using the darkrp command, "/setspawn [job]" but it would reset every restart. How would I solve this problem? Any help is appreciated.
[QUOTE=Adzter;46907235]Anyone know why the following code isn't working? [code] if input.IsMouseDown( MOUSE_WHEEL_DOWN ) then print("test") end [/code] It's inside of a think hook and the think hook is correctly running, also tried using: input.IsMouseDown input.WasMousePressed input.WasMouseDoublePressed[/QUOTE] [QUOTE=Acecool;46908051]Don't use the Think hook for mouse detection... Use the following hooks: [url]http://wiki.garrysmod.com/page/GM/InputMouseApply[/url] -- This is useful for detecting movement, mousewheel, clicks just like CreateMove with my thirdperson script: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/camera/cl_thirdperson_camera_basics.lua.html[/url] ( basic example to show CreateMove can be used but since InputMouseApply has been added, it makes more sense ) [url]http://wiki.garrysmod.com/page/GM/GUIMouseDoublePressed[/url] [url]http://wiki.garrysmod.com/page/GM/GUIMousePressed[/url] [url]http://wiki.garrysmod.com/page/GM/GUIMouseReleased[/url][/QUOTE] Yeah, MOUSE_WHEEL_DOWN is the scrolling down of the mouse. You can't really HOLD that down, and the chance of it being moved down at any given snapshot in time is minuscule. I think you're looking for MOUSE_MIDDLE. If not, use [url]http://wiki.garrysmod.com/page/GM/InputMouseApply[/url] or [url]http://wiki.garrysmod.com/page/GM/GUIMousePressed[/url] like acecool suggested. [QUOTE=WalkingZombie;46907366]<snip> I'm gonna find out myself lol... Is there a way to check if cam.IgnoreZ is already true? I would assume cam.IgnoreZ() would return its own value, but idk if it does.[/QUOTE] [lua] local oldfunc = cam.IgnoreZ cam.IgnoringZ = false function cam.IgnoreZ(bool) oldfunc(bool) cam.IgnoringZ = bool end [/lua] Then access cam.IgnoringZ to check the value.
Is it possible to restrict the movement of an entity to be completely on two axes instead of three? I want to do make a 2.5D platformer and don't want the player to end up moving towards or away from the screen.
Is there a hook that only runs when the player is fully loaded(since PlayerInitialSpawn runs when they are on the loading screen)?
Not serverside AFAIK. There's the clientside hook InitPostEntity which runs later but I don't know if it's after the loading screen. Why do you need this?
Sorry, you need to Log In to post a reply to this thread.