xs2222 Posted October 16, 2015 Share Posted October 16, 2015 Hi folks, i have a vex question , basically i am colouring all points which have a value greater than .005 , and delete ones which does not have the colour , but the ones which have colour should not die at all , even when it reaches a velocity below .005 ? any ideas ? in a point wrangle int @idval ; int @newVal; if(length(@v) > .005) { @idval = @id; @Cd = {0,1,0}; @dead = 1; if((@idval == 0) && (length(@v) == 0)) { @newVal = @idval; } } thanks, Quote Link to comment Share on other sites More sharing options...
Atom Posted October 16, 2015 Share Posted October 16, 2015 (edited) Would something like this work? if (length(v@v) > .005) { // Above threshold, set color. @Cd = set(0,1,0); } else { // Below threshold, check for color. if (@Cd != {0,1,0}) { i@dead = 1; } else { // Was once good, don't kill. } } Remember, all points will have color (@Cd) even if it is black. {0,0,0} Edited October 16, 2015 by Atom Quote Link to comment Share on other sites More sharing options...
xs2222 Posted October 17, 2015 Author Share Posted October 17, 2015 (edited) Hi Atom, thanks for the reply , another tip from Pavel , and did this before sim and works like a charm post solve in wrangle node added these ... i@keepAlive = 0; if(length(v@v)>.005){ //above threshold v@Cd = {0,1,0}; i@keepAlive = 1; } // Below threshold, check for color. else { if (@Cd != {0,1,0}) { i@dead = 1; } else { i@keepAlive = 1; } } Edited October 17, 2015 by xs2222 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.