The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => Topic started by: Hmorris15 on March 25, 2011, 02:50:19 AM

Title: [XP] Multiple Items for a Collecting Quest.
Post by: Hmorris15 on March 25, 2011, 02:50:19 AM
Hi, long time read and browser of the forums, first time poster.

I've been try to work out how your character can pick up multiples of the one object, say [Herbs] or something similar and have the NCP that asked you to collect them reward you only when you have the certain amount.

I've tried using a condition branch to simply check whether or not that player has that item, but usually bugs, because it can only check one at a time.(And if I made a conditional branch inside another one, the character could use the same single item each time.)

Is using CBs the wrong way to go about this and is there a simple way to it thanks!
Title: Re: [XP] Multiple Items for a Collecting Quest.
Post by: Pokey on March 25, 2011, 07:04:19 AM
Create a parallel proces-Event the following:
Take Control variables
variable = anything you like
Operation = set
Operand = item<item here > in inventory
This checks the amount of whatever in your inventory.
Put a condition in your guy, variable [xxx] == [number you need] or above
then do what you need to do
Title: Re: [XP] Multiple Items for a Collecting Quest.
Post by: Hmorris15 on March 25, 2011, 08:35:13 AM
Thank you!

This has been such an annoying little block.

EDIT: Quick question regarding the Variable.

If I've assigned a variable to an item, that variable will rise and decrease every time that item is added/ taken out of my inventory? In short terms, Variable will always equal to how many of that specific item I have?
Title: Re: [XP] Multiple Items for a Collecting Quest.
Post by: LoganF on March 25, 2011, 10:00:20 AM
Because it's a parallel process, it'll constantly run the event as long as that event appears on the screen. So yes, the variable will always contain the current number of that specific item.

If you only need to check the number of said item when you talk to this NPC, you can just integrate that variable setting into the NPC event itself, so that it assigns the variable once and then checks if you have the required amount of the item or not. It just saves on having the system constantly process a variable assignment when it's probably not going to be changed that often.

If that makes sense.