View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:12 am



Reply to topic  [ 126 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next
 Grappling Gun 
Author Message
User avatar

Joined: Fri May 11, 2007 4:30 pm
Posts: 1040
Location: England
Reply with quote
Post Re: Grappling Gun
Geti wrote:
at least post the code!

tbh I want to use it as a grapple not as a killing device, and I've never been able to rip someones arm of that's attached to a rope (otherwise tug o war would be deadly stuff) however you could still put in if force > 500 (or whatever) then rip ♥♥♥♥ off end


Thu Aug 06, 2009 3:56 am
Profile
User avatar

Joined: Wed Feb 25, 2009 2:45 am
Posts: 346
Location: Funkytown
Reply with quote
Post Re: Grappling Gun
Crashing. Crashing. Crashing.


Thu Aug 06, 2009 4:38 am
Profile
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Grappling Gun
robolee wrote:
Geti wrote:
at least post the code!

tbh I want to use it as a grapple not as a killing device, and I've never been able to rip someones arm of that's attached to a rope (otherwise tug o war would be deadly stuff) however you could still put in if force > 500 (or whatever) then rip ♥♥♥♥ off end
you can still hang off stuff with it. dropships are heavy as hell.


Thu Aug 06, 2009 4:53 am
Profile WWW
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Grappling Gun
robolee wrote:
Geti wrote:
at least post the code!

tbh I want to use it as a grapple not as a killing device.
Boy are you going to be disappointed =P. Just try not to hit them with the grapple from 200+ pixels away (cord snaps at 300). Otherwise, both you and the other are going to bonk heads.

It wouldn't work right with dropships. Although the force on them is small, it updates way too quickly for the thrusters to counter act it. So I stuck an if statement in there so no force is exerted on dropships or rockets.

Here's the code I wrote. Whether Roon adds it to the mod officially is up to him. It does get a little ridiculous if you grapple an enemy from too far away.


Attachments:
Hook2.rar [1.75 KiB]
Downloaded 265 times
Thu Aug 06, 2009 5:32 am
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Grappling Gun
The more naturally feeling force is for a completely different project (Which has also been dubbed 'impossible').
Aveneski, are you shooting it at the seam of the map? Currently the chord does strange things when at the map seam, try shooting somewhere else.


Thu Aug 06, 2009 7:48 am
Profile WWW
User avatar

Joined: Sun Apr 29, 2007 6:11 pm
Posts: 543
Location: The hood
Reply with quote
Post Re: Grappling Gun
there should be buttons for retracting and extending the rope ala Worms.


Thu Aug 06, 2009 1:01 pm
Profile WWW
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Grappling Gun
Roon3 wrote:
The more naturally feeling force is for a completely different project (Which has also been dubbed 'impossible').
Aveneski, are you shooting it at the seam of the map? Currently the chord does strange things when at the map seam, try shooting somewhere else.
Same here. A significant proportion of the time the hook merely dissappears whether impact was achieved or not. I'm definitely not firing over the map's seam either...


Thu Aug 06, 2009 1:06 pm
Profile WWW
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Grappling Gun
Try shooting terrain that's more than 40 pixels away, if it doesn't work, check the console, there might be an error with the hook.
Edit: Try shooting a dropship.


Thu Aug 06, 2009 1:16 pm
Profile WWW
User avatar

Joined: Tue Jul 21, 2009 11:25 am
Posts: 10
Location: Seattle, WA
Reply with quote
Post Re: Grappling Gun
Well, there is a error. It can't find a parent, unless im standing right next to whatever im attempting to grapple too, and sometimes that doesn't even work.

Attached a picture with console and everything.


Attachments:
ScreenDump037.JPG
ScreenDump037.JPG [ 110.03 KiB | Viewed 5487 times ]
Fri Aug 07, 2009 3:36 am
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Grappling Gun
I've had that happen to me a few times. Dunno what's causing it.


Fri Aug 07, 2009 4:40 am
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Grappling Gun
Avenski and Mr.Numbers, try redownloading, if that doesn't work, download the attached file and extract to Grapple.rte (Have it replace Hook.lua). This might fix it, if not fire the gun, open the console and look for "PRINT:Found"


Attachments:
Hook.zip [1.28 KiB]
Downloaded 242 times
Fri Aug 07, 2009 9:03 am
Profile WWW

Joined: Wed Mar 18, 2009 7:36 am
Posts: 7
Location: Clermont-Ferrand, FRANCE
Reply with quote
Post Re: Grappling Gun
Hello!

Roons, I've worked a bit on your mod, and have brought what I think are some improvements:

- Cleaned up, optimized, commented and indented your code
- The line is now an elastic (A bit like that bungee thing in Worms.)
- I've added the adjustable length feature everybody waited for. Press up to decrease and down to increase! And the length prints in the Console when you do that (Default: 200, Max: 400, Min: 300)
- The line pulls on BOTH sides now ( You and your target :grin: ).

I've created some bugs though:
- When grabbing an entity, the rope is displayed twice. I'm too lazy to fix this, sorry.
- When grabbing an entity, if you don't face it, the line disappears.

This is only a minor rework, according to my point of view; in no way am I stealing Kyred's work. All credit goes of course for him!

Have fun!


Attachments:
Grapple.rte.rar [31.65 KiB]
Downloaded 290 times


Last edited by Stophe on Sun Aug 09, 2009 7:24 am, edited 1 time in total.

Fri Aug 07, 2009 12:23 pm
Profile
User avatar

Joined: Fri Aug 22, 2008 6:08 pm
Posts: 170
Reply with quote
Post Re: Grappling Gun
*drooling*

The bugs are worth the changes


Fri Aug 07, 2009 6:07 pm
Profile
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Grappling Gun
Stophe wrote:
Hello!
Kyred, I've worked a bit on your mod, and have brought what I think are some improvements:
It's not my mod. It's Roon's. He wrote the code and made the grappler. I just added a few bug fixes is all.

I'm not the only person on this forum who's good with Lua :wink:


Fri Aug 07, 2009 7:45 pm
Profile
User avatar

Joined: Sun Dec 21, 2008 8:16 am
Posts: 293
Reply with quote
Post Re: Grappling Gun
Am I the only one thinking a Gmod mod of CC?


Fri Aug 07, 2009 8:05 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 126 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 9  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.047s | 15 Queries | GZIP : Off ]