I may have missed it, but I was wondering if there's a way to create custom variables (not hardcoded shortcuts) that can change, like entrytag, node to node?
I've got animated portraits and a different panel for left and right sides of the screen. Normally PC is on left, but sometimes NPCs are on the left too. The portrait animator is named NPC Portrait and PC portrait. I was just trying to contemplate the best way to do:
AnimatorPlayWait(current_speaker_portrait, Sniff);
Sequencer custom variables?
Re: Sequencer custom variables?
Hi,
You may be able to get clever with [var=variable] and/or [lua(code)] tags.
For example, the variable Variable["ConversantIndex"] is the index into the Lua Actor[] table for the conversation's conversant. For example, if the conversation is between the actors "Player" and "Adam", Variable["ConversantIndex"] will be "Adam".
If Adam has a custom field "current_speaker_portrait" in the dialogue database, then you can get it like this:
Sequences process [var] and [lua] tags, so you can use a sequence like this:
You may be able to get clever with [var=variable] and/or [lua(code)] tags.
For example, the variable Variable["ConversantIndex"] is the index into the Lua Actor[] table for the conversation's conversant. For example, if the conversation is between the actors "Player" and "Adam", Variable["ConversantIndex"] will be "Adam".
If Adam has a custom field "current_speaker_portrait" in the dialogue database, then you can get it like this:
Code: Select all
[lua(Actor[Variable["ConversantIndex"]].current_speaker_portrait)]
Code: Select all
AnimatorPlayWait([lua(Actor[Variable["ConversantIndex"]].current_speaker_portrait)], Sniff);
-
- Posts: 222
- Joined: Wed Jan 22, 2020 10:48 pm
Re: Sequencer custom variables?
Oh interesting! Thanks for all the information/example!
I'll see if I can get it to work this way, and if not I'll just write a custom SequencerCommand for the special portrait animations.
Thanks for your help!
I'll see if I can get it to work this way, and if not I'll just write a custom SequencerCommand for the special portrait animations.
Thanks for your help!
Re: Sequencer custom variables?
Glad to help!