Rapid fire question

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
YukiHerz
Global Moderator
Posts: 1503
Joined: Mon Dec 02, 2013 6:01 pm
Graphics Processor: Intel (Modern GZDoom)
Location: Where corruption is redefined daily.

Rapid fire question

Post by YukiHerz »

I have a gun in DECORATE, it normally fires one bullet each click (kinda shitty gun), and then i have an item, as long as the player is holding that item, this gun can use autofire.

My question is, how would i do something like that? a weapon that can Autofire when a certain item is held, if anyone can point me in the right direction.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Rapid fire question

Post by XutaWoo »

[wiki]A_ReFire[/wiki] works regardless of NOAUTOFIRE being set, so you can simply use [wiki]A_JumpIfInventory[/wiki] to jump to an alternate firing state where auto fire is allowed.

Keep in mind, A_JumpIfInventory checks if you have at least a certain amount of an item, so you'll want it to jump to the state where the player has the item, not the other way around.
Locked

Return to “Editing (Archive)”