Foxhead Posted July 14, 2019 How do i Create a Iron-sight (that need to be hold down) on a custom weapon? i Trying to make a Kar98 in doom, with Slade, and i am struggling understanding all those codes :( (I Very new at Coding but i manage to make one custom weapon using the Tutorials from GUNLABS.) File for help:help please - kar98.zip 0 Quote Share this post Link to post
Johnny B. Getgoode (The Guy) Posted July 21, 2019 First of all, NEVER use DECORATE if you can help it. It is deprecated and will no longer see development. ZScript is the newer, and more preferred, approach to coding weapons. Only use DECORATE for backwards compatibility. Attached is a WAD (well, a zip with the WAD in it) with newly implemented iron sight code. The iron sights will only stay up as long as the alt-fire button is held, like you requested. Here's how I did it. -Converted your weapon code to ZScript. You're welcome. -Implemented a custom state that handles the actual bullet called "AltFireShot" -Had the Altfire state check whether the alt-fire button is being held and, if it isn't, go back to Ready. Otherwise, if the player presses the fire button while the alt-fire button is being held, jump to AltFireShot. EZ PZ Lemon Squee-ZScript. Plug the wad into Doom 2, type "Summon Kar98" and have fun. :) KAR98Fixed.zip 2 Quote Share this post Link to post
Foxhead Posted July 21, 2019 Omg thank you so much man, i've being using Decorate but im going to try to understand this zscript format that you say. Thanks again! 0 Quote Share this post Link to post
Johnny B. Getgoode (The Guy) Posted July 22, 2019 18 hours ago, Thfpjct said: Omg thank you so much man, i've being using Decorate but im going to try to understand this zscript format that you say. Thanks again! No problem. This was kind of fun actually. Hadn't really done iron sights myself. A good little test of my abilities, I must say. :3 The ZDoom wiki actually has a guide on how to convert DECORATE code to ZScript. It's mostly syntax differences, but I know from experience that syntax can trip people up. And by "people" I mean "me." XDHere's the guide. Don't have TOO much fun now. :P 1 Quote Share this post Link to post
PWAD Pete Posted July 25, 2019 On 7/21/2019 at 6:36 AM, Johnny B. Getgoode (The Guy) said: First of all, NEVER use DECORATE if you can help it. It is deprecated and will no longer see development. ZScript is the newer, and more preferred, approach to coding weapons. Only use DECORATE for backwards compatibility. That might be good advice if it weren't for the fact that zandronum doesn't support zscript as far as I know, and probably never will. Unfortunately, if you want your mod to be viable for multiplayer, you can't use zscript. 1 Quote Share this post Link to post
Johnny B. Getgoode (The Guy) Posted July 25, 2019 11 hours ago, Seidolon said: That might be good advice if it weren't for the fact that zandronum doesn't support zscript as far as I know, and probably never will. Unfortunately, if you want your mod to be viable for multiplayer, you can't use zscript. That's sort of what I was going for by saying "backwards compatibility", since Zandro is literally just an older version of GZDoom with better multiplayer. Though in retrospect, I should have been more direct about that. OP didn't specifically say he was targeting Zandro, so I assumed he was just going for GZ. So I made an assumption, and again, that's on me. To be fair, though, ZScript is well worth investing in, at least for single-player mods. Maybe even multiplayer as well, when GZ eventually gets C/S support. 1 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.