if(!%obj.isHupLeft) { %obj.playthread(3,shiftaway); %obj.isHupLeft=1; } else { %obj.playthread(3,leftrecoil); %obj.isHupLeft=0; }
if(!%obj.isHupLeft) { %obj.playthread(3,shiftaway); %obj.isHupLeft=1; } else if(%obj.isHupLeft) { %obj.playthread(3,leftrecoil); %obj.isHupLeft=0; }
Try else if instead of else
...
lol, I will rephrase that.
still...
if(%obj.isHupLeft) { %obj.playthread(3,leftrecoil); %obj.isHupLeft=0; } else { %obj.playthread(3,shiftaway); %obj.isHupLeft=1; }
OP, it could just be a problem with the animation itself. Have you tried playing the animation manually (using console) to see if it plays twice?
Code: [Select] if(!%obj.isHupLeft) { %obj.playthread(3,shiftaway); %obj.isHupLeft=1; } else if(%obj.isHupLeft) { %obj.playthread(3,leftrecoil); %obj.isHupLeft=0; }Would else if work better?
if(%this){ echo("True");}else{ echo("False");}
if(%this){ echo("True");}else if(!%this){ echo("False");}