Community

SCI Programming => Mega Tokyo SCI Archive => Topic started by: Wilco on May 17, 2003, 04:40:25 AM

Title: Hide() function
Post by: Wilco on May 17, 2003, 04:40:25 AM
I'm a little stressed here.  :-\ I'm trying to hide my ego from the screen, so that I can initiate an animation (which contains the ego) and then once the animation has finished I want to be able to show the ego again. Anyone know how I can do this? This is my script, which hides the ego, initiates the animation, but when the animation finishes I don't know how to display my ego again.

        (if(Said('use/litter'))
          (if(< (send gEgo:distanceTo(litter)) 10)
            (litter:
              init()
              setCycle(End)
              cycleSpeed (5)
            )
            (send gEgo:hide())
          )(else
            Print("You're not close enough")
          )
        )

 ???
Title: Re:Hide() function
Post by: Brian Provinciano on May 17, 2003, 04:53:57 AM
What you want to do can be easily done, but you are better off not hiding the ego, but rather changing the ego's view/animation/cycle to the new animation, then back to the old when finished. The info is in the help file.
Title: Re:Hide() function
Post by: Wilco on May 17, 2003, 05:11:32 AM
OMG that's so easy I didn't even think of it! I was convinced the problem was in the code, ok so I will just change the view and add my animation to the ego's view. Thank Brian!