Answer by ginryu
um, first off, you implementation is off. gear speed is based on a gear ration, you make a varible, or an array and make it float[] then set the index to 2 then you make a variable called gear ratio,...
View ArticleAnswer by ronronmx
Jessy, you're right there's something else going on in the code. Here's the full function below: var topSpeed : float = 160; var numberOfGears : int = 5; private var gearSpeeds : float[]; function...
View ArticleAnswer by RSud
your first time through the loop there is no value set for gearSpeeds[0] since the if statement skips setting gearSpeed[0]. I guess this is a good thing since if it didn't you first time through you...
View ArticleAnswer by Jessy
In short, array[i - i] gives you the value of the element at the index 1 less than i.Your code does not generate those values. It either generates 40-160, or just 40, for index 1-4 in gearSpeeds. You...
View ArticleAnswer by ginryu
um, first off, you implementation is off. gear speed is based on a gear ration, you make a varible, or an array and make it float[] then set the index to 2 then you make a variable called gear ratio,...
View ArticleAnswer by ronronmx
Jessy, you're right there's something else going on in the code. Here's the full function below: var topSpeed : float = 160; var numberOfGears : int = 5; private var gearSpeeds : float[]; function...
View ArticleAnswer by RSud
your first time through the loop there is no value set for gearSpeeds[0] since the if statement skips setting gearSpeed[0]. I guess this is a good thing since if it didn't you first time through you...
View ArticleAnswer by Jessy
In short, array[i - i] gives you the value of the element at the index 1 less than i.Your code does not generate those values. It either generates 40-160, or just 40, for index 1-4 in gearSpeeds. You...
View Article