The RPG Maker Resource Kit

RMRK RPG Maker Creation => General Tutorials and Eventing => RPG Maker General => Tutorials Database => Topic started by: Forty on June 11, 2007, 03:43:51 PM

Title: Item Box (Want to put those extra potions somewhere?) Tutorial
Post by: Forty on June 11, 2007, 03:43:51 PM
Ok, this tutorial is for having an NPC holding an unlimited ammount of one (or more) item(s)
You will need one variable

Lets say there is a box that can hold all your potions for you
It should look like this

Text: I could store potions in here (this is not necessary, but what the heck)
Text: Put a potion in?
Show Choices:Yes, No
When [Yes]
Conditional Branch: [Potion] in inventory
Change Items: [Potion], - 1
Control Variables: [Potion Ammount] +=1
Else
Text: I don't have any!
Branch End
When [No]
Text: Want to take one out?
Show Choices: Yes, No
When [Yes]
Conditional Branch: Variable: [Potion Ammount] >=1
Change Items: [Potion], +1
Control Variables: [Potion Ammount] -=1
Else
Text: There's none in there!
Branch End
When [No]
Text: Then what am I doing here?
Branch End


If you want to be able to put multiple items in there, add another choice between those items in the beginning, for money, you could have the player put in like 10 gold at a time rather than one. It would take forever
Title: Re: Item Box (Want to put those extra potions somewhere?) Tutorial
Post by: Revo on June 11, 2007, 03:59:18 PM
Hey, that is pretty neat!

Not sure why... But I get a feeling I saw this somewhere else... :-\

Could have been on another site, so good job!
Title: Re: Item Box (Want to put those extra potions somewhere?) Tutorial
Post by: Forty on June 11, 2007, 05:34:13 PM
Thank you, I keep thinking of event systems to use, so...I'll post another after lunch!
Title: Re: Item Box (Want to put those extra potions somewhere?) Tutorial
Post by: Kokowam on June 11, 2007, 07:14:11 PM
Great! Too bad you need one variable for each item stored and for each item storable, you need a choice on the choice thing. And more choices if you exceed 3.
Title: Re: Item Box (Want to put those extra potions somewhere?) Tutorial
Post by: Forty on June 12, 2007, 01:35:47 AM
Yeah...but thats its done...without scripts...scripts and me is a nono