Forum rules - please read before posting.

Some 2D scene management and calendar simulation questions

Hi! I'm new here and want to thank Chris for this wonderful asset. It's amazing!

I'm newbie in Unity and want to learn it with AC help. For my first project I want to make a mixture of 2D point-and-click adventure and visual novel. Dialogue part of the game I want to make of static one-file frames. They should change according to conversation progress. So my first question is what the best method to manage cameras for this purpose? Should I create a new camera for each new frame or there is a better solution?

And the second question: is there some popular solutions of weekly calendar and day timing simulation in AC?

Comments

  • edited August 2017
    Welcome to the community, @pavsikakyj.

    Could you elaborate on what you have in mind regarding dialogue?  Do you mean each character has a single image for their "speaking graphic", or that the image takes up the whole screen?

    A character's speaking graphic is set in their Portrait graphic field in their Inspector, which can be placed in a Subtutles Menu by creating a new Graphic element and setting the Graphic type to Dialogue Portrait Graphic.

    If the whole screen, then you have a couple of options:
    1. Place each graphic in your scene next to one another, give each graphic an associated camera, and switch cameras when necessary using the Camera: Switch Action.
    2. Place a single graphic, but create animations so that it can change graphic.  The Object: Animate Action, with its Animation engine set to Mecanim, can be used to either change an Animator's parameters or play animations directly by name (provided they already have clips in their Animator Controllers).  If you're just getting started with Unity, Unity's documentation for more on how Animators and Animator parameters work:
    https://docs.unity3d.com/Manual/class-AnimatorController.html
    https://docs.unity3d.com/Manual/AnimationParameters.html

    Regarding time simulation: it's not something that AC is directly intended for, and there are other assets out there better suited for it.  However, if your needs are quite simple then you can try using Global Variables to record things like day of the week / month etc.

    An Integer variable can be used to store the day number, while a PopUp variable can be used to store a choice of words, such as the day of the week, or month name.  The Variable: Set and Variable: Check Actions can be used to read and manipulate them at runtime - and you can display their values using variable tokens - see the Section entitled "Text tokens" in the Manual.  A tutorial on displaying tokens in Menus can be found here.
  • Thank you for a rapid answer! Quite informative and useful.


  • ChrisIceBox described. I created animation clips for every single static image. But for now I can't get, what should I animate to get dialogue played over background image. What object should I apply Object: Animate Action? I tried to create an NPC for each dialogue, but in this case I can't get access to actions. Or maybe I should assign the whole background sprite image as a Hotspot and try to get to actions though it?

    I also have some questions, that I failed to resolve with manuals (the manuals are great - problem in me).
    1. Is it possible to show subtitles during full-screen animation with Mecanim?
    2. How to trigger such an animation from a dialogue menu?
    3. Is it possible to place dialogue options inside this animation and modify further dialogue due to player's choice?
  • If you're looking to control the animation of a regular Animator object, the best practise method is to define parameters in the Animator Controller that change which animation is played depending on their values - see the links I posted above.

    You can then change those parameter's values at runtime using the Object: Animate Action, setting the Animation engine to Mecanim, the Method to Change Parameter Value, and filling in the fields that then appear.

    However, if these graphics are all individual NPC speaking frames, you can use AC's portrait graphics feature to show/change them automatically within speech text.  See these tutorials:

    /tutorials/displaying-portrait-graphics-when-characters-speak
    /tutorials/changing-expressions-when-characters-speak

    Regarding your other questions:

    1. The chosen animation engine has no bearing on the display of speech text.  The display of subtitles is down to the user's "Subtitle" option setting, which can be set using the default Options Menu.  The designer can also set the default value from the bottom of the Settings Manager - check the Subtitles option and they'll be shown by default.

    2. Which do you mean, a speech menu or a conversation menu?  It may be that the tutorials posted further up this reply may answer this.

    3. I'm not sure what you mean exactly, but Conversations are used to display dialogue options which can cause different chains of Actions to run accordingly.  Those Actions can play different animations and run new Conversations.  You can also use the variable system to keep track of what choices the player has made, and use them to modify your Actions accordingly.  Some tutorials on conversations can be found here:

    /tutorials/creating-conversation
    /tutorials/creating-conversation-2
  • Thank you for your patience and answers!
  • Ok. I really tried with tutorials. But didn't succeed. My fault that I didn't give you the full picture of what I intend to do. Let me fix it now.

    I want to make movie-style conversations (I mean visually) - when camera looks at speaking character during a cue. And then the view switches to another speaking person for his or her conversation part. Cue text should be displayed be displayed in the lower part of the screen with AC subtitles tool and with little icon portrait. I don't want use full-size portraits and rather to show full screen graphic to keep environment and atmosphere. So I want to make my conversation scenes a series of full-screen images, that are switched when player have read the whole text provided for present image and clicked a assigned button. And I want to make subtitles played linked to a specific image. 

    I placed in a scene a single graphic. Added an animator component to it. And created for it about 10 animation clips. Each clip is a static full-screen picture. Also I created an action list. But I really don't understand, how to move further.

    Should I create parameters for animator or for action list? I looked though tutorials. But didn't find information useful for my case. How to assign an animation clip to a parameter and then switch it to another? I also failed to find, how to switch animations with Mecanim in general.

    Maybe my questions are stupid, but still I want gain an understanding of the process and will appreciate any help.
  • edited September 2017
    When it comes to controlling Animator components, AC doesn't do anything special - it just controls the parameters that you define in the Animator Controller (or plays animation clips by name if you prefer).

    Don't be confused about ActionList parameters - they share the same name and concept, but are an altogether separate feature and can be ignored here.

    The best-practice way of working with Animators is to create parameters in your Animator Controller, and then wire up transitions in the Controller between your animations.  Transitions can be made to run according to your Animator's parameters - so that different parameter values cause different animations to play.  This is not an AC concept, but a Unity one.

    The tutorials do assume a working knowledge of Unity's core concepts, but resources on these are readily available.  Again, if you're really new to Unity, go through the links I gave on August 10 to see how they work.  Unity's video tutorials are also great at getting you up to speed.

    As AC is another layer of complexity, I would recommend working without it while you prepare your Animator.  Move your graphic / animator to a fresh scene, one without AC's GameEngine, and play around with changing the parameter values manually while the game runs.  That's effectively all AC does for you, only automatically, so once you know what parameters to create and modify at runtime, you can take it back to AC and have it do the same thing.

    To control parameters through AC, create an Object: Animate Action and set the Animation engine to Mecanim (another name for Unity's Animator system).  Leave the Method as Change Parameter Value, and assign your Animator.  You'll then be able to define which parameter should be changed, what its type is, and what value it should be changed to (if appropriate).
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.