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?
New feature help: Item buying... event or script?
● ARCHIVED · READ-ONLY
-
-
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. -
Interesting. So I should just declare a numerical variable with an item ID to use the register system?
-
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).