Juzwa Posted March 5, 2015 Share Posted March 5, 2015 Hi, I stored some 0,1 (on, off) information on a color in a sop. Lets say this is my path to the sop: "/obj/my_geo/my_sop" How do I get the information I stored on a color? Eg. I want to use the red channel to switch in my switch SOP, but how can I get the R channel? Quote Link to comment Share on other sites More sharing options...
Robert Posted March 5, 2015 Share Posted March 5, 2015 If you stored your color on a point then you can do point("/obj/my_geo/my_sop",Point_number,"Cd",0). This expression takes the Cd attribute, which is color, and gives the R channel. The last argument of the point expression is the index of the attribute. 0 = red, 1 = green and 2 = blue. Make sure to replace the "Point_number" with an actual point number. Quote Link to comment Share on other sites More sharing options...
Juzwa Posted March 5, 2015 Author Share Posted March 5, 2015 Thanks Robert, works great! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.