Another good random

About advanced scenes, and the Thyme scripting language used in Algodoo.

Another good random

Postby Kilinich » Mon Jan 10, 2011 2:51 am

Code: Select all
scene.my.rnd := {(system.time+ sin(sim.tick))%1}

range 0..1, pretty fast and smooth. different values on every run.
Last edited by Kilinich on Mon Jan 10, 2011 11:18 am, edited 1 time in total.
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia

Re: Another good random

Postby Rideg » Mon Jan 10, 2011 9:33 am

app.time; Is that like system.time?
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Another good random

Postby Kilinich » Mon Jan 10, 2011 11:18 am

Rideg wrote:app.time; Is that like system.time?

yes, sorry, my misprint
Dream of Algodoo as game development engine...
User avatar
Kilinich
[Best bug reporter 2010]
 
Posts: 2098
Joined: Mon Aug 31, 2009 8:27 pm
Location: South Russia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest