applying variables

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

applying variables

Postby algadoodle123 » Tue Oct 06, 2009 1:43 pm

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:
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
User avatar
algadoodle123
 
Posts: 66
Joined: Tue Sep 08, 2009 6:04 pm

Re: applying variables

Postby algadoodle123 » Wed Oct 07, 2009 2:30 am

do you know, fujitsu
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
User avatar
algadoodle123
 
Posts: 66
Joined: Tue Sep 08, 2009 6:04 pm

Re: applying variables

Postby KarateBrot » Wed Oct 07, 2009 2:45 am

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.
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: applying variables

Postby algadoodle123 » Wed Oct 07, 2009 2:48 am

if you have some variables u want to keep, and some u dont, does it still save them all?
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
User avatar
algadoodle123
 
Posts: 66
Joined: Tue Sep 08, 2009 6:04 pm

Re: applying variables

Postby Fujitsu » Wed Oct 07, 2009 5:10 am

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.
Image
Gimmie money.
User avatar
Fujitsu
 
Posts: 328
Joined: Tue Sep 01, 2009 12:28 am
Location: Canada

Re: applying variables

Postby algadoodle123 » Wed Oct 07, 2009 1:38 pm

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
Last edited by algadoodle123 on Mon Oct 12, 2009 9:09 pm, edited 1 time in total.
**/\ /\
>( ' ; ' )<***<---------- cat
*((")("))
i'm right-side-up
uʍop-ǝpısdn ɯ,ı
http://www.sherv.net/flip.html
User avatar
algadoodle123
 
Posts: 66
Joined: Tue Sep 08, 2009 6:04 pm

Re: applying variables

Postby Renato7000 » Sun Oct 11, 2009 6:10 am

what is a variable?
Renato7000
 
Posts: 9
Joined: Sat Oct 10, 2009 12:09 am

Re: applying variables

Postby Fujitsu » Sun Oct 11, 2009 7:09 am

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
Image
Gimmie money.
User avatar
Fujitsu
 
Posts: 328
Joined: Tue Sep 01, 2009 12:28 am
Location: Canada

Re: applying variables

Postby Username? » Wed Oct 14, 2009 2:22 pm

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
Check my most scripted scene
Code: Select all
       /^°>#
____.<=/`°`    #<°^==>._____
     ``         ´´  ´´
User avatar
Username?
 
Posts: 65
Joined: Sun Sep 20, 2009 8:06 pm


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 6 guests

cron