Laser reciever

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

Laser reciever

Postby sbrown » Sun Sep 06, 2009 7:29 am

I want to make a lazer, and a receiver (a box). I want it so that when the laser beam is blocked by anything, it changes scene.my.speed to 0, and when it's not blocked, I want scene.my.speed 4.5.

Any ideas how to do this:?:
admin wrote:I get the impression that this fellow is not best friends with the community since he is trumpeting out the secret phunland community discount to the world. I sense evil.
User avatar
sbrown
 
Posts: 51
Joined: Wed Sep 02, 2009 7:42 am

Re: Laser reciever

Postby RaRaMalum » Sun Sep 06, 2009 11:54 am

Here you go

Image
Author: RaRaMalum
Title: Laser switch
File Size: 30.05 kB
Rating: Image
ImageImage
Phundamentalists, come to the dark side.
We have much cooler toys.
User avatar
RaRaMalum
[Best newcomer 2010]
 
Posts: 280
Joined: Mon Aug 31, 2009 10:47 pm

Re: Laser reciever

Postby sbrown » Sun Sep 06, 2009 8:10 pm

Thanks. I found a easier way to do it:

Code: Select all
oncollide = (e)=>{scene.my.speed = 0}
onhitbylaser = (e)=>{scene.my.speed = 4.5}
admin wrote:I get the impression that this fellow is not best friends with the community since he is trumpeting out the secret phunland community discount to the world. I sense evil.
User avatar
sbrown
 
Posts: 51
Joined: Wed Sep 02, 2009 7:42 am


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests

cron