Formulas and values
Any number can be a formula. The ƒx helper, game values, functions, values and switches.
- What a formula isScore + 10, Random(5), X("Ball"). Where you can type one.
- The ƒx helperClick instead of typing: objects, game values and functions with examples.
- Game valuesScore, Lives, Timer, MouseX and friends.
- Object valuesX("Ball"), Speed("Hero"), Value("Slime","A") and the rest.
- FunctionsRandom, Abs, Min, Max, Floor, Round, Str, Len, Distance, Angle and more.
- RandomRandom(10) gives 0 to 9. Making things unpredictable.
- Distance and AngleHow far apart two sprites are, and which way one is from the other.
- Global values A to ZNumbers every level shares. Keys collected across a whole game.
- Values and switches on objectsTen numbers and eight switches per copy, and when to use them.
- Text formulasStr, Val, Len, Left, Right, Mid, and the text in a text box.
- Ten useful formulasCopy these into your games.
Still stuck?
Try the Chocobreak tutorial, open a sample game and read its rules, or look at the questions people ask.