Main Menu
  • Welcome to The RPG Maker Resource Kit.

Need a bit of help ( variables...yuck.)

Started by gaptus, June 18, 2008, 09:20:02 PM

0 Members and 1 Guest are viewing this topic.

gaptus

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 =)-

Ronald Liu

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
The making of a concept artist > bleh

ceegamus

I don't believe you can set it to ten items in inventory.
This is a signature.

Ronald Liu

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...

The making of a concept artist > bleh

gaptus

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?

Ronald Liu

Exactly. ;D And it can be any variable, the item number in the database doesn't matter.
The making of a concept artist > bleh