Page 1 of 1

Question: Different types of things

PostPosted: Fri Sep 04, 2009 2:09 pm
by blahblah200
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 :) :) :) :)

Re: Question: Different types of things

PostPosted: Fri Sep 04, 2009 2:53 pm
by gradyfitz
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 (+ "")).