Making a weapon recharge ammo when below a certain amount?

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
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Making a weapon recharge ammo when below a certain amount?

Post by Snarboo »

Following the advice given in this thread, I would like to make a weapon that recharges it's ammo when below a certain amount, say 20.

So far, I have come up with this:
Spoiler:
Obviously, having 20 A_JumpifInventory's is a bit much, but I'm drawing a blank on how to do it in a simpler way without ACS. If it requires ACS to solve, I would like some simple advice, given I'm an ACS newb. :p

Edit:
Okay, Zippy mentions that you can use a >= operator in Decorate in the thread I linked. How do you do this? Is it as simple as A_JumpifInventory("Ammo",>=20,1)?

Yeah I'm a total newb. :|

Edit 2:
Did a quick test, and apperently it will jump if the value in A_JumpifInventory is greater than or equal to the amount specified. I didn't realize this. Disregard then. :)
Last edited by Snarboo on Mon May 19, 2008 7:06 pm, edited 1 time in total.
Grimm
Posts: 326
Joined: Tue May 11, 2004 7:42 pm

Re: Making a weapon recharge ammo when below a certain amount?

Post by Grimm »

I must admit I have no idea what the hell you're asking. Be more specific, show us some examples, etc.
User avatar
Snarboo
Posts: 2599
Joined: Tue Nov 29, 2005 4:37 am

Re: Making a weapon recharge ammo when below a certain amount?

Post by Snarboo »

I figured it out, so sorry for the confusion.
Locked

Return to “Editing (Archive)”