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.
Question about Variables...

0 Members and 2 Guests are viewing this topic.

***
Hurr durr
Rep:
Level 87
Hamburger? What Hamburger?
I created a NPC who is a salesman who sells items for half of the buy price, except the catch, he appears in the beginning town, 1/7 chance. At the beginning, their just items like Potions, Ethers, and Antidotes..etc...is there way I can regulate the type of items he sells depending on the Player's level/progress?; Using Variables?
Current Project:
Altaria: Deus ex Machina (in progress)

********
Shadow Knight
Rep:
Level 91
Ruin that brick wall!
Project of the Month winner for October 2008
Please.......
Read more tutorials?
Be kind, everyone you meet is fighting a hard battle.

***
Hurr durr
Rep:
Level 87
Hamburger? What Hamburger?
Please.......
Read more tutorials?
>_>
Your not being any help.
Current Project:
Altaria: Deus ex Machina (in progress)

***
Rep:
Level 87
Things we fear the most have already happened 2 us
Of course you can,,that's what CONDITIONAL BRANCH is for.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

***
Hurr durr
Rep:
Level 87
Hamburger? What Hamburger?
Of course you can,,that's what CONDITIONAL BRANCH is for.
What I meant to him was that...
I looked on google, and here for Variable tuts, all of them never explained how to use the Hero's X(Level, EXP, HP, etc...) sub-function, or any uses for it.
Current Project:
Altaria: Deus ex Machina (in progress)

***
Rep:
Level 87
Things we fear the most have already happened 2 us
I assume you are using rpg maker xp.

1) Page 1 command: CONTROL VARIABLES

name the variable #001: HERO level [name can be different,,variable # can be different]
Set it to: ACTOR, select your main hero, then LEVEL

2) Page 1 command: CONDITIONAL BRANCH

Variabe: #001 HERO level
              greater than or equal to
Constant: 40 [checkmark the set handling when conditions do not apply

Call SHOP [add items for level 40 hero]

3) in the ELSE section

Repeat step 2, except make the Constant: 30 [or 20, or 10, or 1]

4) Repeat step 3


I don't want to post the full tutorial with pictures for this.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."

***
Hurr durr
Rep:
Level 87
Hamburger? What Hamburger?
Thanks.
For constant, can I use random numbers instead? Like 1-10, for deciding level range.
Current Project:
Altaria: Deus ex Machina (in progress)

***
Rep:
Level 87
Things we fear the most have already happened 2 us
You can't really set range that way.  If you follow the tutorial,,what happens is this:

IF 40 <= hero_level <=99, then CALL SHOP 1 [Range: 40-99]
ELSE
IF 30<= hero_level <=40, then CALL SHOP 2 [Range: 30-40]
ELSE
IF 20<= hero_level <= 30, then CALL SHOP 3 [Range: 20-30]

etc....

Of course by writing down different constants you create a different range.
"If u'r about to die,,then think of how good ur life has treated u up to this point.  On the
other hand,,if life hasn't treated u good up to this point,,then take joy in the fact that
it's not going to bother u for much longer."