Lootable-Money System

1

Index

Attached Files

The following files have been attached to this tutorial:

.capx

example-of-lootable-money-system.capx

Download now 378.43 KB

Stats

3,179 visits, 4,687 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 29 Nov, 2014. Last updated 19 Feb, 2019

Hi Guys, Welcome to my tutorial on My Lootable-Money system! This System creates small stacks of money, which can by looted for cash! I'll lead you through it step by step, so lets start!

First you'll need to open up a fresh new layout, and add 4 objects:

1) A sprite for your character to pick up the loot, with the behavior '8 direction'

2) A sprite for your stash of coins, with the behavior 'Fade'

3) Text

4) A suitable background (optional)

Once you have these four objects, select an image for your character and your coins, but the coins HAVE to resemble a small/large pile of coins or coin-bags.

In my example, the cauliflower is the Player, the background has a rocky dungeon feel and the text is in the top left corner. I'll explain what all of them do soon.

First you'll need to make some place to store the players cash. That is why the text is here. You could use some other means, but here the text will represent how much cash your player has. So, for that reason, we'll make a global variable with the name "cash". You could make an instance variable or a local variable, but I'll keep it simple. Whenever you receive some cash, it will add onto your variable and then be displayed through the text.

Here is an image of the global variable and the first event. This event controls the text itself, so let me walk you through.

1) The condition 'Every tick' says to display the text all the time, so even if you gain more cash the text will update.

2) The event 'Set text to "Cash: "& Cash' actually shows the text. The part in the quotation marks is what shows on screen, so it will say 'Cash:'. The part after the Ampersand says to display the Global Variable after the text.

After that you should see this in the top corner:

Obviously, Your Player currently has no Cash so it is displayed as 0, but it should work.

  • 0 Comments

Want to leave a comment? Login or Register an account!