Edit: ignore, misread the OP sorry
[quote:3rmyn1y1]Local number MyVar = 0
System:Every Tick -> System: Add 5 to MyVar
Note you don't really want 'every tick', I used that as a 'placholder' event. The above will add 5 to MyVar about 60 times a second <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">
Edit:
This is probably where you should start in the manual https://www.scirra.com/manual/83/variables
And also the word 'random' has many connotations, maybe 'arbitrary' would be better. Also you'll see references to 'expressions' in the manual which is what you meant by 'formula'. Good luck