• Problems That Don't Need Their Own Thread v3.0
    5,003 replies, posted
[QUOTE=keeperman;49368426]how does one remove the "weapon category/slots"? or just disable it[/QUOTE] No one?
[QUOTE=keeperman;49374220]No one?[/QUOTE] For the spawn menu? You can edit the files in the sandbox gamemode folder.
[QUOTE=Ylsid;49371315]Having serious problems with PhysicsSimulate. It neither seems to work, nor does it get called on the client- yet it's a shared function, so says the gmod wiki! How else are you supposed to do reliable physics prediction?! Here's the code I'm using [url]http://pastebin.com/YmEEKd6F[/url] I would really appreciate some sanity here, this thing's been driving me bloody nuts[/QUOTE] Call StartMotionController on the server not the client, and in the past I always thought PhysicsSimulate was a serverside function, thats how i've always used it.
[QUOTE=Ylsid;49371315]Having serious problems with PhysicsSimulate. It neither seems to work, nor does it get called on the client- yet it's a shared function, so says the gmod wiki! How else are you supposed to do reliable physics prediction?! Here's the code I'm using [url]http://pastebin.com/YmEEKd6F[/url] I would really appreciate some sanity here, this thing's been driving me bloody nuts[/QUOTE] If you want to use that shared you'll have to create the physics object clientside as well, since PhysicsSimulate is only called for the initial physics object and the ones you add with [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/AddToMotionController]Entity:AddToMotionController[/url] Also keep in mind that prediction with physics objects is kind of hard due to how unpredictable havok is, so even I haven't fully tried physobj prediction with the drive system.
[QUOTE=Kevlon;49374258]For the spawn menu? You can edit the files in the sandbox gamemode folder.[/QUOTE] this [url]https://gyazo.com/2b6c15f9db0c3dd34f2e7d0fb9715895[/url]
[QUOTE=Jvs;49374538]If you want to use that shared you'll have to create the physics object clientside as well, since PhysicsSimulate is only called for the initial physics object and the ones you add with [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/AddToMotionController]Entity:AddToMotionController[/url] Also keep in mind that prediction with physics objects is kind of hard due to how unpredictable havok is, so even I haven't fully tried physobj prediction with the drive system.[/QUOTE] Drive system physobj prediction is what I'm going for, you got it. From a couple of tests I found client physics and server physics seem to behave the same way at least and I imagine some sanity checks to bring things back in line if they go awry might work.
[QUOTE=Shenesis;49376240][img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/GM/HUDShouldDraw]GM/HUDShouldDraw[/url]; hide CHudWeaponSelection[/QUOTE] Merci (think its correct, dunno my french i chose german in school)
Does anyone know the commands to look at players hull and collision boxes? I am scaling the player down some and I need to be able to see the hull boxes correctly so players are not getting stuck underneath other players who are taller than them.
I'm applying a velocity to a player over a set amount of time, in timer.Create, which fires about 10 times. However, if the player has a high ping/low framerate, most of the applied velocity is ignored, and if the client freezes, no velocity is applied at all. How can I force the correct amount of velocity to be applied, even if the client is lagging?
I've been curious for a long time... I know that it's possible to check if a player has a specific game's content loaded (mounted), which is what originally inspired this question. I want to use a model from CS:GO, but I don't want it to be an Error for people who only have CSS or don't have either. Is there a way that I can set it on a BY CLIENT basis, to use a model that said client actually has? EX: MP7? Don't have CS:GO? Use the Half-Life 2 SMG instead. But player 2 has CS:GO so (s)he DOES see the MP7.
[url]https://wiki.garrysmod.com/page/Global/IsMounted[/url]
[QUOTE=zerf;49379439][URL]https://wiki.garrysmod.com/page/Global/IsMounted[/URL][/QUOTE] If I didn't say it, I already know about that function, but I've tried to do this in the past and failed to get it working on a per-client basis. [editline]24th December 2015[/editline] Or rather... at all even. It was a while ago, but iirc there were problems between client and server
I can't read. Just make sure you're running it clientside for each client. Although it is possible they have obtained the game's content in addon form (ie not mounting the game), so perhaps a file.Exists check for the specific files you want to replace is better.
[QUOTE=zerf;49380016]Although it is possible they have obtained the game's content in addon form (ie not mounting the game)[/QUOTE] Not sure if that's 100% legal, but I know it happens. You make a very valid point. I just checked to verify that works on Clientside, and it does. Thanks for the suggestion! Please correct me if I'm wrong, but Garry's Mod itself comes accompanied with Half-Life 2 weapons models? You don't need to have Half-Life 2 specifically to get them? Are Episode 1 and 2 models also included? (for things like the strider buster, for projectiles). Are CSS weapons models always included, or only if mounted? [editline]24th December 2015[/editline] I only ask to be sure I know what's available for final fallback models.
[QUOTE=WalkingZombie;49380270]Not sure if that's 100% legal, but I know it happens. You make a very valid point. I just checked to verify that works on Clientside, and it does. Thanks for the suggestion! Please correct me if I'm wrong, but Garry's Mod itself comes accompanied with Half-Life 2 weapons models? You don't need to have Half-Life 2 specifically to get them? Are Episode 1 and 2 models also included? (for things like the strider buster, for projectiles). Are CSS weapons models always included, or only if mounted? [editline]24th December 2015[/editline] I only ask to be sure I know what's available for final fallback models.[/QUOTE] Only basic CSS/HL2 textures and models are included, such that any [b]default[/b] content in Garry's Mod will function properly. So no, episode 1 and 2 are not included, but base HL2 models are indeed included.
How to force bullets hit model bounding box instead of hitboxes?
[QUOTE=WalkingZombie;49380270]Not sure if that's 100% legal, but I know it happens. You make a very valid point. I just checked to verify that works on Clientside, and it does. Thanks for the suggestion! Please correct me if I'm wrong, but Garry's Mod itself comes accompanied with Half-Life 2 weapons models? You don't need to have Half-Life 2 specifically to get them? Are Episode 1 and 2 models also included? (for things like the strider buster, for projectiles). Are CSS weapons models always included, or only if mounted? [editline]24th December 2015[/editline] I only ask to be sure I know what's available for final fallback models.[/QUOTE] I was under the impression that CS:GO models won't load in Gmod because they were built in a newer version of SourceSDK.
[QUOTE=YourStalker;49381469]I was under the impression that CS:GO models won't load in Gmod because they were built in a newer version of SourceSDK.[/QUOTE] Models + materials from most source engine games work fine. Plug: [URL="https://github.com/zerfgog/gm_mount"]If you want to play around with random games' source engine assets, I recommend gm_mount![/URL]
[QUOTE=TheMostUpset;49380908]How to force bullets hit model bounding box instead of hitboxes?[/QUOTE] Will it not work to just treat all hitboxes the same? So the result is the same no matter where the model in question is hit? Otherwise you're asking for a case where you can shoot empty space nearly a foot (~30 CM) away from someone's shoulder, and still hit them. [b]EDIT[/b] Stupid question I guess; I have Gmod Lua Highlighting for my Notepad++ and it highlights [I]self.Mode[/I] ...What is this? What is it for?
I'm looking to replace the current method of emitting weapons sounds in my base with something that works across the map. The current emitsound only works in a small radius (512 units or 1024 units, idk) when I want it make it work in a larger radius. This system I made makes it so that it makes the sound play close to the player, but at a lower pitch and volume so it makes it sound like it's coming from a distance. This works fine, except for one thing. The thing is that Global Emitsound doesn't replace existing weapon sounds like Ent:Emitsound does so it makes the sounds overlap eachother which is a problem because of how awful it sounds. Any ideas?
[QUOTE=ROFLBURGER;49385847]I'm looking to replace the current method of emitting weapons sounds in my base with something that works across the map. The current emitsound only works in a small radius (512 units or 1024 units, idk) when I want it make it work in a larger radius. This system I made makes it so that it makes the sound play close to the player, but at a lower pitch and volume so it makes it sound like it's coming from a distance. This works fine, except for one thing. The thing is that Global Emitsound doesn't replace existing weapon sounds like Ent:Emitsound does so it makes the sounds overlap eachother which is a problem because of how awful it sounds. Any ideas?[/QUOTE] I found a way around this! Play all sounds [b]clientside[/b]. So tell all clients to emit the sound from the gun, or something like that.
[QUOTE=WalkingZombie;49383226]Otherwise you're asking for a case where you can shoot empty space nearly a foot (~30 CM) away from someone's shoulder, and still hit them.[/QUOTE] Exactly what I'm asking for.
Considering the fact that [I]Vector:Length()[/I] is always positive, I have this little gem of code and I want to find out if a Player is going backwards. [code]local CurVel = self.Owner:GetVelocity() * self.Owner:GetAngles():Forward():GetNormalized()[/code] How can I figure that out? [editline]25th December 2015[/editline] For that matter, at diagonal directions this code doesn't seem to work... I only want a number when the Player is moving forward. [editline]25th December 2015[/editline] And just checking if W is pressed won't work if a Player uses a controller.
[QUOTE=WalkingZombie;49389814]Considering the fact that [I]Vector:Length()[/I] is always positive, I have this little gem of code and I want to find out if a Player is going backwards. [code]local CurVel = self.Owner:GetVelocity() * self.Owner:GetAngles():Forward():GetNormalized()[/code] How can I figure that out? [editline]25th December 2015[/editline] For that matter, at diagonal directions this code doesn't seem to work... I only want a number when the Player is moving forward. [editline]25th December 2015[/editline] And just checking if W is pressed won't work if a Player uses a controller.[/QUOTE] [code] local dir1 = Angle(0, self.Owner:GetVelocity():GetNormalized().y, 0) local dir2 = Angle(0, EyeAngles().y, 0):Forward()*-1 local dot = dir1:Dot(dir2) if dot < 0 then print("Player is going backwards!") end[/code] Adapt that to what you need and give it a whirl.
Ok, I'm being seriously weirded out at the moment. Code that should by all means work, doesn't seem to work. Here are some screenshots to demonstrate and the code: [url]http://i.picpar.com/B5Db.jpg[/url] [url]http://i.picpar.com/C5Db.jpg[/url] [url]http://i.picpar.com/D5Db.jpg[/url] Since gm_video doesn't want to create playable webms, here's what's happening. I spawn the entity through ent_create or spawn menu. I try to move the entity. It has weird sticky behaviour and jerks around, as if the client prop isn't moving but the server is and causing a weird desync. Here's the code. [url]http://pastebin.com/XLqYDueH[/url] I've never had this problem before and I'm absolutely perplexed. In addition, when enabled the PhysicsSimulate (and startmotioncontroller) code does absolutely nothing too.
Got a small problem, my scroll bar doesn't seem to be interacting when you pull it. Setting the vertical scroll bar enabled doesn't seem to fix it, what did I forget to do here? [lua] local ScrollPanel = vgui.Create( "DScrollPanel", Tabss ) ScrollPanel:SetSize( 400, 300 ) ScrollPanel:SetPos( 20, 10 ) local playerList = vgui.Create( "DListView", ScrollPanel ) playerList:SetSize( ScrollPanel:GetWide(), ScrollPanel:GetTall() ) playerList:SetVerticalScrollbarEnabled(true) playerList:SetMultiSelect(true) playerList:AddColumn("Name") playerList:AddColumn("Role") playerList:AddColumn("Credits") for k, v in pairs( player.GetAll() ) do playerList:AddLine(v:Nick(), v:GetNWString("classname"), v:GetNWInt("Credits") ) end [/lua]
[QUOTE=Z0mb1n3;49390506][code] local dir1 = Angle(0, self.Owner:GetVelocity():GetNormalized().y, 0) local dir2 = Angle(0, EyeAngles().y, 0):Forward()*-1 local dot = dir1:Dot(dir2) if dot < 0 then print("Player is going backwards!") end[/code] Adapt that to what you need and give it a whirl.[/QUOTE] [del]You sure about that? y is a specific direction that is not always forward with a velocity. All Normalizing does is convert the vector for 0 to 1 values in each dimension, so if I'm traveling forward on X, Y is not forward...[/del] That's true, but you're speaking Angles. I know nothing about dot products, sadly, but I want left and right to be excluded too, not just backwards... so how would that be represented by a dot product? Would right or left be .5?
[QUOTE=WalkingZombie;49391177][del]You sure about that? y is a specific direction that is not always forward with a velocity. All Normalizing does is convert the vector for 0 to 1 values in each dimension, so if I'm traveling forward on X, Y is not forward...[/del] That's true, but you're speaking Angles. I know nothing about dot products, sadly, but I want left and right to be excluded too, not just backwards... so how would that be represented by a dot product? Would right or left be .5?[/QUOTE] Well, are we talking about moving directly left, right, or backwards? I'm not entirely sure what you're trying to do. Do you want to know which direction someone is going, and label it as left, right, forward, back?
No, that's not what I plan to do, but that's essentially the kind of code I need. A circle is 360 degrees; based on what I read, a dot product result of 0 or less would cut it into 180 degree halves. So... 90 + 90 + 90 + 90 = 360, literally 45 to the left and 45 to the right of forwards is the zone that would be nice... maybe even narrower. The idea is, the Player can only sprint forward, not backwards, not to the sides. I need to know when the player's not heading forward to do that
[QUOTE=WalkingZombie;49391563]No, that's not what I plan to do, but that's essentially the kind of code I need. A circle is 360 degrees; based on what I read, a dot product result of 0 or less would cut it into 180 degree halves. So... 90 + 90 + 90 + 90 = 360, literally 45 to the left and 45 to the right of forwards is the zone that would be nice... maybe even narrower. The idea is, the Player can only sprint forward, not backwards, not to the sides. I need to know when the player's not heading forward to do that[/QUOTE] So basically, as long as the direction of movement is within 45 degrees of the player's :GetForward(), allow sprinting? -nevermind-
Sorry, you need to Log In to post a reply to this thread.