I can't quite get this right, what I need is to take a random number and save it to a variable:
0 61 RandInt ->x
CurrentCoords 0 <-x 1 10 CreateSpore
30 Delay
I do believe Virgil has not yet provided a build with the variable support.
For now just do
CurrentCoords 0 0 61 RandInt 1 10 CreateSpore
30 Delay
Edit. Omitted one parameter. Now it works.
Yeah, give me another day and the local var support build will be out. I want to add some nullifier changes (and maybe a sniper change) in the next build before I release it. Local vars are nice....
The syntax is another homage to HP RPN calculators. I intend to make =>x to mean to store the top of the stack into x in _global_ memory, whereas ->x stores it in local memory.
Global memory will be visible across all CRPLTowers, so it can be used to coordinate actions (maybe)...
Quote from: virgilw on December 18, 2012, 08:16:23 PM
Yeah, give me another day and the local var support build will be out. I want to add some nullifier changes (and maybe a sniper change) in the next build before I release it. Local vars are nice....
The syntax is another homage to HP RPN calculators. I intend to make =>x to mean to store the top of the stack into x in _global_ memory, whereas ->x stores it in local memory.
Global memory will be visible across all CRPLTowers, so it can be used to coordinate actions (maybe)...
I see where you're going...
does div imply Floor, Ceiling, or Round? (i.e. 13/2=(6 or 7))
If you do division of integers, you will get an integer result (Eg, Floor). if you do division of floating point, you'll get a floating point result.
The "easy" way to do this is to test it in a CRPLT script, using Trace, that way you 'll learn a lot faster.