New feature help: Item buying... event or script?

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I am planning on adding a new feature to my game. This has something to do with buying items that is very integral to game progression.

The item buying system I want to do is basically a way to "pick up" items from store shelves and going to the cash register to pay for all of it. However, I want to also put the feature where you could "shoplift" in that when you are caught trying to take something without paying for it, an event will happen (Ie. people will throw you in jail.)

Do I use an event or script?
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,682
First Language
English
Primarily Uses
RMMZ
Depends on how you want to implement it.

If you don't have many items in your game, you could make associate each item to a variable and based on the item's id (example variable for an item = 100 + item Id). When you take an item from the shelf, you add to that variable the amount of items you picked. When going to the register and paying, it adds those items to your inventory and it resets the variables to 0.

The next step (leaving without paying) can be done in many ways. It all depends on how you want to implement it.
 

Veggiebad

Veteran
Veteran
Joined
Nov 27, 2017
Messages
48
Reaction score
1
First Language
English
Primarily Uses
RMVXA
Interesting. So I should just declare a numerical variable with an item ID to use the register system?
 

MushroomCake28

KAMO Studio
Global Mod
Joined
Nov 18, 2015
Messages
3,729
Reaction score
4,682
First Language
English
Primarily Uses
RMMZ
That's one way to do it. Although it would require some eventing, or a small script to add the items to the party (if you don't want to add them individually by event).
 

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,049
Members
137,569
Latest member
Shtelsky
Top