Hey Tony. I'm looking into animating UI elements like quest tracks and speech bubbles, just wanted to check the best way of doing this.
I'm using the Basic Standard Quest Tracker HUD. Right now, the quest tracks just switch on and off when a quest becomes active. Is there a way to have them animate in and out? (Perhaps with different animations depending on whether you succeeded or failed?)
I know some of the other UI elements have Show and Hide animations, but I don't think there are any on the quest UI elements? Unless I'm missing them.
Thanks!
Animating the quest UI (and other UI things)
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Animating the quest UI (and other UI things)
Hi,
Speech bubbles are easy to animate. In fact, you can download the Feel + Text Animator + Dialogue System demo scene and use its animations as-is. We had a quality pass from Renaud of More Mountains (maker of Feel), who is an art designer, so the bubble has a good feel to it.
The StandardUIQuestTracker doesn't natively do any animation. You'll have to make a subclass and override RefreshAtEndOfFrame() and AddQuestTrack().
Alternatively, some devs use Animmal's Ultimate Notification System asset to show an animated notification when a quest becomes active. Animmal uses it themselves for The Way of Wrath, which uses the Dialogue System and Quest Machine.
Speech bubbles are easy to animate. In fact, you can download the Feel + Text Animator + Dialogue System demo scene and use its animations as-is. We had a quality pass from Renaud of More Mountains (maker of Feel), who is an art designer, so the bubble has a good feel to it.
The StandardUIQuestTracker doesn't natively do any animation. You'll have to make a subclass and override RefreshAtEndOfFrame() and AddQuestTrack().
Alternatively, some devs use Animmal's Ultimate Notification System asset to show an animated notification when a quest becomes active. Animmal uses it themselves for The Way of Wrath, which uses the Dialogue System and Quest Machine.
-
- Posts: 195
- Joined: Mon Jul 01, 2019 1:21 pm
Re: Animating the quest UI (and other UI things)
Thanks Tony, that's really helpful. I'll try the subclass method (:
Re: Animating the quest UI (and other UI things)
Glad to help! In your subclass I recommend keeping a list of all quests that are currently being shown. In AddTrack, check if the quest is in the list. Roughly, the idea would be:
Code: Select all
public class MyQuestTracker : StandardUIQuestTracker
{
public List<string> alreadyShown = new List<string>();
protected override void AddQuestTrack(string quest)
{
base.AddQuestTrack(quest);
if (!alreadyShown.Contains(quest))
{
alreadyShown.Add(quest);
var questTrack = container.GetChild(container.childCount - 1).GetComponent<StandardUIQuestTrackTemplate>();
questTrack.GetComponent<Animator>().Trigger("Pop In"); // Animate a pop-in effect.
}
}
}