Ok I have an interesting problem, I’m working on a dual stick shooter hack-n-slash game, and I need to be able to quickly and easily add new weapons in without going in and changing lots of code. What I’m trying to accomplish is have a int variable that lets me specify how many weapons there will be, then depending on that I’m trying to make variables with a number extension at the end, then add all those to an array. That way I can quickly and easily call the weapons and there animations in the script and easily add them in the inspector or whatever. (basically I need an array that can hold an infinite number of String[ ] arrays to hold animations, but I cannot figure out how to do that, I tried something like this, but I know that it isn’t right).
var mwCount : int;
var CurrentAnimSet = new Array();
function Start(){
for (var a : int = 0; a < mwCount; a++){
var mwWeapon(a) : string[];
CurrentAnimSet[a] = mwWeapon(a);
}
}