The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: gaptus on June 18, 2008, 09:20:02 PM

Title: Need a bit of help ( variables...yuck.)
Post by: gaptus on June 18, 2008, 09:20:02 PM
Ok so here's the deal, I wanted to make a quest if u will where a char wants you to collect 10 bat wings which of course is dropped off bats in the forest. Im very new to the program and im not 100% on variables just yet, I know how to make the monsters drop the bat wings but how do i make it where they can only collect 10 bat wings and that he'll only complete the quest if he has 10 wings, and not just 1. I've been trying to figure it out on my own with no luck, help plz =)-
Title: Re: Need a bit of help ( variables...yuck.)
Post by: Ronald Liu on June 18, 2008, 10:35:42 PM
Ok since a variable can let you store a number, here's what you have to do.

If you want the quest to be completed when the hero HAS 10 Bat Wings in his inventory, set a condition that will finish the quest when there is 10 Bat Wings in the hero's inventory.

If you want the quest to be completed when the hero COLLECTS 10 Bat Wings, add +1 to a variable of your choice when the hero collects a Bat Wing. Then set a condition that only activates when that variable is equal or greater to 10.

Unfortunately I don't have RM installed on this computer so I can't get you an actual screenshot.

Basically you need to use a variable to store data (in this case the number of an item) and use a condition. It should look like something like this, I guess.

<>IF there are at least 10 Bat Wings in the inventory,
    <>THEN complete the quest
    <>ELSE "Old man: You need more Bat Wings! Stop fooling around and go kill those Bats already!")
<>END
Title: Re: Need a bit of help ( variables...yuck.)
Post by: ceegamus on June 19, 2008, 12:35:29 AM
I don't believe you can set it to ten items in inventory.
Title: Re: Need a bit of help ( variables...yuck.)
Post by: Ronald Liu on June 19, 2008, 01:16:38 AM
Quote from: ceegamus on June 19, 2008, 12:35:29 AM
I don't believe you can set it to ten items in inventory.

This gentleman is right.

So this is what you should have...

Title: Re: Need a bit of help ( variables...yuck.)
Post by: gaptus on June 19, 2008, 06:46:28 AM
Mhm i think i get what ur saying. How do i go about assigning a variable to an item? Its item 0086 in the database if that has anything to do with it. So i assign a variable to the item then everytime he picks up that certain item he gets +1 to the variable until it hits 10 then he can turn it in and yada yada yada right?
Title: Re: Need a bit of help ( variables...yuck.)
Post by: Ronald Liu on June 19, 2008, 11:13:43 AM
Exactly. ;D And it can be any variable, the item number in the database doesn't matter.