NoaX 2 Posted December 28, 2020 (edited) Hi everyone today I have a simple problem that I don't have the experience working with text in Houdini to Solve, 1. I've created a grid, randomly selected a couple points using a group. I then fed this group to a copy to points. 2. The group of points being copied too are being enumerated so that they have an unique ID. 3. The font is entering the loop, receiving the ID and now displaying it's ID number. 4. Desired result: Per unique ID, I need to be able to say 'if id = 0, then text = 'apple,' just as a random example. I will of course also use the ID number to delete or blast things down the pipeline. Thank you in advance. File: uniquetext.hipnc uniquetext.hipnc Edited December 28, 2020 by NoaX Share this post Link to post Share on other sites
Librarian 574 Posted December 28, 2020 If you check Add text attributes @NoaX Share this post Link to post Share on other sites
NoaX 2 Posted December 28, 2020 1 hour ago, Librarian said: If you check Add text attributes @NoaX Getting the ID, is not problem. However I can't get the ID to equal a string: for example: "if(@id == 1) { v@Cd = set(0,1,0); s@stringAttrib = "hello world"; }" Share this post Link to post Share on other sites
vinyvince 46 Posted January 2 You could use an array as a detail attribute and look for the matching Id ? s[]@test={'Alpha','Bravo','Tango'}; And to read it back: string read[] = s[]@test; s@a = read[0]; s@b = read[1]; s@c = read[2]; for(int i=0; i<len(read);i++) { printf("read = " + "%c\n", read); } Happy new year Houdini people! ________________________________________________________________ Vincent Thomas (VFX and Art since 1998) Senior Env and Lighting artist & Houdini generalist & Creative Concepts http://fr.linkedin.com/in/vincentthomas Share this post Link to post Share on other sites