So basically I have a cooldown timer which is set at the start of the function along with a boolean saying that it is active (thus preventing it from executing again if it is active). Then it executes the code and gets to the end.
while(skillsActive[1])
{
skillsCooldown[1]=skillsCooldown[1]-(1*Time.deltaTime);
if(skillsCooldown[1]<=0)
{
//skillsCooldown[1]=0.0;
skillsActive[1]=false;
}
}
This immediately sets the skillsCooldown[1] to 1 frame of time passing as thought it was initially at a value of 0 even though for the fun of things I ramped it up to 9001. Been coding for a few hours, maybe another set of eyes can see whats going on?