#popup window closing

1 messages · Page 1 of 1 (latest)

sly merlin
#

Just gonna make a thread for this cause i cant scroll enough to see the old messages

mystic knot
#

oh ok ty

sly merlin
#
//public class Exclaim : MonoBehaviour
{
    public Animator animator;
    public string text;
    public string txt;
    // Start is called before the first frame update
   
    void Start()
    {
        animator = GetComponent<Animator>();
    }
    
    public void isExclaim()
    {
        animator.SetBool("Exclaim", true);
    }
    public void isClosed()
    {
        animator.SetBool("Exclaim", false);
    }
    public void whiteBoard()
    {
        PopUpSystem pop = GameObject.FindGameObjectWithTag("GameManager").GetComponent<PopUpSystem>();
        pop.PopUp(text, txt);
    }
}```

https://paste.ofcode.org/BaKJrpuZTTsbjijdxyfjyY
#

ok thats everything here

#

So i assume whats happening is when you close it, the animator variable gets set to close and never gets set back to its original value

mystic knot
#

oh

sly merlin
#

you would set it back when you open the menu

mystic knot
#

yeha

#

heres the video as well if u need to see it

sly merlin
#

yea i saw, do u know how to set that trigger back?

#

you would have to do it when u open the menu

mystic knot
#

u mean call pop again?

#

the pop condition?

sly merlin
#

no, the issue is that "close" was set to trigger, and never set to stop

mystic knot
#

hm

#

okay i'll try to add this to when i call pop again

sly merlin
#

but itd be for the button that opens the menu

mystic knot
#

no i have no button for the pop up

#

the isClosed in that is also for another animation

#

the popup is the whiteborad funciton

#

OMG

#

IT OWRKS NOW

#

TYSM

sly merlin
#

im not entirely familiar with this code style honestly but glad it works

mystic knot
#

the reset trigger

#

rlly helped

sly merlin
#

np

mystic knot
#

i rlly appreciate it! i was almost gonna pull an all nighter on this

#

🙏

sly merlin
#

typically u can google the function u are using, and the unity docs will have examples of how to use it

mystic knot
#

i cant express all my gratitude

sly merlin
#

in that example i just saw ResetTrigger