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:
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
The faster way is to do it through the editor :P
(http://i.imgur.com/Od016hx.png)
Yeah, I had forgotten about that. :o