Closed tymekborowski closed 4 years ago
It's been a while since I wrote the procedural code, but I think this is not possible like that. The variable are reset at each iteration of the loop (this is a context free grammar).
I could achieve more or less what you try to do with this code:
shape main {
node[life 50 z 10]
}
shape node {
cube[]
step[]
}
shape step
rule { node[x 1] }
rule { node[x -1] }
rule { node[y 1] }
rule { node[y -1] }
rule { node[z 1] }
rule { node[z -1] }
On a side note, the procedural support is really weak at the moment. I think there are many crashes and bugs. If you do cool things with goxel procedural please let me know it will motivate me to improve it.
Wow, that was fast. Thanks a lot!!! Now I'm starting to get it :) I'll let you know if I make something cool :>
Hello! I'm trying to write a procedural script for a simple random walk in 3d, but can't make it work. Does Goxel support incemental operations on variables, like $x = $x +1 to accumulate changin "cursor position" through iteration?
Similar solution work well in Blender+Python