Double Command
2 posts • Page 1 of 1
Double Command
I have already asked this but I still need some help. I am wondering how to make a thyme command do more than one thing. Like:
How do I make a thyme command do 2 things. Also how do I dynamicly change the color of lasers with scene.my variables?
Thank You!
- Code: Select all
onhitbylaser (e)=>{e.laser.maxrays < 2 ? {e.geom.color = e.laser.color}:{e.geom.color = e.geom.color}};{e.geom.color = e.laser.color}}}
How do I make a thyme command do 2 things. Also how do I dynamicly change the color of lasers with scene.my variables?
Thank You!
I won't be on the forums much for a while. But maybe once in a while.
-

HavingPhun - Posts: 178
- Joined: Sun Feb 06, 2011 10:42 pm
Re: Double Command
Thyme commands are separated by semicolons. ex... scene.my.example = 100; scene.my.exampleII = 42
You don't need the extra brackets.
Right:
Wrong:
It is relatively easy to debug using the console if you mess up...
Laser color changing is done by substituting variables for values in the color array(s)-- ex...
color = {[0,0, scene.my.blue, 1]}
colorHSVA = {[scene.my.hue, 1, 1, 1]}
color = {scene.my.color}
colorHSVA = {scene.my.colorHSVA}
You don't need the extra brackets.
Right:
- Code: Select all
(e)=>{scene.my.example = 13; scene.my.otherexample = 42}
Wrong:
- Code: Select all
(e)=>{{scene.my.example = 13}; {scene.my.otherexample = 42}}
(e)=>{{scene.my.example = 13} {scene.my.otherexample = 42}}
It is relatively easy to debug using the console if you mess up...
Laser color changing is done by substituting variables for values in the color array(s)-- ex...
color = {[0,0, scene.my.blue, 1]}
colorHSVA = {[scene.my.hue, 1, 1, 1]}
color = {scene.my.color}
colorHSVA = {scene.my.colorHSVA}
-

TC42 - Posts: 984
- Joined: Sun Jan 09, 2011 1:53 pm
- Location: $ sudo apt get-install sandwich_
2 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests




