OnLaserHit hinges

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

OnLaserHit hinges

Postby HiredRock » Wed Jan 27, 2010 4:21 am

I am wondering if there is a way to make a hinge motor activate if a laser hits something.
If so, could you tell me the scripting needed for it? thanks
HiredRock
 
Posts: 5
Joined: Wed Jan 27, 2010 3:16 am

Re: OnLaserHit hinges

Postby KarateBrot » Wed Jan 27, 2010 4:35 am

1)
Open the console (F11) and type: scene.my.on := false

2)
onLaserHit script:
Code: Select all
(e)=>{ scene.my.on = true }


3)
Motor script menu (the line "motor ="):
Code: Select all
{scene.my.on}
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: OnLaserHit hinges

Postby HiredRock » Thu Jan 28, 2010 5:35 am

Ok. Thanks. That really helps! :clap:
HiredRock
 
Posts: 5
Joined: Wed Jan 27, 2010 3:16 am

Re: OnLaserHit hinges

Postby KarateBrot » Thu Jan 28, 2010 2:25 pm

cool :thumbup:
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 7 guests

cron