Toggle laser on/off with thyme

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

Toggle laser on/off with thyme

Postby Username? » Thu Sep 24, 2009 8:07 pm

Is it possible to toggle a laser on and off with a command like
"e.laser.state = on" (the ".state" is used in Visual Pinnball)
When the answer allready exist plz. link to it. :arrow:
Check my most scripted scene
Code: Select all
       /^°>#
____.<=/`°`    #<°^==>._____
     ``         ´´  ´´
User avatar
Username?
 
Posts: 65
Joined: Sun Sep 20, 2009 8:06 pm

Re: Toggle laser on/off with thyme

Postby Fujitsu » Fri Sep 25, 2009 4:46 am

You can't directly turn a laser on or off, but you can set the number of rays to a custom variable which can be changed upon pressing a key.
Image
Gimmie money.
User avatar
Fujitsu
 
Posts: 328
Joined: Tue Sep 01, 2009 12:28 am
Location: Canada

Re: Toggle laser on/off with thyme

Postby Rhett97 » Fri Sep 25, 2009 5:31 am

Here i made one a while ago.
Rating: rated 5
Filesize: 5.46 kB
Comments: 0
Ratings: 1
download


Woah i just my first highlighted scene.
Chronos wrote:There's nothing wrong with swearing. They're just words. People just think they have a bad meaning. What's the difference between shit and poo? Nothing. They're the same.
User avatar
Rhett97
 
Posts: 522
Joined: Mon Aug 31, 2009 10:32 pm

Re: Toggle laser on/off with thyme

Postby Username? » Fri Sep 25, 2009 3:38 pm

Ok, standart rays are 1000, then:
To turn off:
Code: Select all
(e) => {e.laser.maxRays = 0}
Check my most scripted scene
Code: Select all
       /^°>#
____.<=/`°`    #<°^==>._____
     ``         ´´  ´´
User avatar
Username?
 
Posts: 65
Joined: Sun Sep 20, 2009 8:06 pm

Re: Toggle laser on/off with thyme

Postby RA2lover » Sat Oct 03, 2009 7:26 pm

yes, but, doing so, will cause trouble(rays = 0 = no laser hit, which means you'll need something do deal with it.).
also, i've found an interesting discovery when messing with them
Spoiler: show
THEY UPDATE AT YOUR MONITOR'S REFRESH RATE


so, you'll need something to fix it.
Jrv wrote:
TC42 wrote:Quite honestly, I didn't think anyone on 4chan has that good a use of grammar, spelling, usage, mechanics, ect.
But I've never been there, so I may be wrong.


GTFO newfgt
User avatar
RA2lover
 
Posts: 607
Joined: Mon Aug 31, 2009 8:43 pm
Location: Brazil

Re: Toggle laser on/off with thyme

Postby KarateBrot » Sun Oct 04, 2009 12:56 am

RA2lover wrote:
Spoiler: show
THEY UPDATE AT YOUR MONITOR'S REFRESH RATE


holy shit that's an amazing discovery. :shock:
this information could maybe be helpful for me in the future
Image
User avatar
KarateBrot
 
Posts: 825
Joined: Mon Aug 31, 2009 7:32 pm
Location: Germany

Re: Toggle laser on/off with thyme

Postby Conundrumer » Sun Oct 04, 2009 3:23 am

RA2lover wrote:
Spoiler: show
THEY UPDATE AT YOUR MONITOR'S REFRESH RATE

wow that explains a lot
User avatar
Conundrumer
 
Posts: 344
Joined: Mon Aug 31, 2009 5:55 pm
Location: NYC


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 1 guest