Dialog system questions and troubles

  • #10, by James WoodallSaturday, 17. December 2016, 23:19 8 years ago
    Also, thanks to everyone who's replied so far.  You're making this journey to producing this game a lot faster and easier on me.  Once I can get these core systems down I'll hopefully be full steam ahead for the rest of the game's recreation.

    Newbie

    14 Posts


  • #11, by afrlmeSaturday, 17. December 2016, 23:41 8 years ago
    You can't change the image of a scene object, but you can create multiple animations inside of the animation tab of a scene object & play/stop any you like with an action part. Or you can use a single animation that contains all of the frames. It's very easy to force the engine to loop a single frame of a playing animation.
    ActiveAnimations["name of animation"].AnimationFirstFrame = 1
    ActiveAnimations["name of animation"].AnimationLastFrame = 1

    ... in that example I am forcing it to play the first frame only, however I recommend creating a workflow function inside of the script tab to make things much faster & easier to type.

    So, what you would do is go to the script tab. Create a new script. Leave it set as definition type (default) & add this to it...
    function setAnimFrame(anim, a, b)
     if b == nil then b = a end -- fallback in case you only enter a value for "a"
     ActiveAnimations[anim].AnimationFirstFrame = a
     ActiveAnimations[anim].AnimationLastFrame = b
    end
    

    Now to use that anywhere in your game, you would create an execute a script type action part & type something like this into it...
    setAnimFrame("example", 5) -- forces animation "example" to loop frame 5
    

    ... alternatively you can enter 2 values to force it to loop between x & y frames, like so...
    setAnimFrame("example", 3, 7) -- forces animation "example" to loop between frames 3 & 7
    

    Anyway, hope this helped a little, but I'm guessing I'm just making things more complicated? Sorry, I often resort to scripting for most things as it's often less work than trying to come up with an action part/in-editor only workaround.

    Imperator

    7285 Posts

  • #12, by afrlmeSaturday, 17. December 2016, 23:42 8 years ago
    You can't change the image of a scene object, but you can create multiple animations inside of the animation tab of a scene object & play/stop any you like with an action part. Or you can use a single animation that contains all of the frames. It's very easy to force the engine to loop a single frame of a playing animation.
    ActiveAnimations["name of animation"].AnimationFirstFrame = 1
    ActiveAnimations["name of animation"].AnimationLastFrame = 1

    ... in that example I am forcing it to play the first frame only, however I recommend creating a workflow function inside of the script tab to make things much faster & easier to type.

    So, what you would do is go to the script tab. Create a new script. Leave it set as definition type (default) & add this to it...
    function setAnimFrame(anim, a, b)
     if b == nil then b = a end -- fallback in case you only enter a value for "a"
     ActiveAnimations[anim].AnimationFirstFrame = a
     ActiveAnimations[anim].AnimationLastFrame = b
    end

    Now to use that anywhere in your game, you would create an execute a script type action part & type something like this into it...
    setAnimFrame("example", 5) -- forces animation "example" to loop frame 5

    ... alternatively you can enter 2 values to force it to loop between x & y frames, like so...
    setAnimFrame("example", 3, 7) -- forces animation "example" to loop between frames 3 and 7

    Anyway, hope this helped a little, but I'm guessing I'm just making things more complicated? Sorry, I often resort to scripting for most things as it's often less work than trying to come up with an action part/in-editor only workaround.


    Imperator

    7285 Posts

  • #13, by James WoodallFriday, 30. December 2016, 19:10 8 years ago
    Your posts helped; this was a complicated problem to begin with.  Not surprising that it requires complicated work to make it do as I'd like.

    I'm now dealing with other dialog system problems.  I'm not sure how to debug this or tell what's causing the freeze - but it's reliable.  Each time I select my first option of this dialog, the game freezes.

    Edit: Through process of elimination, I've figured out it's being caused by me doing a display object text.  The object exists though -- so I'm not sure why it's causing a freeze when I change its text to something else?

    Newbie

    14 Posts

  • #14, by afrlmeFriday, 30. December 2016, 20:33 8 years ago
    Quick question: have you created a line break in any of the display texts? Visionaire Studio seems to hate it since a few updates back if you create any display texts where text is spread out over multiple lines & for some reason it causes the player to freeze. In an older version it used to just display the text on multiple lines...

    Another VS user contacted me outside of VS forum a couple or so weeks back with freezing issues too & it turned out to be a display text in which they had dropped part of the text to another line by pressing enter.

    I've linked some noted screenshots I created for the other member below.

    https://i.gyazo.com/27437081bf6b61e75871c9b434478df1.png

    https://i.gyazo.com/fb677cbd6cc402f4cd56388b6606b582.png

    https://i.gyazo.com/fe5bb4e6988590a85eacec6c48461524.png

    Anyway, hope this helps you resolve the issue. wink

    Imperator

    7285 Posts

  • #15, by James WoodallSaturday, 31. December 2016, 16:07 8 years ago
    Quick question: have you created a line break in any of the display texts? Visionaire Studio seems to hate it since a few updates back if you create any display texts where text is spread out over multiple lines & for some reason it causes the player to freeze. In an older version it used to just display the text on multiple lines...
    That appears to have been exactly it. I suppose nobody on staff/testing tried out the latest version with any sample dialog with a paragraph marker in it.

    I'm curious where you learned the format code 'p'?  It doesn't appear to be HTML since it's causing a pause instead of marking a paragraph.  Is there a full accounting of those format codes somewhere on the wiki?

    Newbie

    14 Posts

  • #16, by sebastianSaturday, 31. December 2016, 16:15 8 years ago

    Thread Captain

    2346 Posts

  • #17, by James WoodallSaturday, 31. December 2016, 16:50 8 years ago
    here it is:


    Awesome.  That helps out immensely.  With that, everything appears to be running as it should be now and I can begin the game's reproduction and expansion in earnest.  Thanks, sebastian and AFRLme.  I'll make a note to include y'all in the game's credits!

    Newbie

    14 Posts

  • #18, by afrlmeSaturday, 31. December 2016, 17:01 8 years ago
    Quick question: have you created a line break in any of the display texts? Visionaire Studio seems to hate it since a few updates back if you create any display texts where text is spread out over multiple lines & for some reason it causes the player to freeze. In an older version it used to just display the text on multiple lines...
    That appears to have been exactly it. I suppose nobody on staff/testing tried out the latest version with any sample dialog with a paragraph marker in it.

    I'm curious where you learned the format code 'p'?  It doesn't appear to be HTML since it's causing a pause instead of marking a paragraph.  Is there a full accounting of those format codes somewhere on the wiki?
    Aye, no we rely on the VS users to test the engine & myself. I only test things as I use them though & I'm partial to single line display/narration texts.

    The "p" tag stands for pause. It signifies the amount of time a text should be displayed for. If you don't add a p tag at the end of a text that contains a linked speech audio file then it will automatically display for the duration of the audio file, whereas if you don't add a p tag & there is no associated audio file then it will try to guess how long it should display the text for based on the amount of characters, but it often ends up being displayed for too long.

    If you use p on its own without any number values then texts will remain displayed until closed with a left mouse click.

    If you use pa then it will display for the duration of the linked audio file - if one exists.

    If you use pa1000ms then it will display for the duration of the linked audio file if one exists else it will fallback to 1000ms (1 second) if a file does not exist or is corrupted.

    There are no other text things available in the current build besides being able to display integer or string of a linked value, which is documented in the wiki page Sebastian shared. I wrote that page a while back but it should still be correct with the current build. Anyway, the next update should have some more text related features according to SimonS - I don't know exactly what though as I can't remember off the top of my head whether Simon mentioned any of them to me & if he did then it was too long ago for me to remember.

    Imperator

    7285 Posts

  • #19, by sebastianSaturday, 31. December 2016, 18:47 8 years ago
    what happens if i have a text with lets say three pause tags between 500-2500ms and a linked audio file which has all spoken content of all 3 paragraphs in it. 
    Because there is an audio file kibked im not sure how the displayed text will be handled...  any experiences? 

    Thread Captain

    2346 Posts

  • #20, by afrlmeSaturday, 31. December 2016, 20:00 8 years ago
    what happens if i have a text with lets say three pause tags between 500-2500ms and a linked audio file which has all spoken content of all 3 paragraphs in it. 
    Because there is an audio file kibked im not sure how the displayed text will be handled...  any experiences? 
    I recommend chopping the audio file up if you plan on doing that. It's the safer bet. Multiple texts are fine when it comes to text without linked audio files though.

    Imperator

    7285 Posts