I have a script that disables weapons depending on the Index of an array. Something like so:
But how can I easily set SetActiveRecursively to objects that dose not equal currentWeapon? Some thing like so:
Instead of "hard-code" it the above example would be flexible but it gives errors, though.
I hope you get what I mean.
asked Aug 28 '11 at 08:20 PM
You could use a For loop to set the first item in the loop to true and everything else to false.
(Sorry. I don't know the JS syntax but you should get the general idea.)
answered Aug 28 '11 at 10:14 PM
answered Aug 28 '11 at 11:35 PM