can someone please explain to me how to use an operator and give me some simple scripts to try out
when gf clicked repeat until <(timer) > [10]> go to [mouse-pointer v] end think [Scripts in your posts!] for (3) secssorry i also wanted to test something out, but please tell me an example of an operator how it works!
Last edited by JSO (2012-01-28 05:38:14)
Offline
G0D_M0D3 wrote:
Well, what operator block do you want to use?
Yeah, we can't really help you until you be more specific
Offline
Depends on what you really want to do with them. Some examples of things they can be used for are math operations, conditional statements (and, or, not), string operations, and random number generating.
Offline
Example:
When gf clicked forever change y by (loudness) if < (y position) > [0] > change y by [-5]
Last edited by CheeseMunchy (2012-01-27 20:25:16)
Offline
Offline
At first, I was really confused by operators. But, they are very useful. For example, for a target game where you click on targets, to make targets appear in random spots, you would do this:
when gf clicked forever go to x ((pick random (-200) through (200)) y ((pick random (-200 through 200) if <mouse down?> change [score] by (10)They can be used to set variables, too. Say you do a speed game, where the faster you do something, the better. You could set the score to:
when i receive [done] set [SCORE 1] to ((timer))And then after, say 3 rounds adding "timer" to SCORE 1, SCORE 2, and SCORE 3, you make a TOTAL SCORE variable, which adds all of them.
when i receive [end] show variable [TOTAL SCORE] set variable [TOTAL SCORE] to ((SCORE 1) + ((SCORE 2) + (SCORE 3)))They have an infinite numbe more uses, including creating arcs using sine and cosine and tangent. I hope you found this useful!
Offline