[Vx Ace] Need a Variable Shop

Soul Tech

Time Traveler
Veteran
Joined
Mar 20, 2015
Messages
68
Reaction score
186
First Language
Spanish
Primarily Uses
RMVXA
I need help, I would like to know if there is a way to buy variables, ie a store of variables ...
I do not mean the currency of the game, nor the prices.
In case I was not clear, I refer to a store where you buy an item and when you buy it gives +1 to a specific variable, the item does not remain in the inventory, as if it were consumed instantaneously.
If there is a script (that I have not found) or by means of items in the database, please someone tell me.

Thanks in advance!:kaoslp:
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
219
First Language
English
Primarily Uses
RMVXA
You could event this instead.

Create a variable item, it doesn't have to do anything.
Create a common event; parallel processing.
Have this event check the player's inventory for the item in question.
Remove the item, increase the variable count by 1.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
A parallel event will run that check 60 times a second. How many times a second are you expecting them to open the shop screen and buy these items? Probably 0 times a second for the majority of the game.

Thankfully, if they can only get them through the shop screen, and you have to enter the command to open the shop screen, then you know exactly when they have the opportunity to buy them. So you can just put the commands into the same event and not worry about a common event or parallel processes at all (though a common event would be appropriate if you were going to let them buy from several shops - then you could just do a Call Common Event command from the shop event).

Also, if there's a chance they might buy more than one at a time, alter the above logic to use Control Variables to see how many of the item are in inventory, then use that variable in both the remove items and increase variable commands.
 

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,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top