Talking with characters in portrait view

  • #1, von LebosteinDienstag, 22. August 2017, 15:56 Uhr vor 7 Jahren
    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!

    Tastenjunkie

    621 Posts


  • #2, von LebosteinDienstag, 22. August 2017, 16:18 Uhr vor 7 Jahren
    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."

    Tastenjunkie

    621 Posts

  • #3, von afrlmeDienstag, 22. August 2017, 16:27 Uhr vor 7 Jahren
    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.

    Foren Imperator

    7285 Posts

  • #4, von LebosteinDienstag, 22. August 2017, 17:07 Uhr vor 7 Jahren
    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?

    Tastenjunkie

    621 Posts

  • #5, von afrlmeDienstag, 22. August 2017, 18:33 Uhr vor 7 Jahren
    I think you have to do that via the max line width field for each of your fonts.

    Foren Imperator

    7285 Posts

  • #6, von LebosteinMittwoch, 23. August 2017, 08:19 Uhr vor 7 Jahren
    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?

    Tastenjunkie

    621 Posts

  • #7, von afrlmeMittwoch, 23. August 2017, 13:00 Uhr vor 7 Jahren
    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.

    Foren Imperator

    7285 Posts

  • #8, von LebosteinMittwoch, 23. August 2017, 14:49 Uhr vor 7 Jahren
    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?

    Tastenjunkie

    621 Posts