Was it useful?

  • Yes

    Votes: 3 75.0%
  • No

    Votes: 1 25.0%

  • Total voters
    4

FoxySeta

Cleric, script kiddie and fudanshi
Regular
Joined
May 6, 2017
Messages
270
Reaction score
117
First Language
Italian
Primarily Uses
RMMV
Tutorial topic: how to let the player have a variable amount of money at their disposal
Brief description
Even if I'm not into tutorials about something an extension/studying documentation could do just fine, I've recieved an offer for doing this, so… here comes nothing. Check this tutorial if you'd like to let your player's action influence their amount of money.

Template used for this tutorial: Sample Scripted-based UI, 720 x 1280 (my patron wants to develop a mobile game)
Requirements
  • Having read the Beginner's Guide. I can't help you either otherwise.​

Tutorial body
  • Giving the player an initial amount of money (not necessary)
    1. First, let's decide which kind of variable we should use for storing the current amount of money. It is obviously bound to be a number variable, and since we may need to use it at any point of the game it should also be global.​
    2. Here's a possible setup:
      Setup 0.PNG Screenshot 0.PNG Setup 0.PNG
  • Setting up your common events (in the database)
  1. Go to the Database's "Common Events" section and create three new records called "Show current money", "Change money amount" and "Hide current money"​
  2. Set them up like this (pay attention: copy both the parameters and the scene content):
    Setup 1.PNG Setup 2.PNG Setup 3.PNG
  3. If you want to customize these common events at your heart's content, this is the good time to do it​
  4. Please note that "Change money amount" ADDS Factor to Money, so if you want to make the player pay for something instead of getting paid, pass a negative number as parameter​
  5. If for some reason the player's money amount goes under 0, the first common event automatically sets it to zero. Still, you should check if the player has enough money before letting them buy something anyway.​
  • Setting up your scene (in the scene editor)
  1. Here's a possible setup:
    Setup 4.PNG Setup 5.PNG
Patron: @Valadilene
 

Latest Threads

Latest Posts

Latest Profile Posts

MZ_HUD_1.png

Accomplished a longstanding goal: transitioned from windowskin graphics to native canvas drawing for windows. No more window.png or resizing individual mask images; Bitmap and Window classes handle it all seamlessly now.

Same UI, different corner settings:

MZ_HUD_2.png
I haven't check my game DL in a while. So time to see if I get a error 404 message. Because I deleted it due to a lack of space. Or it instantly crashes the second it starts. Or if I end up in some random map because I forgot to reset the start point. Or any combination of them.
ThereseIdleWIP2.gif
Design finished. Onto finishing the entire sprite sheet and alternative colours now
What does it say about you when a mushroom is your best friend?
If a game had a moral-choice system at the beginning 3 chapters where defeating an on-screen encounter grants a "-2" at the end of the level whereas evading it granted "+2" at the end of the chapter, and then each chapter also had a dialogue choice that'd give/take points depending on the answer the player gives, how many points would you expect to gain from the dialogue choices?

Forum statistics

Threads
134,799
Messages
1,250,767
Members
177,595
Latest member
Xryu
Top