mwheen Posted November 14, 2011 Share Posted November 14, 2011 Hi, I have a symbol component that I am moving across the screen based on component.componentname.MoveTo (channel input). I would like to restrict the the maximum and minimum x and y component for the symbol so that it does not move off the screen (out of sight). Any help would be much appreciated. cheers mark Link to comment Share on other sites More sharing options...
AzeoTech Posted November 15, 2011 Share Posted November 15, 2011 Do it in script. Probably the easiest thing to do is create a function to move a component and put the restrictions there. Something like: function MoveTo(string name, x, y) if ((x < 0) || (y < 0) || (x > 2000) || (y > 2000)) ? "Invalid" return endif execute("component." + name + ".moveTo(" + x + "," + y + ")") Change the 2000's to whatever upper limits you want. Put this in a new sequence called "MoveTo". To use, simply call it as such: MoveTo("componentName", 50, 60) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.