inital value for a not yet defined variable

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

inital value for a not yet defined variable

Postby Mr_Stabby » Sat Jan 23, 2010 2:56 pm

i got this hinge that needs to rotate one way or another so its CCW attribute is linked to {scene.my.ccw}, problem is tho the variable doesent exist yet when i freshly import the phunlet to a scene and is only given a value once the scene starts and a laser hits stuff so is there any way to give an inital value to it to use instead scene.my.ccw until its there?

EDIT: i think ive found a way by using {false; scene.my.ccw} and it seems to work, however ive noticed that whatever i type between the brackets gets erased and replaced by just "false" each time i hit ctrl+z to freeze scene again or when i import as a phunlet or when i load scene, super annoying, any way to fix this?
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 5 guests