[QUOTE=thegrb93]I don't think so. The player doesn't actually become a ragdoll. The player enters spectator mode which spectates a new entity (ragdoll) and when the player wants to be a player again, the ragdoll is deleted and the player respawns where the ragdoll was deleted.[/QUOTE]
Would it not be possible to transfer the parents over to the ragdoll? Was just thinking it could make for some entertaining things like bungee jumps etc.
Oh crap, it does not deploy the parachute! Help!
[QUOTE=andy1976uk]Would it not be possible to transfer the parents over to the ragdoll? Was just thinking it could make for some entertaining things like bungee jumps etc.[/QUOTE]
You could add some code that will get all entities parented to the person's relative position of the player, set their position relative to the ragdoll and parent them to the torso bone of the ragdoll or whatever bone.
[b]Edit:[/b]
[QUOTE=weaponfreak]Oh crap, it does not deploy the parachute! Help![/QUOTE]
Whatever key makes you sprint should open the chute.
[QUOTE=thegrb93]You could add some code that will get all entities parented to the person's relative position of the player, set their position relative to the ragdoll and parent them to the torso bone of the ragdoll or whatever bone.
[b]Edit:[/b]
Whatever key makes you sprint should open the chute.[/QUOTE]
It's not that I think I downloaded it wrong... I am trying to figure if I put it in addons or in the seperate folders...
The archive is corrupt.
Good for other things than a parachute.
If your server has it, and there are people dying left and right, they might not realize that you are still alive, should you get shot, and turn into a ragdoll while falling off - of a cliff.
-
[QUOTE=thegrb93]You could add some code that will get all entities parented to the person's relative position of the player, set their position relative to the ragdoll and parent them to the torso bone of the ragdoll or whatever bone.
[b]Edit:[/b][/QUOTE]
I can't do Lua. *hint hint* :D
Where do I extract this?
garrysmod/addons
[QUOTE=**Chris**]Looks fine.
[b]Edit:[/b]
Someone has been going through the list of newly added things on Gmod.org and reporting them for no reason, someone needs to do something about it.[/QUOTE]
who has? i didnt know anything about that. who the heck has been doing that?
[QUOTE=johnythekile]who has? i didnt know anything about that. who the heck has been doing that?[/QUOTE]
Why did you bump this thread to reply to a post on the first page, made around 4 months ago?
because he's an idiotic-retard-who-barely-knows-how-to-type
That awesome!i use that when 2 vs 2 battle is on.My friend maked a air plane and and i jump from there to enemy base! :D
Okay, I suck at lua and when I ragdoll, I can barely move. Only when I'm in the air. But, when I go on a server, I can slide along the ground. The server uses 2.2 and so do I. What line of the lua defines the force so I can change it?
Search for
[lua]phys:ApplyForceCenter(Vector(angle.x,angle.y,0)*800)[/lua]
There are two of these and you do the same to each. Increase 800 for more force or decrease it for less force.
Be careful not to add too much force or ragdolls will be able to move while on the ground or falling will become unrealistic.
he's asking so he can move along the ground thegrb
Whatever suits him.
i got a question what is your next project?
Buggy Racing gamemode.
It will be more like mario kart rather then the original buggy racing Jetboom had.
It may be released or not. All I know is that if it isn't released then [BB] will host it.
were do i extract it?(im new)
garrysmod/garrysmod/addons
[QUOTE=humpernaut]were do i extract it?(im new)[/QUOTE]
Facepunch uses a sort of Dictionary system, where it reads your post, and anything misspelled, missing punctuation, missing certain grammatical indications, or containing a word on the block list is marked in red, and a certain amount of points is deducted from your smartness. If you have less smartness than a certain amount, certain features are lost.
You have to have, last I checked, nine (9) smartness to create a thread, meaning that until you post 14 times or fix your post, you will be unable to. You also have to have over forty (40) smartness to send Private Messages.
Any form of grammatical error is counted, even if it's a joke. There are ways around it that I won't discuss, but if used for ban evasion by using it to mask ban words, then the mods will still ban you for using that ban word, and then extend it for evading a ban.
The download link at garrysmod.org isn't working for some reason. Could somebody supply a direct download link for me please?
uf you can you should make it so when you are ragdoll you crawl around, not just glide :P this is awsome!
Is there a way to change the key from shift? I use shift to walk you see...my alt are my xfire, and alt and S is screenshot which means I can't walk backwards...
I have cleared my shift key and it doesn't work...what do I bind it to?
go to ParachuteSource.lua and look for KeyDown(
Change the number in it to your corresponding key that is located in the key enum. The Gmod Wiki should explain it.
I've just been on the Gmod Wiki, couldn't find it. Can you help me some more?
I just noticed that the ropes are rigid. To make the ropes non-rigid (meaning the rope can get bunched up instead of acting like a metal rod), replace the code on lines 52 and 53 of the autorun script, which look like this:
[code]
constraint.Rope( ply.chuteragdoll, chute, 7, 0, Vector(0,0,0), Vector(100,0,-20), 200, 0, 0, 2, "cable/rope", 0 )
constraint.Rope( ply.chuteragdoll, chute, 5, 0, Vector(0,0,0), Vector(-100,0, -20), 200, 0, 0, 2, "cable/rope", 0 )
[/code]
With this:
[code]
constraint.Rope( ply.chuteragdoll, chute, 7, 0, Vector(0,0,0), Vector(100,0,-20), 200, 0, 0, 2, "cable/rope", false )
constraint.Rope( ply.chuteragdoll, chute, 5, 0, Vector(0,0,0), Vector(-100,0, -20), 200, 0, 0, 2, "cable/rope", false )
[/code]
[b]Edit:[/b]
Also, on line 34:
[code]
ragdoll:GetPhysicsObject():ApplyForceCenter(cvel*500000)
[/code]
From what I can tell, that's force applied to the ragdoll which is meant to conserve momentum between the player before they go into freefall and when they are turned into ragdolls. However, that's WAY too much force and sends your ragdoll flying in the direction you were moving when you went into free fall. This seems to be much closer:
[code]
ragdoll:GetPhysicsObject():ApplyForceCenter(cvel*100)
[/code]
[b]Edit:[/b]
I made a few more mods myself (can go up and down, falls much slower, added simple vars), here's the entire code.
[lua]
/*
Parachute Code by Thegrb93 [Kenny]
Feel free to use it as you wish :D
*/
-- a few vars
local chutemass = 10 --self explanatory
local chute_lineardamping = 50 --damping of directional motion
local chute_rotationaldamping = 0 --damping of rotation
local ragdoll_momentum_preserve_force = 100 --when we remove the player and replace them with a ragdoll, this is how much force we should apply to the ragdoll to preserve the momentum of the player originally
local ragdoll_pushforce = 2000 --how much force we apply when the player moves as a ragdoll
hook.Add("KeyPress","Openandreleasechute",
function(ply,key)
if (key==131072) then
if not ply.HasChute then return end
if not ply.ChuteThink then ply.ChuteThink=CurTime() end
if not (ply.ChuteThink<CurTime()) then return end
ply.ChuteThink=CurTime()+1
if not ply.chuteragdoll then
--Make Ragdoll
local phys=ply:GetPhysicsObject()
local cvel=phys:GetVelocity()
local ragdoll = ents.Create( "prop_ragdoll" ) --Thanks Ulyssus for showing me how to mimic the ulx ragdoll command.
ragdoll:SetPos( ply:GetPos() )
ragdoll:SetModel( ply:GetModel() )
ragdoll:SetAngles(Angle(90,ply:GetAngles().y,0))
ragdoll:Spawn()
ragdoll:Activate()
--ragdoll:GetPhysicsObject():SetMass(1)
ragdoll.IsChuteDoll=true
local curweps={}
for k, v in pairs(ply:GetWeapons()) do
table.insert(curweps,v:GetClass())
end
ply.CurWeaponsP=curweps
ply:SetParent( ragdoll )
ply:StripWeapons()
ply:Spectate( OBS_MODE_CHASE )
ply:SpectateEntity( ragdoll )
ply.chuteragdoll = ragdoll
ragdoll:GetPhysicsObject():ApplyForceCenter(cvel*ragdoll_momentum_preserve_force)
else
if ply.ChuteOpen then
--cut the line
chute_make_Normal(ply)
return
end
local chute=ents.Create("prop_physics")
chute:SetPos(ply:GetPos()+Vector(0,0,100))
chute:SetAngles(Angle(0,ply:GetAngles().y,0))
chute:SetModel("models/parachute/chute.mdl")
chute.IsChute=true
chute:Spawn()
chute:GetPhysicsObject():SetMass(chutemass)
chute:GetPhysicsObject():SetDamping(chute_lineardamping, chute_rotationaldamping)
ply.ChuteOpen=true
ply.Chute=chute
ply.chuteragdoll:EmitSound(Sound("ambient/fire/mtov_flame2.wav"),100,100)
local chutelocal, chutelocal2 = chute:GetRight()*40+chute:GetLocalPos(), chute:GetRight()*-40+chute:GetLocalPos()
constraint.Rope( ply.chuteragdoll, chute, 7, 0, Vector(0,0,0), Vector(100,0,-20), 200, 0, 0, 2, "cable/rope", false )
constraint.Rope( ply.chuteragdoll, chute, 5, 0, Vector(0,0,0), Vector(-100,0, -20), 200, 0, 0, 2, "cable/rope", false )
end
end
end)
hook.Add("Think","Addforcetoragdoll",
function()
for k, v in pairs(player.GetAll()) do
if v.chuteragdoll then
if v:KeyDown( 8 ) then
local angle=v:EyeAngles():Forward( )
local phys=v.chuteragdoll:GetPhysicsObject()
phys:ApplyForceCenter(Vector(angle.x,angle.y,angle.z)*ragdoll_pushforce)
end
if v:KeyDown( 16 ) then
local angle=v:EyeAngles():Forward( )
local phys=v.chuteragdoll:GetPhysicsObject()
phys:ApplyForceCenter(Vector(angle.x,angle.y,angle.z)*-ragdoll_pushforce)
end
end
end
end)
function chute_make_Normal(ply)
--Make Player normal
if ply.chuteragdoll then
local pos = ply.chuteragdoll:GetPos()
pos.z = pos.z + 10
ply:SetParent()
ply.chuteragdoll:Remove()
ply.chuteragdoll = nil
ply:Spawn()
timer.Simple(.05,function() ply:SetPos( pos ) end)
ply.HasChute=false
ply.ChuteOpen=false
if ply.Chute then
ply.Chute:Remove()
end
ply.Chute=nil
timer.Simple(.5,function() ply:EmitSound(Sound("npc/combine_soldier/zipline_clip1.wav"),100,100) end)
ply:StripWeapons()
local weptbl=ply.CurWeaponsP
for i=1, #weptbl, 1 do
ply:Give(weptbl[i])
end
end
end
hook.Add("PlayerDeath","PreventGlitches",
function(ply,wep,killer)
if ply.HasChute then
if ply.chuteragdoll then
ply.chuteragdoll:Remove()
ply.chuteragdoll = nil
end
ply.HasChute=false
ply.ChuteOpen=false
if ply.Chute then
ply.Chute:Remove()
end
ply.Chute=false
end
end)
hook.Add("CanTool","PreventToolingOfRagdoll",
function(ply,tr,tool)
local ent=tr.Entity
if ent.IsChuteDoll then
return false
end
end)
hook.Add("PhysgunPickup","DontLetThemPhysgunPeople",
function(ply,ent)
if ent.IsChuteDoll then
return false
end
end)
hook.Add("PlayerDisconnected","DontLeaveShitBehind",
function(ply)
if ply.Chute then
ply.Chute:Remove()
end
if ply.chuteragdoll then
ply.chuteragdoll:Remove()
end
end)
[/lua]
I can't seem to get this to work. It won't deploy.
Sorry, you need to Log In to post a reply to this thread.