[Code] Iron Sights for Doom

Post your example zscripts/ACS scripts/etc here.

[Code] Iron Sights for Doom

Postby Snarboo » Thu Feb 10, 2011 2:28 am

I haven't seen iron sights implemented in ZDoom yet despite the existence of A_ZoomFactor, so I decided to tackle them myself. I'm uploading this as a code base for others so hopefully this will inspire some of you to add this to your own mods. :)

The mod:
Iron Sights

Some notes about this release:
  • I used Perkristian's Smooth Weapon Animations mod as a base for this one. Phi108 is responsible for the original code, with a few minor additions by yours truly.
  • Only the pistol and shotgun have iron sights.
  • I dabbled with two different iron sight styles: silhouette (as seen in Operation Flashpoint) for the pistol and modern "blurred" sights for the shotgun. Despite the fact that I only spent about five minutes on the blur effect, I'd say the shotgun's iron sights are the strongest of the two.
  • Feel free to use this code in your own projects or as a general base.
  • Please give credit where credit is due: Phi108 was responsible for the base code, while Perkristian created most of the shotgun graphics! I simply extended the code, added the original left handed pistol graphics, and created the iron sights. Crediting me isn't necessary.

Some screenshots:
User avatar
Bacon doesn't know it's not dogs
Joined: 29 Nov 2005

Re: [Code] Iron Sights for Doom

Postby Marisa Kirisame » Thu Feb 10, 2011 8:28 am

That's impressive, man. :)
User avatar
Marisa Kirisame
ZScript Crimester
Joined: 08 Feb 2008
Location: Vigo, Galicia
Discord: 霧雨魔理沙#1666
Twitch ID: magusmarisa
Github ID: OrdinaryMagician
Operating System: Other Linux 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [Code] Iron Sights for Doom

Postby rollingcrow » Thu Feb 10, 2011 11:02 am

I like the blurring effect :D
User avatar
Joined: 03 Mar 2010
Discord: Moon#5126
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: [Code] Iron Sights for Doom

Postby WORrior » Fri Feb 11, 2011 12:17 pm

Wow, glad to see that mod :) I'd just suggest to remove the crosshair while ironsightening.

(And bottom line: I've recently finished implementing such feature to my upcoming groundbreaking/breathtaking/awesome WAD so hope your one won't develop in the same way as mine... since I'm screwed then ;))

EDIT Better late than never: I think you've stated pretty clear that you consider it finished... anyway, great job. Time to snipe some imps!
User avatar
Joined: 04 Oct 2010

Return to Script Library

Who is online

Users browsing this forum: No registered users and 0 guests