Ok, so if you're thinking that by using the same depth as the first bullet will replace it, like it just switches out the movieclips and keeps all the properties, you're wrong. It should remove that first movieclip and make bullet2 at the origin ( 0,0 ) though, and then you'll just have to place it at the right spot.
Maybe you could make the second bullet at an unused depth, copy over some of the properties from bullet onto bullet2, and then remove bullet?
Also, you're using attachMovie, all you need is to make sure those movieclips have the linkage identifer, you don't need them on the scene to attach. If you were using duplicateMovieClip, then you'd need them on the scene.
I don't really understand what you're trying to do with the skills, because in you're example code, you were trying to swap out a bullet it seemed.
If you want to do skills something you could do is create some external classes for the skills, idk if that's outside of you're skill level or not, but you should at least look into it and think about it.
Otherwise, either
1. Have a bunch of variables that hold the amount of time the skill has been recharging and the time it takes for it to totally recharge
ex. :
sk1del++;
if(sk1del >= sk1max)
{
sk1del = 0;
sk1charged = true;
}
2. You could have an array of booleans for each skill if it's recharged or not.
skills = new Array();
for(i=0;i<9;i++) //Fill the skills array with 9 true's .
{
skills.push(true);
}
timers = new Array();
function useSkill1()
{
if(skills[0]) //If we have the skill available for use...
{
timers.push(setInterval(recharge,1000,timers[timers.length],0));
//We tell it to call the recharge function in 1000 ms (1 second)
//given the parameters timers[timers.length] and 0
//0 is the array index of the skill, so skill 1 is the first, which is 0
skills[0] = false; //The skill has been used
//Put code for doing whatever the skill should do here, ex. increase player health.
}
}
//Gonna have to rewrite that function for each skill
function recharge(timer,skillNum)
{
skills[skillNum] = true;
}
That help at all?