Menu Item: Difference between revisions
m
Fix and make links
Nikitaivanov (talk | contribs) (Created page with "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. File:Menu_Item.png == Notes == Though this new script made a great new mechanic for Fa...") |
-u ndefined- (talk | contribs) m (Fix and make links) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Block | |||
|image=Menu Item.png | |||
|type=s | |||
|folder=Game | |||
|input1={{Port|e|Before}} | |||
|input2={{Port|n|Variable}} | |||
|input3={{Port|o|Picture}} | |||
|output1={{Port|e|After}} | |||
}} | |||
[[ | The Menu Item block is a script block which was added on [[Version History#fancade-1-6-6|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 [[How to use the shop system|here]]. | |||
== Notes == | == Notes == | ||
* The base prices are currently only fixed to 10, 100, 1k & 10k. | * The base prices are currently only fixed to 10, 100, 1k & 10k. | ||
* Each menu item script | * 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 == | == More info == | ||
You also cannot use menu item to add buttons on the top of the screen or the pause menu. | 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 <code>Coins</code> and another one named <code>!Score</code>. | |||
Now get a [[Set Score]] block, plug in <code>!Score</code> into the Score wire, and plug <code>Coins</code> into the Coins wire. | |||
Add a shop with some items, starting with <code>More per tap</code>. This is like in Fanclicker by Origedit. Replace the increase number with: | |||
[[File:?.png]] | |||
Do the same for the <code>Coins</code> 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 [[Glue|this article]]. You may also need the [[Tap to pick closest object]] article. | |||
== Related == | |||
* [[Get Variable]] | |||
[[Category:Blocks]] | [[Category:Blocks]] |