- Joined
- Nov 7, 2018
- Messages
- 58
- Reaction score
- 52
- First Language
- C#
- Primarily Uses
- RMMV
Sorry for making another topic so soon, but this all this scripting all so confusing for me!
---
I want to make a shop that updates it's wares based on switches/variables.
Example: if Switch 001 is on, the shop will sell ethers, in addition to it's usual wares(let's say potions and antidotes).
After a LOT of trial and error I figured out how to add items and open a shop through a scriptcall.
Though, I have no clue how I add for example, the switch example.
Or perhaps, a variable that's at least 3 or something.
Furthermore... I'd like to know what I've done there.
I understand most of the code luckily, but I don't understand why I have to use this format for the items, and what the numbers stand for.
I figured out that the first number is the catagory(0 = items, 1 = weapons, 2 = armours). The second number is the ID number.. But what is the third number? I found out that the 4th number has something to do with the shop price(if I leave it empty, all items sell for 0). But it doesn't change anything from normal value, if I set it to 500 or so, so that's weird as well.
Ugh, I hope I make sense.
Anyways, if anyone could help me with the first part at least, that's what matters for me most
Thanks a lot!
---
I want to make a shop that updates it's wares based on switches/variables.
Example: if Switch 001 is on, the shop will sell ethers, in addition to it's usual wares(let's say potions and antidotes).
After a LOT of trial and error I figured out how to add items and open a shop through a scriptcall.
Code:
var shopItems = [[0,1,0,0],[0,2,0,0],[0,3,0,0]];
SceneManager.push(Scene_Shop);
SceneManager.prepareNextScene(shopItems, false);
Or perhaps, a variable that's at least 3 or something.
Furthermore... I'd like to know what I've done there.
I understand most of the code luckily, but I don't understand why I have to use this format for the items, and what the numbers stand for.
I figured out that the first number is the catagory(0 = items, 1 = weapons, 2 = armours). The second number is the ID number.. But what is the third number? I found out that the 4th number has something to do with the shop price(if I leave it empty, all items sell for 0). But it doesn't change anything from normal value, if I set it to 500 or so, so that's weird as well.
Ugh, I hope I make sense.
Anyways, if anyone could help me with the first part at least, that's what matters for me most
Thanks a lot!

