Question: Different types of things

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

Question: Different types of things

Postby blahblah200 » Fri Sep 04, 2009 2:09 pm

Can someone please explain to me what different types of things e.g. string, integer, boolean, etc. (don't know what to call them) are and how you input them into the console via scene.my.

Also, can someone explain to me this- math.toInt, math.toBool, etc.

Thx in advance :) :) :) :)
Image<-- Made with GIMP
User avatar
blahblah200
 
Posts: 61
Joined: Tue Sep 01, 2009 11:33 am
Location: Somewhere over the rainbow...

Re: Question: Different types of things

Postby gradyfitz » Fri Sep 04, 2009 2:53 pm

blahblah200 wrote:Can someone please explain to me what different types of things e.g. string, integer, boolean, etc. (don't know what to call them) are and how you input them into the console via scene.my.

Also, can someone explain to me this- math.toInt, math.toBool, etc.

Thx in advance :) :) :) :)

[Tutorial]Thyme - With full explanations at every step, I plan to eventually rewrite it largely, as it's out of date :), but, it has well enough explanations for what you want to know.


Also, math.toInt will convert the number to an integer, which is very useful for collidesets and indices.
math.toBool will convert the number to a boolean number (true or false), which will allow for use in if_then_else structures (?: trinary operator).
math.toFloat may allow for better float-float binary operations.
math.toString allows for translation to string objects (it can be replicated using (+ "")).
Mechanisms: 18 Mechanisms.
Thyme: Tutorial - Variables/Commands List.
Thymechanic
gradyfitz
 
Posts: 174
Joined: Tue Sep 01, 2009 8:33 am
Location: Victoria, Australia


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron