Laser on/off

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

Laser on/off

Postby HavingPhun » Sun Apr 17, 2011 10:46 pm

is there a way to turn a laser on or off when a certain variable = something. like {scene.my.hi=1} ? {laser on} : {laser off}}?
I won't be on the forums much for a while. But maybe once in a while.
User avatar
HavingPhun
 
Posts: 178
Joined: Sun Feb 06, 2011 10:42 pm

Re: Laser on/off

Postby hiltropper » Sun Apr 17, 2011 11:30 pm

just turn the fadedist from 0 to something more than 0 (like 25)
like
laser : fadedist = {scene.my.fade}
option:
scene.my.var1 ? {scene.my.fade=0}:{scene.my.fade=25};
yup yup
yuuuuuuup
yupyupyupyupyupyupyupyupyyyuuuup
hm... signatures...
hiltropper
 
Posts: 85
Joined: Mon Dec 20, 2010 12:02 pm
Location: Germany

Re: Laser on/off

Postby electronicboy » Mon Apr 18, 2011 12:01 am

yup, as hiltropper said, just place an if script in the fade dist (in the script menu....)

For laser on use a value thats higher 0

For laser off, use a value of 0
When asking for help, READ THE STICKIES!
electronicboy
 
Posts: 1694
Joined: Mon Aug 31, 2009 6:18 pm

Re: Laser on/off

Postby Chronos » Mon Apr 18, 2011 12:30 am

Or just change the alpha to 0.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania

Re: Laser on/off

Postby HavingPhun » Mon Apr 18, 2011 12:38 am

Thanks
I won't be on the forums much for a while. But maybe once in a while.
User avatar
HavingPhun
 
Posts: 178
Joined: Sun Feb 06, 2011 10:42 pm

Re: Laser on/off

Postby Someone Else » Mon Apr 18, 2011 2:59 am

Alpha only matters when you look at the actual laser itself. Zero alpha simply results in a random beam coming from an invisible source.

Thru scene.my, zero fadeDist is certainly the way to go, but if you are like me and don't like scene.my, your best bet is to put the laser on a box and change the color of the box. An opaque box will block the laser.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy

Re: Laser on/off

Postby Chronos » Mon Apr 18, 2011 4:14 am

Oh wait, sorry, not alpha. Make the laser black. I was thinking of something else.
TheWinkits wrote:They both looks of cuking amazing
User avatar
Chronos
[Most Active Member 2010]
 
Posts: 4457
Joined: Mon Aug 31, 2009 6:00 pm
Location: Californania


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 4 guests

cron