Hi!
I just wanted to know if, in a sequence command, you can substitute a seconds value with a variable.
So instead of writing...:
Animation(die)@2.5
...we could write...:
Animation(die)@healthleft
This is a rough example, of course, because what I actually want to do is to run a PlayMaker FSM that stops the NPC talking animation at a variable amount of time that will be determined by how long the subtitle text it is.
So, is it possible to enter a variable in there?
Thank you!
Sequence command... variable instead of seconds or a message?
Re: Sequence command... variable instead of seconds or a message?
Hi,
Yes, you can do this:
where healthLeft is a Dialogue System variable. (You can use the PlayMaker action Dialogue System > Set Variable to set its value.)
Yes, you can do this:
Code: Select all
Animation(die)@[var=healthLeft]
Re: Sequence command... variable instead of seconds or a message?
Awesome!
Many thanks, now I can properly automate talking animations.
Many thanks, now I can properly automate talking animations.
Re: Sequence command... variable instead of seconds or a message?
Specifically for subtitle length, there's an easier solution than using a variable. Just use the {{end}} keyword:
The value of {{end}} is equal to the subtitle length divided by the Dialogue Manager's Subtitle Chars Per Second. If this is lower than the Dialogue Manager's Min Subtitle Seconds, {{end}} is equal to Min Subtitle Seconds instead.
Code: Select all
Animation(talk);
Animation(stopTalking)@{{end}}
Re: Sequence command... variable instead of seconds or a message?
Oh...
LOL!
It seems I was utterly clueless. Indeed this is a much better solution!
Still, I'm also happy to know a variable can be put in there. I'm sure it will come in handy in the future.
LOL!
It seems I was utterly clueless. Indeed this is a much better solution!
Still, I'm also happy to know a variable can be put in there. I'm sure it will come in handy in the future.