Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - an_epileptic_monkey

#1
I have my character speech set up to display on a GUI with a button. Using btn.Animate() I can show a view loop of a talking head alongside the characters text. I would like a similar display for when dialog options are presented. My dialog options are set to display on a drawing surface using the technique in the wiki.

Since dialog_options_render() uses a drawing surface to display it's text, I did some research into drawing surfaces. So far I have found no clear way to create a looping display of sprites. From my understanding, I would be using info.Surface.DrawImage() to place one frame of the talking head on the surface, then I would have to use info.Surface.Release() for it to actually display the sprite, and then redraw and re-release it again and again to create the animation effect, which would not tie in well with info.Surface, since the game releases it at a very specific time.

The second thing I tried is having a GUI with a button (as with speech), and placing g.Visible = true; btn.Animate() inside of dialog_options_get_dimensions(). That miraculously worked to display the talking head, only now I can't make it disappear! If only there was a way to hook g.Visible = false into the mouse clicking on a dialog option. Or if I could keep track of whether the player is not on a dialog options screen and have repeatedly_execute() turn g.Visible off.

If anyone has any information on how to proceed, I would be very grateful. Perhaps I missed some information to do with drawing surfaces, or there's a simple way to detect when I leave a dialog options display. Or  is there an even more obvious thing I missed from the very beginning?
SMF spam blocked by CleanTalk