I am making a game of tanks, which therefore involves a lot of wheels. Rather than make a new script for each vehicle I want to make just one flexible script.
I have gotten as far as making a bulletin array, but I don't know how to change the torque of wheels when they are inside an array.
To change the values within an array, you must "iterate" through it (or over it - both seem to be correct terms).
A common way to do this is with a "for" loop. You can also do a "foreach" loop.
In your case, you will need to run through all of your wheels with a for or foreach loop and do something to it...
The only note I would throw out there is: Do you need to work all the wheels? Can you "drive" your tanks in a different manner, and then simply run the wheels as a visual effect?
answered Sep 08 '11 at 08:14 PM
Little Angel ♦♦