[Code] Hookshot

Post your example zscripts/ACS scripts/etc here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
Post Reply
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

[Code] Hookshot

Post by jpalomo »

I posted a short video on the WIP thread. I've decided to stop working on it, so I'm releasing it as a resource for others to use. This tries to emulate the loreshot's hardcoded functionality while changing a few things. Here is what is different:
  • The projectile does no damage and will not cause a pain state.
  • The projectile is faster, and disappears shortly after being fired.
  • This will only work on enemies and level geometry. Friendlies and other shootable objects aren't affected.
  • The speed at which it reels you or your target in is a lot lower than Strife's, and is based on the distance from your target. This can be modified in the script.
  • Your target's mass is not considered when calculating the velocity. This can easily be added, but I decided against it to give newbies a chance to figure it out.
This provides no sounds or graphics, but it should work with any IWAD if you provide the necessary resources. It works "as is" with Strife perfectly. Pushing the 'use hook shot' key will fire it, regardless of what weapon you have out. It is bound to 'x' by default. Check the bottom of the controls menu if you have it bound to something else already. Feel free to tear it apart and learn from it. It can be reused without my permission. Some of the ACS functions I used can be found on the [wiki=Other_useful_functions]wiki[/wiki] (more specifically, the distance and gettargetangle functions). The acs source is included, and includes plenty of comments. If you need any help implementing this into your project, please post here or contact me via PM. Enjoy :D

Here is the link: Download

A recent version of ZDoom is required. This will not work with Skulltag or Zandronum.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [Code] Hookshot

Post by Nash »

Nice! :O
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: [Code] Hookshot

Post by amv2k9 »

This is awesome! There are a few issues with it, mostly due to engine eccentricies, like the fact that due to actors having a static size collision box, pulling yourself towards level geometry and making intricate LoZ-style traversal puzzles is going to be frustrating. I'm also going to experiment with this and see if I can find a way to unset +SLIDESONWALLS for a short time as the pull ends; if you hit level geometry at an acute angle, you, well, slide along it, which might not always be desirable behavior.
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

Re: [Code] Hookshot

Post by jpalomo »

Small update with this. I've changed the projectile to use the new +hittracer flag.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: [Code] Hookshot

Post by amv2k9 »

If you have the hookshot projectile inherit from FastProjectile and set the MissileType property to the Loreshot2-inheriting 'bit' actor, more actors will be spawned, creating a much more chain-like effect:
Image
Last edited by amv2k9 on Mon Mar 23, 2015 3:15 pm, edited 1 time in total.
User avatar
Ozymandias81
Posts: 2062
Joined: Thu Jul 04, 2013 8:01 am
Graphics Processor: nVidia with Vulkan support
Location: Mount Olympus, Mars
Contact:

Re: [Code] Hookshot

Post by Ozymandias81 »

@jpalomo
I will surely use this for Batman Doom: Reborn and Gore, properly credits will be added too. And if you refuse, I don't care. :lol: :lol:
User avatar
jpalomo
Posts: 771
Joined: Mon May 17, 2010 9:45 am

Re: [Code] Hookshot

Post by jpalomo »

I've updated the link. There is a sprite available for the trail actor (LoreShot2), and I used amv2k9's suggestion and changed the hookshot to a fastprojectile. I've also added a CVar that can toggle the hookshot on or off (sv_allowhookshot defaults to true). Still no sound effects included and the claw still has no sprites.
DarkkOne
Posts: 258
Joined: Mon Jun 06, 2016 11:26 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Widnows 11
Graphics Processor: nVidia with Vulkan support

Re: [Code] Hookshot

Post by DarkkOne »

Yeah, I know this is ancient, but I tried searching the forum. Is there a newer equivalent / replacement to this out there somewhere? Just a universal drop-in hookshot? I mean, this largely seems to work quite well in my brief testing, but I'm not looking to create mods with it, but rather just use it alongside existing stuff, and I was hoping maybe there's a newer mod like this somewhere with some options. For example, re-hooking in mid-air doesn't seem to do much, and I'd like the option to be able to Bionic Commando my way across spaces as well, etc.

Anyway, just hoping someone out there knows something. :)
Post Reply

Return to “Script Library”