|
|
W0RLDBUILDER <nomail@nomail> wrote:
> > #macro CreateStars(StarObject, Amount, Seed)
> > #local MinExtent = <-100, -100, -100>;
> > #local MaxExtent = <100, 100, 100>; // Modify as desired
> >
> > #local Index = 0;
> > #while(Index < Amount)
> > object
> > { StarObject
> > #declare RandVector = <rand(Seed), rand(Seed), rand(Seed)>;
> > translate MinExtent + (MaxExtent - MinExtent) * RandVector
> > }
> > #local Index = Index + 1;
> > #end
> > #end
> >
> > #declare Seed = seed(0);
> > CreateStars(Star1, 100, Seed)
> > CreateStars(Star2, 100, Seed)
> > CreateStars(Star3, 100, Seed)
> >
> > --
> > - Warp
> I can't get that to work. I know I'm doing something wrong here. It's probably
> not a good idea to drop a macro on top of a semi-n00bish casual user who just
> wants to place some random stars. :-P
Obviously you have to #declare Star1, Star2 and Star3 to be your desired
star objects because the CreateStar() lines.
--
- Warp
Post a reply to this message
|
|