Question by
Paraplegic_Penguin · Nov 30, 2015 at 06:06 PM ·
c#prefabsvariables
Help with converting small pseudo script to C# please?
My biggest question remains on how to 'select' specific cube prefabs from my grid using a brush technique. I had a functioning world generator using this script and the results were very good. Here is a small album. However, it used predefined functions and now that I am making the transfer over to Unity, I am at square one again with broken code.
Here is a screen shot of my WIP world generator
Iterations = 80;
Gain = 3;
BrushSize = 128;
//
var n = Iterations;
while n > 0 {
var b = BrushSize;
while b > 0 {
// find random x,y coordinate within grid
var Brush_X = random_range(0,Width)
var Brush_Y = random_range(0,Height)
// add random range between -Gain,+Gain to each cube prefab within area of BrushSize
b--;
}
n--;
}
Comment
Your answer
Follow this Question
Related Questions
Varialbes on prefab script always null 0 Answers
Use of unassigned local variable 'startPos' " & " Use of unassigned local variable 'endPos' 1 Answer
Variable changing from other script does not work. 1 Answer
Beginner trying to set up random variable for game + and then some. 2 Answers
Spawn random letters 0 Answers