I have a terrain generator that i got off of this site.
I have textures and stuff, and im not using there svn download since its messed up so I download there older one which is available here
Well that txt file has the download link in it. I understand alot of it but im still confused on how to add stuff like coal into it. I have the textures and i set the texture options to what is required.
In the WorldData.cs I have this for the specific coal texture SetBlockUVCoordinates(BlockType.Coal, 9,9,9);
The 9th element in the WorldGameObject Script/Prefab is set to look like this
In the Block.cs Script I Have this, plus more but this is all thats needed
For the DualLayerTerrainWithMediumValleys.cs How could i implement coal being placed at random? I was looking at the TreeScript that have and I noticed how they did the Random and in the DualLayerTerrainWithMediumValleys.cs I found this
Which would explain how it generates stone... I think, but i played around with that script for hours on end so how would i set up coal with it?
This is what i tried (FOR THAT SECTION OF CODE!)
Which was basically a copy a paste from the terrain generation and i got this error
So where that function began I put Random random, in between the parameters so it looked like this
Which sadly resulted in another error
After I put the random code in, before i added it to the parameters in when i started going with my gut so i have no idea if i was even doing it somewhat right.
Thanks in Advanced
The tool is looking for a 'Random' class to generate the random values. Parsing in unity's random isn't going to work if they use different methods.
You could create a wrapper that wraps unity's Random class with a class of your own to translate their method calls into methods that exist in Unity's Random Class..
answered Dec 30, 2011 at 12:52 AM