Removing a certain amount of a specific item?

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
(I'm sorry I keep on asking questions but I'm moving into unfamiliar territory in my game.)

There's a part in the game where you go into someone's treasure chest and take items out of it, 5 of a weapon you already have, and 10 healing items you already have. It then becomes more of a moral choice thing if you want to go back and return some of the items.

I know how to make the show choices and stuff, but I'm not sure how to work things like input numbers and whatnot, and variables often confuse me.

Basically what I want is if they choose to deposit the weapons, I want a 0 to show up that they can move up or down within a maximum of five; and for the healing items, I want two 0's to show up that they can move up or down within a maximum of 10. For each of these, of course whatever number they choose will affect the amount of each that is removed from their inventory.

Any help would be greatly appreciated.
 

♥SOURCE♥

Too sexy for your party.
Veteran
Joined
Mar 14, 2012
Messages
693
Reaction score
411
Primarily Uses
1. Choose a variable to use (just pick a non used variable number)

2. Input Numbers (choose the number of digits and set the chosen variable to contain the data)

3. Change Items/Change Weapons, chose Decrease and, and set the chosen variable in Operand.

Cheers.
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
1. Choose a variable to use (just pick a non used variable number)

2. Input Numbers (choose the number of digits and set the chosen variable to contain the data)

3. Change Items/Change Weapons, chose Decrease and, and set the chosen variable in Operand.

Cheers.
Um... alright I didn't quite follow that (I'm a visual learner who also learns by example) but I'll give it a go and get back to you.
 

Lunarea

Artist
Global Mod
Joined
Mar 1, 2012
Messages
8,840
Reaction score
7,797
@Koi:

Using 2 variables, commented what I did in the event.

Note that the event will only run if a player has at least one potion in the inventory.



I really encourage you to read up and get a great understanding of variables. It will make eventing much easier. :)
 

Koi

Veteran
Veteran
Joined
Aug 8, 2013
Messages
358
Reaction score
14
First Language
English
Primarily Uses
RMVXA
I think I'm doing it right...

When I playtested it all was working fine. (And yes, bouncey balls and sunflower seeds. The game is based around children.)



However, when it came to the sunflower seeds, which you took 10 of, I used the same conditional branch thing (of course changing it for the sunflower seeds), but made it use 2 digits for the number input so you could go up to 10.

And for some reason it doesn't work for that. Should I just lower it to 9?
 

Lunarea

Artist
Global Mod
Joined
Mar 1, 2012
Messages
8,840
Reaction score
7,797
10 worked fine in the event I posted above.

I think your current method is maybe a little unnecessarily lengthy. By using 2 variables, you eliminate the need of having 10 different conditional branches. You can use \v[x] where x = to the item deposit variable ID in the text, too, which means you won't need to set up a ton of extra conditions. :)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

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.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top