{Scene.my.motor} help

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

{Scene.my.motor} help

Postby Trurascal » Sat Mar 13, 2010 8:49 pm

i am using a lazer on collision with a group to make a hinge use a motor and it dosent work i have this in my script:

On Lazer Hit
Code: Select all
(e)=>{Scene.my.motor = 15.0}


MotorSpeed
Code: Select all
{Scene.my.motor}


can you tell me what i have done wrong?
:wtf:
Trurascal
 
Posts: 2
Joined: Sat Mar 13, 2010 8:42 pm

Re: {Scene.my.motor} help

Postby Mr_Stabby » Sat Mar 13, 2010 9:11 pm

probably whats happening is that your motor cant find scene.my.motor when scene starts because it doesent exist yet use {speed = 1; speed = scene.my.motor; speed } in motorspeed instead
Mr_Stabby
 
Posts: 155
Joined: Wed Dec 16, 2009 12:16 am

Re: {Scene.my.motor} help

Postby Trurascal » Sat Mar 13, 2010 11:48 pm

Still Dosent Work
Trurascal
 
Posts: 2
Joined: Sat Mar 13, 2010 8:42 pm

Re: {Scene.my.motor} help

Postby KarateBrot » Sun Mar 14, 2010 12:12 am

Open the console (F11) and type in scene.my.motor := 0.0 (or whatever value you want the variable to be). Then do everything as you described here. Does it work now? Or did you already do this first step with the console?
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 13 guests