Page 1 of 1

applying variables

PostPosted: Tue Oct 06, 2009 1:43 pm
by algadoodle123
How do you make your scene apply certain variables upon opening...
many of my thyme projects stop working when I pull them up because all variables were lost :cry:

Re: applying variables

PostPosted: Wed Oct 07, 2009 2:30 am
by algadoodle123
do you know, fujitsu

Re: applying variables

PostPosted: Wed Oct 07, 2009 2:45 am
by KarateBrot
you need to open the console (F11) and then declare your variables as string ("Hello"), integer (5), float (3,7) or boolean (true / false).

for example type into the console:
scene.my.var := 2,394
or
scene.my.var := "Hello"

now that your variables are declared you can work with them in the scripting menu and they should stay there after saving and reloading. there is a bug so that variables in the scripting menu won't stay in the "maxrays" line. but all others are still there after reloading.

Re: applying variables

PostPosted: Wed Oct 07, 2009 2:48 am
by algadoodle123
if you have some variables u want to keep, and some u dont, does it still save them all?

Re: applying variables

PostPosted: Wed Oct 07, 2009 5:10 am
by Fujitsu
That was a creepily specific question. :?

As for the current variable question, Scene.my._____ variables are always saved to the scene. If you want to delete a variable, you have to manually go into the scene file with a text editor and delete the variable which I don't find to be so nice sometimes.

Re: applying variables

PostPosted: Wed Oct 07, 2009 1:38 pm
by algadoodle123
i know what you mean... my comp cant change it into a zip, so i have to save it, send it into my flash drive, and upload it to a comp that can... lots o' work

i had my original question up there for two or three days with no reply, and i saw that you were browsing this forum yesterday


edit: my dad fixed up my comp 2 show the file extension

Re: applying variables

PostPosted: Sun Oct 11, 2009 6:10 am
by Renato7000
what is a variable?

Re: applying variables

PostPosted: Sun Oct 11, 2009 7:09 am
by Fujitsu
Renato7000 wrote:what is a variable?


A variable is something that one can use to script with via Algodoo's internal programming language "Thyme". You can create them with the console by pressing the tilde key "~" and then typing "Scene.my.", what you want your variable to be called, and then hitting return/enter.

For more information on variables, visit gradyfitz's tutorial at http://www.algodoo.com/forum/viewtopic.php?f=13&t=411

Re: applying variables

PostPosted: Wed Oct 14, 2009 2:22 pm
by Username?
Not only in algodoo, every programm use them.
And in the ram they get saved. (And when they're there, you can change them :twisted:)
short:
a variable is a place in a computer/calculator/nintendo/psp ...... what can be defined with numbers and text