Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Master Dante
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: UK
Posted: 31st Jul 2004 07:36
Hey, im creating a matrix and im trying to add 3d grass, what i have done so far is;
Taken a Bmp then textured a plain with the Bmp. I have then made the plain exclude the black of the bmp, so i now have grass i can actively place into my game. But the problem is, how do i copy the grass around 200 times to randomise across my matrix. I have the effect i am looking for made, but iv'e had to repeat the following code many many times (took along time) and so taking up alot of space on my code and hard to increase the amount of grass without substancial typing! The following code is a snippet of 1 grass texture.
SandraD
20
Years of Service
User Offline
Joined: 30th May 2004
Location: Down on the corner, out in the street.
Posted: 31st Jul 2004 07:57
Uh..... A loop process perhaps?

Any truly great code should be indisguishable from magic.
Douglass
21
Years of Service
User Offline
Joined: 28th Aug 2003
Location:
Posted: 31st Jul 2004 08:23
its unclear what your poblem is but maybe this will work:



Master Dante
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: UK
Posted: 31st Jul 2004 08:32
Ok, let me re-phrase this ok, i am creating grass on my matrix, but the only way i seem to be able to place many patches of 3D grass is by creating 150 plain objects or so eg. Create object plain 1, Create object plain 2, Create object plain 3 etc.. is there any way i can create multiple objects with the same paramaters (placing, texture size etc..) without haveing to type out the code all 150+ times?
Paul Johnston
TGC Developer
22
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 31st Jul 2004 09:08
Use a loop.

Master Dante
20
Years of Service
User Offline
Joined: 30th Jul 2004
Location: UK
Posted: 31st Jul 2004 10:13
thank you

Login to post a reply

Server time is: 2024-11-27 03:46:33
Your offset time is: 2024-11-27 03:46:33