How to save X amount of an Item to a Variable

Status
Not open for further replies.

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
I am hoping to save myself a bit of work.

What I am wanting to do is equal a variable to X amount of an item.  I was trying a few different ways but I kept getting syntax errors so I was hoping maybe someone could help me with this.

An example of what I'm trying to accomplish would be something like this:

Control Variables: [001:Custom.Variable1] = ($data_items[id],amount)

Any help would be appreciated :)
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
why do you use script values at all?


If you only want to know how much of an item the party has in inventory, just control variable : game data : item (X) in inventory


Finish


If you want something else, please explain what you want to do
 

Berylstone

Veteran
Veteran
Joined
Jun 3, 2013
Messages
642
Reaction score
62
First Language
English
Primarily Uses
why do you use script values at all?

If you only want to know how much of an item the party has in inventory, just control variable : game data : item (X) in inventory

Finish

If you want something else, please explain what you want to do
Oh I see.  Well I might can work with that then, ty. I wasn't sure if that option in the game data kept track of the amount of the item also or rather it just checked to see if it was in the inventory.  

What I am wanting to do is let the player input a number then subtract that number from the total amount of the item the player has in their inventory.  It has to do with augmenting gear on my game.  The player collects certain items they can use on gear to increase stats ect. and I want them to be able to use many items at once if they wish so it doesn't get repetitive. 

#EDIT

I was able to get it to work like I wanted just by using the game data like you suggested.  So this ended up being a lot easier than I was expecting.  Thank you much for the help.  Appreciate it. ^^
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.

Forum statistics

Threads
105,868
Messages
1,017,083
Members
137,583
Latest member
write2dgray
Top