[Code] Hookshot

Post your example zscripts/ACS scripts/etc here.

[Code] Hookshot

Postby jpalomo » Sat Nov 01, 2014 7:31 pm

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 (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
jpalomo
 
Joined: 17 May 2010

Re: [Code] Hookshot

Postby Nash » Sun Nov 02, 2014 1:25 am

Nice! :O
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [Code] Hookshot

Postby amv2k9 » Tue Nov 04, 2014 9:42 pm

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
amv2k9
That Strife Guy
 
Joined: 10 Jan 2010
Location: Southern California

Re: [Code] Hookshot

Postby jpalomo » Sun Dec 28, 2014 12:23 am

Small update with this. I've changed the projectile to use the new +hittracer flag.
User avatar
jpalomo
 
Joined: 17 May 2010

Re: [Code] Hookshot

Postby amv2k9 » Mon Mar 23, 2015 11:49 am

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
amv2k9
That Strife Guy
 
Joined: 10 Jan 2010
Location: Southern California

Re: [Code] Hookshot

Postby Ozymandias81 » Mon Mar 23, 2015 2:27 pm

@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
Ozymandias81
Doom is a State of Mind... Out of Control.
 
Joined: 04 Jul 2013
Location: Mount Olympus, Mars
Github ID: Ozymandias81
Operating System: Windows Vista/7/2008 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: [Code] Hookshot

Postby jpalomo » Sat May 09, 2015 6:33 am

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.
User avatar
jpalomo
 
Joined: 17 May 2010


Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests