Talking with characters in portrait view

  • #1, by LebosteinTuesday, 22. August 2017, 15:56 7 years ago
    Hi,

    what is the best way to implement a talking routine with huge character portraits like the old Sierra games (for example Freddy Pharkas) or other games (for example Tahira)?

    http://www.mobygames.com/images/shots/l/15725-freddy-pharkas-frontier-pharmacist-dos-screenshot-freddy-hires.gif
    https://i2.wp.com/ind13.com/wp-content/uploads/2016/09/20160901201344_1.jpg

    It is necessary to create each character twice, one with walking animations and one as huge portrait? How I fix a portrait character on the screen for example? Or is it possible to to configure the talking animation of a character as a portrait fixed on the screen?

    Thanks for ideas!

    Key Killer

    621 Posts


  • #2, by LebosteinTuesday, 22. August 2017, 16:18 7 years ago
    Maybe with lua? Like: "As long as character xyz is talking, display his talking text at a fixed screen position (not above the character) and display his portrait image on the screen."

    Key Killer

    621 Posts

  • #3, by afrlmeTuesday, 22. August 2017, 16:27 7 years ago
    Maybe with lua? Like: "As long as character xyz is talking, display his talking text at a fixed screen position (not above the character) and display his portrait image on the screen."

    Yes it's possible with the hoof function with the setTextPos handler. Plenty of examples floating around on the forum already. As you can see with the example on the wiki @here you can query the owner that the text belongs to, so you could create a bunch of if elseif queries to have it show the correct image depending on whose talking or you could create a more global function for it probably.

    Imperator

    7278 Posts

  • #4, by LebosteinTuesday, 22. August 2017, 17:07 7 years ago
    Thanks! I saw the text alignment is configurable too:
    https://www.visionaire-studio.net/forum/thread/-solved-chang...

    Can I set the width of the textbox?

    Key Killer

    621 Posts

  • #5, by afrlmeTuesday, 22. August 2017, 18:33 7 years ago
    I think you have to do that via the max line width field for each of your fonts.

    Imperator

    7278 Posts

  • #6, by LebosteinWednesday, 23. August 2017, 08:19 7 years ago
    OK, Thanks!

    To show the image, I think a new pop-up-interface is the best solution? How I can display or hide an interface using lua? Which type of interface I should use?

    Key Killer

    621 Posts

  • #7, by afrlmeWednesday, 23. August 2017, 13:00 7 years ago
    I think the best solution would be a single interface. Create each persons portrait inside of an interface button & then create & assign a condition to each button. Give the condition the exact same name as the character it belongs to, that way you can set the condition to true without having to create a bunch of if else queries. I assume the portraits & dialog background box will be in the exact same place for each character?

    Anyway, because you can query...
    if owner:getId().tableId == eCharacters then

    it means you could then follow it with something like this...
    Conditions[ text.TextOwner:getName() ].ConditionValue = true

    You would also need to create a event handler with the textStopped flag to make sure you reset the condition back to false.

    Imperator

    7278 Posts

  • #8, by LebosteinWednesday, 23. August 2017, 14:49 7 years ago
    Thanks. I have some problems with the interface itself.

    1. Which type I should use (main, inventory, secondary, options, misc) or does not matter?
    2. I need to add this new interface to the main character or not?
    3. How I show and hide that interface with lua commands?

    Key Killer

    621 Posts