RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Need a bit of help ( variables...yuck.)

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 85
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 =)-

**
Rep:
Level 85
i liek muscle studyz
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

***
Rep:
Level 86
Yeah... about that.....
I don't believe you can set it to ten items in inventory.
This is a signature.

**
Rep:
Level 85
i liek muscle studyz
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

*
Rep: +0/-0Level 85
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?

**
Rep:
Level 85
i liek muscle studyz
Exactly. ;D And it can be any variable, the item number in the database doesn't matter.
The making of a concept artist > bleh