(Solved) DECORATE shotgun consuming two ammo instead of one.

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Post Reply
User avatar
Samarai1000
Posts: 160
Joined: Sun Sep 25, 2016 7:04 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in Canada

(Solved) DECORATE shotgun consuming two ammo instead of one.

Post by Samarai1000 »

I have a terribly-coded (but normally functional) shotgun in my mod, but I've started noticing it's consuming 2 ammo every shot despite its AmmoUse1 property being set to use 1 ammo. Code below, I'll warn you, it's a mess.
https://pastebin.com/ZhSMcJQE
Will give more information if needed, I've never asked for help on these forums before.
Last edited by Samarai1000 on Sun Oct 22, 2017 3:56 pm, edited 1 time in total.
User avatar
Cherno
Posts: 1309
Joined: Tue Dec 06, 2016 11:25 am

Re: DECORATE shotgun consuming two ammo instead of one.

Post by Cherno »

I'd be nice if you just pasted the relevant code here so people don't have to download and open your archive file :)
User avatar
Samarai1000
Posts: 160
Joined: Sun Sep 25, 2016 7:04 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: Somewhere in Canada

Re: DECORATE shotgun consuming two ammo instead of one.

Post by Samarai1000 »

Cherno wrote:I'd be nice if you just pasted the relevant code here so people don't have to download and open your archive file :)
Right, sorry, but I didn't realize pastebin caused downloads? Anyways, I figured it out. A_Spawnitem takes ammo by default and I'm a moron that forgot to set it to not do that. Will delete the thread.
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: (Solved) DECORATE shotgun consuming two ammo instead of

Post by Accensus »

Official ZDoom Community Rules wrote:Don't "blank" your posts. Yes, it is possible to edit your post and delete all the text out of it, but if you're not comfortable with the replies you're seeing to your post, then the most you should do about it is tell a moderator. If your editing question was answered, leave the question up, or else nobody else will be able to find the thread later.
Post Reply

Return to “Scripting”