Gorrod Posted August 20, 2016 Share Posted August 20, 2016 I'm trying to change the value of an attribute of a point when iterating through a point cloud in an attribute wrangle. I know i can get the point number that is currently iterated with pcimport, but how do I change an attribute of that point? I can get its position (or any other attribute) with the point() function but since that is not a pointer/reference I don't know how to change the actual attribute value. Quote Link to comment Share on other sites More sharing options...
Atom Posted August 20, 2016 Share Posted August 20, 2016 (edited) If you have the @ptnum, or the current point index, you can use the setpointattrib function to assign a new value. Check it out in the docs there a few variations. setpointattrib(geoself(), "sf_enemy_location", @ptnum, set(0,0,0), "set"); geoself() can also be represented with the value zero as well. setpointattrib(0, "P", point_index, set(0,0,0), "set"); Edited August 20, 2016 by Atom Quote Link to comment Share on other sites More sharing options...
Gorrod Posted August 21, 2016 Author Share Posted August 21, 2016 Thank you! 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.