Display text not displaying at all

  • #1, by bad_appleSaturday, 12. July 2014, 21:22 6 years ago
    Hi
    I just downloaded the free version, so I can see if it would benefit my gaming experience and find it for the most part, relatively straight forward. However, 1 problem I am stuck on is that when I set an action on an object in the scene and set 'Display text', no text is printed. The font is fine as action text is printing. Is there something I am missing? For the record, I created a Controllable Character with no animation and have set a definition script so the text should be set according to the script. I also notice that some posts in the wiki have <p2> etc after the text, but I cannot find any reference to them.

    I am sure it is something that I have overlooked as the docs are quite sparse and the only ref tutorials I could find relate to version 3??
    Many thanks with your help on this.

    Screen size of game 800 x 600

    -- let's create the function which sets the position of displayed text
    function setTextPosHook(text)
    -- if text owner is a character then...
    if text:getLink(VTextOwner):getId().tableId == eCharacters then
    text:setValue(VTextPosition, {x=545, y=260})
    return true
    end
    end

    -- let's create the event listener for handling position of displayed text
    registerHookFunction("setTextPosition", "setTextPosHook")
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12

    Newbie

    2 Posts


  • #2, by AlexSunday, 13. July 2014, 00:39 6 years ago
    Hi,

    is the text printed if you don't use your text hook function? If yes then the problem must be the script, otherwise it's the font (font is set in character properties tab).

    <p2> is a pause of 2 seconds. you can find some examples in the wiki: http://wiki.visionaire-tracker.net/wiki/Displayed_Text

    Great Poster

    378 Posts

  • #3, by bad_appleSunday, 13. July 2014, 10:44 6 years ago
    Thank you for those suggestions Alex. It turned out that I hadn't set a start place in the scene for the Controllable Character. I also had a look at the wiki re the

    comment. There is no doc for how to use this piece of code. For example, <p2> = 2 secs, but what is <pa>?

    It also intrigues me why Display text has to be set through scripting when the developers could quite have easily put command buttons like when you place a character. Click on the button and place my Display text there. Simples.


    Many thanks once again.

    Newbie

    2 Posts

  • #4, by AlexMonday, 28. July 2014, 10:43 6 years ago
    <pa> waits until the speech file is finished. You can find more information and examples in the wiki:
    http://wiki.visionaire-tracker.net/wiki/Displayed_Text

    if you use the speaker text action part you don't need scripting to define the position where the text is displayed.

    Great Poster

    378 Posts

Write post