Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

grapple hook fix, add velocity inheritance #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JJRcop
Copy link

@JJRcop JJRcop commented Aug 1, 2017

Fixes grapple hook to work with HumanoidRootPart
Now dynamically based off of Workspace.Gravity
Projectile inherits Velocity of Handle when fired

Fixed grapple hook trajectory to closely match the old trajectory, I downloaded an old version of studio and an old version of the grapple hook and adjusted numbers until they looked equivalent.

Did not add R15 crouch animation, would like that to happen in the future
StarWars uploaded one to his account, but it will not work for the masses and must be uploaded to the ROBLOX account

@JJRcop
Copy link
Author

JJRcop commented Aug 1, 2017

I will apply these changes to derivative grapple hooks shortly.

Gravity = Workspace.Gravity
GrappleHook.Velocity = (GrappleHook.CFrame.lookVector * (Speed / Mass)) + Handle.Velocity
Force = Create("BodyForce"){
force = Vector3.new(0, ((Gravity * Mass) - Fall), 0),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use Force instead of force.

@@ -675,6 +681,9 @@ function Activated()
Spawn(function()
while CheckIfGrappleHookAlive() and ToolEquipped and CheckIfAlive() do
AdjustRope()
if Workspace.Gravity ~= Gravity and CheckIfForceAlive() then
Force.force = Vector3.new(0, ((Workspace.Gravity * GrappleHook:GetMass()) - Fall), 0)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above: Force instead of force.

@JJRcop
Copy link
Author

JJRcop commented Aug 1, 2017

Complied with @mark-otaris

@@ -628,8 +627,12 @@ function CheckIfGrappleHookAlive()
return (((GrappleHook and GrappleHook.Parent --[[and Rope and Rope.Parent]]) and true) or false)
end

function CheckIfForceAlive()
return (((Force and Force.Parent and Force.Parent == GrappleHook) and true) or falce)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be false, not falce.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

Fixes grapple hook to work with HumanoidRootPart
Now dynamically based off of Workspace.Gravity
Projectile inherits Velocity of Handle when fired
@JJRcop
Copy link
Author

JJRcop commented Aug 1, 2017

Could a staff member either transfer https://www.roblox.com/library/537260400/R15-Crouch to the ROBLOX account, or upload a new one and post it here?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant