Certain animations on my character don’t want to change speed, this is the code I use to change the animation speed. mWeapons is a array to hold all the different melee weapons my character has, each weapon has three attack animations so that’s what the different strings are for, they hold the animation names, playing animations works fine, but I can’t seem to get the speed to change, I’ve tried everything from -1 to 10000 but nothing works.
var mWeapons : Transform[];
var mAttack1s : String[];
var mAttack2s : String[];
var mAttack3s : String[];
var Aspeed : float = 2.0;
function Start(){
for(var c = 0; c < mWeapons.length; c++){
animation[mAttack1s[c]].speed = Aspeed;
animation[mAttack2s[c]].speed = Aspeed;
animation[mAttack3s[c]].speed = Aspeed;
}
}
After this didn’t work I tried just doing one weapon to test it out with this code.
function Start(){
animation["hAttack1"].speed = Aspeed;
animation["hAttack2"].speed = Aspeed;
animation["hAttack3"].speed = Aspeed;
}
But that didn’t work either, is there a problem with either of my scripts?