• What do you need help with? V3
    6,419 replies, posted
Is there a way I can force an area not to render? As in a topdown game when a player walks into a building with a roof can I define the area and position of the room and then write something so nothing gets rendered about height z when in the space? I know that wouldnt work with a model because thats like an all or nothing rendering approach right? but say the ceiling is just one brush. I'm trying to make a top-down cam work with specific maps without having to decompile them and do hacky things with the roofs.
[b] I was wondering if is there a way to make an icon out of a model, like in spawnicon, but instead of using it in Derma, using it in HUD[/b] Because, when you do a re-render of some icon in the spawn menu, a nice icon of it shows in the right bottom corner
But the nice icon is just a panel, aka Derma?
[QUOTE=Chessnut;39130215]But the nice icon is just a panel, aka Derma?[/QUOTE] How do you know if the re-render icon is a derma ?
I'm making a character creation menu, and want the name textbox to only let you have characters and one space (Your name has to be first name, and last name). The current thingie I have this far is string.match(text, "^%a+ %a+$") I can use a space, but then I can't type more letters after using the space. How can I get that shit working?
I need help with having donators get 25% off all items, and 20 points each minute. My pointshop addon: [url]http://www.facepunch.com/showthread.php?t=1228438[/url] Admin mod: ULX
[QUOTE=Persious;39130710]I'm making a character creation menu, and want the name textbox to only let you have characters and one space (Your name has to be first name, and last name). The current thingie I have this far is string.match(text, "^%a+ %a+$") I can use a space, but then I can't type more letters after using the space. How can I get that shit working?[/QUOTE] Something like [code]local firstname, lastname = string.match( text, "^(%w+) (%w+)$" ) if firstname and lastname then -- Valid name else -- Not a valid name end[/code]
Thank you a lot, Divran!
[QUOTE=shadowndacorner;39125708]You could have it check if the player is holding down IN_FORWARD and if their eye angles are above a certain threshold, it pushes them up (depending on how you set up the sticking, it could add velocity or just adjust the Z position of the player).[/QUOTE] Well, what I'm doing is, the primary fire causes them to stick to the wall, secondary shoots a bullet from the SWEP (which I want to be drawn as the ammo I am using, is there a way to do it?). How would I go about making them stick to the wall? MOVETYPE_NONE is not good, since velocity isn't affected no matter what I try when I use that.
I'm not sure if there are any problems here, but I am not posting the entire script for fear of robbery... still, are there any errors? [code]function ENT:PhysicsCollide( data, physobj ) ParticleEffect("FireBallHit",data.HitPos,Angle(0,0,0),nil) -- Hit FX, for whatever it was that we hit... ANYTHING! not air local z = self.Entity:GetAngles() local ballphys = self.Entity:GetPhysicsObject() local coldelta = data.OurOldVelocity:Length() - self.Entity:GetVelocity():Length() local NewVelocityDefault = Angle(45,0,0)*(-64) -- 64 unit speed. if data.HitNormal.z == 0 then -- Regular Bounce self:SetVelocity( NewVelocityDefault ) elseif data.HitNormal.z != 0 then local SurfNorm = data.HitNormal:GetAngle() if SurfNorm.p > 45 or SurfNorm.p < -45 then -- We can't bounce this much! The angle would make us go up too much. self:Remove() return end -- Bounce off an irregular surface. ToDo: Figure the equation in New Super Mario Bros. Wii, and apply it. end end[/code] ...And furthermore, will that give me the correct angle for the Surface that it hit?
I can't get include() and AddCSLuaFile() to work when they are called from inside a function, but they work fine when just in the main code body. Is there any way to fix this? Both give a "file not found" style of error.
[QUOTE=Ziks;39133831]I can't get include() and AddCSLuaFile() to work when they are called from inside a function, but they work fine when just in the main code body. Is there any way to fix this? Both give a "file not found" style of error.[/QUOTE] Just include them all at once like you're supposed to, why would you want to do this?
[QUOTE=Hyper Iguana;39134633]Just include them all at once like you're supposed to, why would you want to do this?[/QUOTE] Let's assume I have a very good reason. Is it possible?
No
Right now, I would just like a report on my [URL="http://www.facepunch.com/showthread.php?t=1237962&p=39134461#post39134461"]projectile code[/URL], as is described within the thread. I can also provide the weapon's code.
[QUOTE=Hyper Iguana;39134966]No[/QUOTE] Why isn't it possible?
Hey all; I had a relatively simple request. I'm looking for a script that I could add to my gamemode that would make the players play [url=http://img.maxofs2d.net/gif/gmod_death_01.gif]an animation on death[/url]. The name of the animation is 'death_01'.
If I want to create an over the shoulder camera, should I be using render.RenderView?
sean for that i would look at how the did the wire cam controller
[QUOTE=Ziks;39135357]Why isn't it possible?[/QUOTE] Don't quote me on this, but in some languages (like PHP) the include statement 'injects' the code into the line you say 'include' at. If you do that in a function, your functions and variables would be defined in a function, rather than at a global scope There's more to it than that, I think in PHP functions become global regardless or something, but either way I'm fairly certain you shouldn't be doing it like that
Hello, I am currently trying to update my SWEP, and it plays music. I would like this music to change to a different song once I am in range of another player. How would I go about doing so?
Don't really need help with anything, just a little question I have. Am I in any way committing an infraction to Garry's Mod copyrights by editing the default sandbox gamemode for use in my server only? Didn't think this needed a new thread.
[QUOTE=JVanover;39135695]Hey all; I had a relatively simple request. I'm looking for a script that I could add to my gamemode that would make the players play [url=http://img.maxofs2d.net/gif/gmod_death_01.gif]an animation on death[/url]. The name of the animation is 'death_01'.[/QUOTE] I'm not sure if this'll work, but try using [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexfd35.html]Entity.ResetSequence [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] inside [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexbdc5.html]Gamemode.PlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. I think the player might turn into a ragdoll before the animation can even begin though, so you might have to do some tricky things. [QUOTE=Sean C;39135854]If I want to create an over the shoulder camera, should I be using render.RenderView?[/QUOTE] I would use [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexa5ae.html]Gamemode.CalcView [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. [QUOTE=Turtle95;39135964]Hello, I am currently trying to update my SWEP, and it plays music. I would like this music to change to a different song once I am in range of another player. How would I go about doing so?[/QUOTE] Try using [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf7e1-2.html]Ents.FindInSphere [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] with the player's position as the vector and then check to see if any of the entities in that table are players. [QUOTE=dj_night;39136032]Don't really need help with anything, just a little question I have. Am I in any way committing an infraction to Garry's Mod copyrights by editing the default sandbox gamemode for use in my server only? Didn't think this needed a new thread.[/QUOTE] Naw, I don't think Garry minds. After all, modding is one of GMod's main aspects.
[QUOTE=Sparky-Z;39136267]I'm not sure if this'll work, but try using [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexfd35.html]Entity.ResetSequence [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] inside [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexbdc5.html]Gamemode.PlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. I think the player might turn into a ragdoll before the animation can even begin though, so you might have to do some tricky things. I would use [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexa5ae.html]Gamemode.CalcView [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]. Try using [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexf7e1-2.html]Ents.FindInSphere [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] with the player's position as the vector and then check to see if any of the entities in that table are players. Naw, I don't think Garry minds. After all, modding is one of GMod's main aspects.[/QUOTE] I tried ents.FindInSphere, but I need the sphere to be in front of the player. Also, can someone tell me how to draw text on all player's screens? (I know I do for i, v in pairs(player.GetAll()) do end but what is it to draw text on their eye trace?)
i got a question i am trying to rope something to the world i got that working by making a fake entity at the point in world but now my rope seams to stretch endlessly why is this constraint.Rope(self.Entity,plug,0,0, LPos1, LPos2,50,1,0,10,"cable/redlaser",false)
[QUOTE=Turtle95;39136320]I tried ents.FindInSphere, but I need the sphere to be in front of the player. Also, can someone tell me how to draw text on all player's screens? (I know I do for i, v in pairs(player.GetAll()) do end but what is it to draw text on their eye trace?)[/QUOTE] You just need some fancy vector work. [lua] local ang = player:GetAngles() local pos = player:GetPos() + ang:Forward() * distInFront for k,v in pairs(ents.FindInSphere(pos, radius)) do if v:IsPlayer() then  //music end end [/lua] I think that should work, didn't test it though. Also, how and where do you want to draw text?
Why won't gmod find my gamemode? I have "MyGamemode" in the gamemodes folder and withing "MyGamemode" folder I have a "gamemode" folder filled with cl_init, init, and shared. What could be wrong?
[URL="http://www.facepunch.com/showthread.php?t=1237962&p=39134461"]I only want help here because last time[/URL], the only helper I had got banned for reasons I don't know, but not because of the help... .
[QUOTE=Sean C;39136634]Why won't gmod find my gamemode? I have "MyGamemode" in the gamemodes folder and withing "MyGamemode" folder I have a "gamemode" folder filled with cl_init, init, and shared. What could be wrong?[/QUOTE] Your gamemode text file. [url]http://wiki.garrysmod.com/page/Gamemode_Creation[/url]
[QUOTE=Sparky-Z;39136574]You just need some fancy vector work. [lua] local ang = player:GetAngles() local pos = player:GetPos() + ang:Forward() * distInFront for k,v in pairs(ents.FindInSphere(pos, radius)) do if v:IsPlayer() then  //music end end [/lua] I think that should work, didn't test it though. Also, how and where do you want to draw text?[/QUOTE] The text I want to appear in random spots on the center of the screen, but readable as a whole word, like an animated intro of text. "He's coming.."
Sorry, you need to Log In to post a reply to this thread.