Menu Item
Type | Script block |
Collider | None |
Folder | Game |
Ports | |
---|---|
Inputs | Before Variable Picture |
Outputs | After |
The Menu Item block is a script block which was added on Fancade 1.6. When it is executed at least once it activates the shop system adding a shop to the game which is only accessible when you win or lose the game. The main use of this script is to add items to a shop which should only be done once per item. To learn how to use it, see here.
Notes
- The base prices are currently only fixed to 10, 100, 1k & 10k.
- Each menu item script must only be executed once per game. If it's left continuously executing the shop will be filled with repeating set of items until it has too many items in it, which will cause the "Too many menu items!" error to appear.
More info
Items can be either one type of upgrades or boosters just by playing with the buy limit settings and Variable input of the menu item script. You can choose between "On", "Off", "Max 2-100", or "No limit".
You also cannot use menu item to add buttons on the top of the screen or the pause menu.
Example
Clicker game
You can make a clicker game with Menu Item. First, add a Touch Sensor block, a Get Variable block of number type, an Increase Number block and a Menu Item. Make it detect when 1st tap begins. Make it increase two variables: one named Coins
and another one named !Score
.
Now get a Set Score block, plug in !Score
into the Score wire, and plug Coins
into the Coins wire.
Add a shop with some items, starting with More per tap
. This is like in Fanclicker by Origedit. Replace the increase number with:
Do the same for the Coins
variable.
Add a way to make the player claim the coins they got in game and to submit their score. If you are using an object to do this then check if the object has no other object around it or is unglued; if not, do so. If you don't know how to do it then check this article. You may also need the Tap to pick closest object article.