Weapons With Clips?

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
Thisguyright
Posts: 13
Joined: Fri Nov 14, 2008 9:24 am
Location: For all your hacky DECORATE script needs.
Contact:

Weapons With Clips?

Post by Thisguyright »

How exactly is this done? Can someone explain it to me so I can replicate it as well as giving me an example?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Re: Weapons With Clips?

Post by XutaWoo »

Do you mean reloading? If so, then what kind of reloading?

The kind where you actually have clips and reloading with a near full clip is a waste?

The standard modern FPS style where the weapon is just refilled?

Or shotgun style bullet-by-bullet?
User avatar
Thisguyright
Posts: 13
Joined: Fri Nov 14, 2008 9:24 am
Location: For all your hacky DECORATE script needs.
Contact:

Re: Weapons With Clips?

Post by Thisguyright »

I'm trying to figure out how to do both, shotgun and wasted ammo style, I'm making a total conversion with realism in mind.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed
Contact:

Re: Weapons With Clips?

Post by wildweasel »

I once wrote a tutorial explaining DoomRater's (actually somewhat dated) method with ActionReload over at the DRD forums. Now that custom state labels are supported, you can actually make the reload sequence a hell of a lot less complicated, you'll probably get a lot of use out of looking at the code in this unfinished mod of mine since I put a lot of work into commenting out the code.
User avatar
David Ferstat
Posts: 1113
Joined: Wed Jul 16, 2003 8:53 am
Location: Perth, Western Australia
Contact:

Re: Weapons With Clips?

Post by David Ferstat »

Another way to look at is to consider the number of rounds in a reload sequence, and the ammo capacity of the weapon. For most magazine-fed weapons, the number of rounds in a reload sequence equals the ammo capacity, so you only get to run the reload sequence once before the weapon is fully loaded. However, for, say, a pump-action shotgun, the rumber of rounds in the reload sequence is one, so you simply repeat the sequence until the weapon is full.

If you're going to discard the unused ammo in the weapon on reload, then you simply set the ammo in the weapon to zero, and run your reload sequence. If you're not going to discard, and a reload is actually a top up, then you can simply move the contents of the weapon to your bulk inventory before you reload.
User avatar
Xim
Posts: 2094
Joined: Fri Feb 20, 2009 2:46 pm
Location: somewhere with trees

Re: Weapons With Clips?

Post by Xim »

I believe my [wiki]Xim's Weapon and Enemies WAD[/wiki] has the style of reloading you're looking for Thisguyright. The DECORATE coding isn't the best in the world, but you can check that out too if you want.
User avatar
eliw00d
Posts: 585
Joined: Sun Oct 17, 2004 2:46 pm
Location: Duluth, MN
Contact:

Re: Weapons With Clips?

Post by eliw00d »

I can help, too, I've done quite a bit with reloading. Also, it is magazine, not clip, in most cases. ;)

My reloading usually accounts for rounds in the chamber, if that's something you want.
User avatar
Thisguyright
Posts: 13
Joined: Fri Nov 14, 2008 9:24 am
Location: For all your hacky DECORATE script needs.
Contact:

Re: Weapons With Clips?

Post by Thisguyright »

Thank you all so much! I'm currently on my other computer, but I'll take a look at all these as soon as I can.
Locked

Return to “Editing (Archive)”