|
|
Am 11.10.2017 um 14:41 schrieb Sven Littkowski:
> The value "AmountLines" allows me to set the amount of oar lines above
> each other, but strangely, I always get just one line. I am very sure,
> the fault is with me: "I am not seeing the forest because of all the
> trees in my eyesight". Means, I am looking at the scene code, and just
> can't discover the error in thinking/writing. Can you help?
[...]
> #declare MyNumber = 0;
>
>
> #macro MyOarLine(AmountOarsInLine,MyHeightMoreThis)
> union
> {
> #while(MyNumber<AmountOarsInLine)
>
> #declare MyAngleWater = (rand(R1)*MyVariance)+GeneralAngle;
> #declare MyAngleHands = (rand(R2)*MyVariance)+BladeAngle;
> #declare MyAngleDirection = (rand(R3)*MyVariance)+ForwardAngle;
> object
> {
> MyOar(MyHeightMoreThis)
> rotate < 0.0, MyAngleHands, 0.0 >
> rotate < MyAngleWater, 0.0, 0.0 >
> rotate < 0.0, 0.0, MyAngleDirection >
> translate < (MyNumber*0.925), 0.0, 0.0 >
> }
> #declare MyNumber = MyNumber+1;
> #end
> }
> #end
You need to set `MyNumber = 0` each time you're running the macro (i.e.
the `#declare` should be inside the macro. Also, I'd suggest using
`#local` instead; it's good practice for macros, unless you want to pass
values out of the macro via global variables.)
Post a reply to this message
|
|