Animated sprites for dialogs (custom dialog script)

Started by Diarandor, January 08, 2017, 11:39:57 AM

Previous topic - Next topic
I was asked by @Porksteak to explain how to use the animation sprites of my custom dialog box:
https://github.com/Diarandor/repository/blob/master/data/scripts/dialog_box.lua
https://www.youtube.com/watch?v=CRRcZjAwMw8
My old script does not explain how to use this feature (I forgot to add these explanations). I post this here so anyone will know how to use it:

An example would be this dialog:
Code (Lua) Select

dialog{
  id = "old_man.thanks",
  animation = "talking",
  animation_sprite = "dialog_old_man",
  text = [[
Thanks for saving my
cats, young man.
See you later!
]]
}


The (optional) sprite of the character has to be located in the path given by the concatenated string:
"dialogs/" .. dialog.animation_sprite
and the animation used is the one given by the string: dialog.animation
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."


Yeah, I had forgotten about that. :o
"If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you."