I'm pretty sure this is just a syntax problem, but an hour or so on google has not solved my problem. I'm trying to make a weapon selector. I can get it to work with some ugly code that amounts to (pseudocode):
needless to say this would be very ugly to do for a dozen weapons. I want to put them into a list on an array but I can't seem to make it work. I'm declaring these weapons as Transforms and assigning them in the inspector, but how do I stuff them in a list such that I can later instantiate an item in that list? I'm using boo which seems to be woefully underdocumented compared to the other two languages unity supports. Any assistance would be very helpful.
my current attempts (which I commented out each time I tried a different strategy) look like this:
asked Feb 28, 2011 at 04:20 AM
Then assign the prefabs to the array. Having them separately and as an array kind of defeats the purpose of using an array in the first place.
answered Feb 28, 2011 at 04:32 AM