This question was
closed Mar 04, 2018 at 05:46 PM by
connorwforman for the following reason:
i figured it out
Question by
connorwforman · Mar 02, 2018 at 10:39 PM ·
animationanimatorfps
Animator bool not doing anything
There are two animations with script controlled bools that aren't working. The idle animation isn't playing.
private bool isReloading = false;
public Animation P_Recoil;
public Animator P_Controller;
void Update () {
P_Controller.SetBool ("P_isReloading", isReloading);
if (Input.GetButtonDown ("Reload") && !isReloading) {
isReloading = true;
StartCoroutine (Reload());
}
}
IEnumerator Reload () {
CurrentAmmo = 0;
yield return new WaitForSeconds (0.0f);
reloadSound.Play ();
if (reloadSound.isPlaying == false) {
isRPlaying = true;
}
isRPlaying = false;
yield return new WaitForSeconds (ReloadTime);
CurrentAmmo = MaxAmmo;
isReloading = false;
}
Comment
@chiker Which part? The actual grid setup w/ transitions or the picture of it on an object?
The part that is not working (idle to reloading or something like that)
Answer by connorwforman · Mar 03, 2018 at 10:54 PM
@chiker (I had to reply because the comment wasn't working)
For the transition on the left:
Follow this Question
Related Questions
Minor Issue: Gun slide animation not working all the time 0 Answers
Unable to play Death Animation. Parameters missing? 1 Answer
Animation of my enemies dont stop in my FPS game 0 Answers
Humanoid Animations 0 Answers
How to make player rotate 180° and run that direction with mecanim + vice versa? 1 Answer