[lua]
SWEP.ViewModelFOV = 64 // How much of the weapon do you see?
SWEP.ViewModel = "models/weapons/v_pistol.mdl";
SWEP.WorldModel = "models/weapons/w_pistol.mdl";
[/lua]
Should do the trick.
[QUOTE=JustSoFaded;38045756][lua]
SWEP.ViewModelFOV = 64 // How much of the weapon do you see?
SWEP.ViewModel = "models/weapons/v_pistol.mdl";
SWEP.WorldModel = "models/weapons/w_pistol.mdl";
[/lua]
Should do the trick.[/QUOTE]
Oh he was asking for models? he said animation..
[QUOTE=zerothefallen;38045766]Oh he was asking for models? he said animation..[/QUOTE]
Oops, I didn't even read his text, just looked at the code (in disgust) and replied with what I thought he wanted to do! Disregard that post.
[QUOTE=Persious;37997065]I'm coding a BHop gamemode, and it's going pretty good so far. I'm only having trouble with one thing:
How the hell can I get the brick entities to stop going down when I jump on them, but instead teleport me back to the "safe-location"?[/QUOTE]
:<
[QUOTE=Persious;38045850]:<[/QUOTE]
If its part of the map you have to edit it. If thats what "brick" entities meant.
Couldnt you do it so if a player lands on a surface (x, y, z) then he'll be teleported to another x y z spot?
[QUOTE=Persious;38045850]:<[/QUOTE]
It really depends on the map. I think you will have to alter their preset inputs, or recreate the entity.
Tell us what map are you trying to use, so we could at least know what entites the map creator used. It is impossible to give an always working, failproof solution.
[editline]15th October 2012[/editline]
For changing inputs, see this page of the wiki: [URL="http://wiki.garrysmod.com/page/Events/Entity/AcceptInput"]Entity:AcceptInput[/URL]
I was wondering how BadKing did the death effect on TTT? You know when you die and the camera is locked at eye level on the ragdoll for 3 seconds. It would be even better if you could tell me what lua file it is in.
**edit**
Can someone also let me know if the derma DRGBBAR and DAlphaBar are broken in gmod13. I can't get the alpha value on the DAlphaBar. And I can't even get the DRGBBAR to show up on my screen, the example on the wiki doesn't seem to work. TYVM!!!
[QUOTE=Swiftone;38046825]I was wondering how BadKing did the death effect on TTT? You know when you die and the camera is locked at eye level on the ragdoll for 3 seconds. It would be even better if you could tell me what lua file it is in.
[/QUOTE]
[url]http://www.garrysmod.org/downloads/?a=view&id=61884[/url]
[editline]15th October 2012[/editline]
Anyone know how to make scripted NPC's? I want to learn how to but all i came across was [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/indexde03.html"]this[/URL] page on the old wiki. If anyone could provide a pastebin of some basic AI that would be really helpful.
Is there anyway to draw stuff on top of DModelPanels? It always draws in front of everything else :(
Apparently calling DListView:AddLine 300 times in GMod 13 causes it to freeze for about 20 seconds...is there any better way to do this?
tyvm Mod7 exactly what i wanted and it worked like a charm.
[QUOTE=MDave;38046377]It really depends on the map. I think you will have to alter their preset inputs, or recreate the entity.
Tell us what map are you trying to use, so we could at least know what entites the map creator used. It is impossible to give an always working, failproof solution.
[editline]15th October 2012[/editline]
For changing inputs, see this page of the wiki: [URL="http://wiki.garrysmod.com/page/Events/Entity/AcceptInput"]Entity:AcceptInput[/URL][/QUOTE]
Current map I'm testing on is bhop_denmark.
Just teleport the player if they go within a certain radius of the entity?
[QUOTE=find me;38044482]OMG I GOT IT! I feel accomplished(: I got the intersection thing exactly how I needed it! Happy camper I am.
Also thanks Divran, I'll definitely give that a look as I'm sure it will come in handy a bit later.[/QUOTE]
Well what did you do? Don't just ask for help and ditch :(
[QUOTE=Drakehawke;38053054]Just teleport the player if they go within a certain radius of the entity?[/QUOTE]
It's a bit hard to explain. Easier if you've tried BHop before.
I have no idea why my sound will not work. It is in the server in /sound/ttt/ghtd.mp3 and whenever I use evolve to play other files in the folder they play fine! Here is the lua file containing the resource.AddFiles.
Keep in mind all the others play. [lua]if SERVER then
AddCSLuaFile("roundsong.lua")
resource.AddFile("sound/ttt/tators.wav")
resource.AddFile("sound/ttt/roundstart.mp3")
resource.AddFile("sound/ttt/roundend.mp3")
resource.AddFile("sound/ttt/ghtd.mp3")
end[/lua]
I know how to print on the screen who you are spectating but i was wondering how would you show whos spectating you?
[QUOTE=JustSoFaded;38045779]Oops, I didn't even read his text, just looked at the code (in disgust) and replied with what I thought he wanted to do! Disregard that post.[/QUOTE]
Nope I was asking for the playermodel to be a zombie model and have its animations.
I need help with IsDamageType. What I'm trying to do is recreate some of the main functions of the HEV suit. I am working on it playing certain sounds when you take certain damage types.
Here is my test code.
[code]if (SERVER) then
function hevmain ( ply,inflictor,attacker,ammount,dmgnfo)
if ply:IsPlayer() and dmginfo:IsDamageType( DMG_POISON ) then
ply:EmitSound("HL1/fvox/minor_fracture.wav")
end
end
end[/code]
Now the problem I am having is when I'm taking that damage type it is not playing the sound I want it to play. As a side note I am making this for Gmod 13.
[QUOTE=jellofacey;38055030]Nope I was asking for the playermodel to be a zombie model and have its animations.[/QUOTE]
Oh, well then on deploy what you want to do is self.Owner:SetModel("zombie/models/path/here"); and then set up the animations properly (Look on the wiki for a full SWEP guide).
[QUOTE=residualgrub;38055218]I need help with IsDamageType. What I'm trying to do is recreate some of the main functions of the HEV suit. I am working on it playing certain sounds when you take certain damage types.
Here is my test code.
[code]if (SERVER) then
function hevmain ( ply,inflictor,attacker,ammount,dmgnfo)
if ply:IsPlayer() and dmginfo:IsDamageType( DMG_POISON ) then
ply:EmitSound("HL1/fvox/minor_fracture.wav")
end
end
end[/code]
Now the problem I am having is when I'm taking that damage type it is not playing the sound I want it to play. As a side note I am making this for Gmod 13.[/QUOTE]
Either change dmginfo:IsDamageType to dmgnfo (See: arguments) or change dmgnfo to dmginfo. Also, do dmgnfo:IsDamageType() == DMG_POISON instead of dmgnfo:IsDamageType( DMG_POISON ).
[QUOTE=Greetings;38055440]Either change dmginfo:IsDamageType to dmgnfo (See: arguments) or change dmgnfo to dmginfo. Also, do dmgnfo:IsDamageType() == DMG_POISON instead of dmgnfo:IsDamageType( DMG_POISON ).[/QUOTE]
Its still not working. :/
[QUOTE=Charrax;38054184]I have no idea why my sound will not work. It is in the server in /sound/ttt/ghtd.mp3 and whenever I use evolve to play other files in the folder they play fine! Here is the lua file containing the resource.AddFiles.
Keep in mind all the others play. [lua]if SERVER then
AddCSLuaFile("roundsong.lua")
resource.AddFile("sound/ttt/tators.wav")
resource.AddFile("sound/ttt/roundstart.mp3")
resource.AddFile("sound/ttt/roundend.mp3")
resource.AddFile("sound/ttt/ghtd.mp3")
end[/lua][/QUOTE]
Not completely sure if this will work, but try putting the files in a different folder. I know that gmod doesn't like downloading custom files inside materials/vgui/ttt/, so it could apply to sound/ttt/ I guess.
Has anyone ever managed to spawn a ragdoll in a pose other than the christ stance?
[lua]
local doll = ents.Create( "prop_ragdoll" )
doll:SetModel( self:GetModel() )
doll:SetPos( self:GetPos() )
doll:SetAngles( self:GetAngles() )
doll:SetCollisionGroup( COLLISION_GROUP_WEAPON )
doll:SetKeyValue( "sequence", ACT_IDLE ) -- this don't seem to work
doll:Spawn()[/lua]
[lua]
-- Maybe try setting the sequence after you spawn it
doll:Spawn()
doll:SetKeyValue("sequence", ACT_IDLE)
-- Or the frame after you spawn it
doll:Spawn()
timer.Simple(0, function()
doll:SetKeyValue("sequence", ACT_IDLE)
end)
[/lua]
[editline]16th October 2012[/editline]
Other than that, I don't know.
I don't even know if you can set a ragdoll's sequence.
[QUOTE=jellofacey;38055030]Nope I was asking for the playermodel to be a zombie model and have its animations.[/QUOTE]
I did this for the fast zombie a while back:
[media]http://www.youtube.com/watch?v=Vp-c_tIg4cU[/media]
[url=http://www.garrysmod.org/downloads/?a=view&id=102962][img]http://www.garrysmod.org/img/?t=dll&id=102962[/img][/url]
Feel free to root around in there to find what you need.
[QUOTE=Bitl;36684782]I'm trying to make a gamemode for Garry's Mod 13, and when I load a map, I get this:
How do I fix this?
EDIT: Never mind.[/QUOTE]
HOW DID YOU FIX IT. please reply. i need to make a game mode that removes some of the backgrounds.
Does anyone know how to use the new _G.EmitSound function?
[lua]local ply = Entity(1)
util.PrecacheSound( "ambient/town_muffled_cry1.wav" )
EmitSound( "ambient/town_muffled_cry1.wav", ply:GetPos(), ply:EntIndex(), CHAN_STATIC, 1.0, 80, 0, 100 )[/lua]
All I could really find about it was in the changelist:
[img]http://puu.sh/1fHlL[/img]
Everytime I try to use it though, all I get out is:
[img]http://puu.sh/1fHmv[/img]
-snip-
Is it possible to make a table of weapons dropped by a specific player when they drop them? I want to make a script where specific weapons are dropped by the player, with no one able to pick them up until I move them (teleport?) to the player so he can pick them up.
The weapons would also have to be removed on the death of the player whether they are on the ground or the player (this is to prevent weapon duping).
Thanks for your help in advance.
[editline]17th October 2012[/editline]
[QUOTE=Delremos;38071467]Does anyone know how to use the new _G.EmitSound function?
[lua]local ply = Entity(1)
util.PrecacheSound( "ambient/town_muffled_cry1.wav" )
EmitSound( "ambient/town_muffled_cry1.wav", ply:GetPos(), ply:EntIndex(), CHAN_STATIC, 1.0, 80, 0, 100 )[/lua]
All I could really find about it was in the changelist:
[img]http://puu.sh/1fHlL[/img]
Everytime I try to use it though, all I get out is:
[img]http://puu.sh/1fHmv[/img][/QUOTE]
Just judging from the error message you got, you probably need to precache the sound in a GM:Initialize function or hook. You have to do the same thing for Network Strings.
Sorry, you need to Log In to post a reply to this thread.