How to setup 4 Canvas/UIs.

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to setup 4 Canvas/UIs.

Post by Tony Li »

Here's a thought: What if you use one dialogue UI that has 4 subtitle panels (one for each wall)?

I'll put together a quick example and post it here soon.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to setup 4 Canvas/UIs.

Post by Tony Li »

Here's the example I had in mind:

WallsExample1_2019-05-24.unitypackage

If you think this approach could work, we can iron out the details of how to set up the other features you need. This example is currently non-interactive, just a proof of concept. Each wall has a subtitle panel and a Dialogue Actor component that specifies which subtitle panel the wall should use.

I'm finishing work for the day, but I'll check back in the morning.
funcookergames
Posts: 12
Joined: Tue May 21, 2019 9:36 pm

Re: How to setup 4 Canvas/UIs.

Post by funcookergames »

It will work correctly and you'll help me set it up?

Image

(Yes, I believe this should totally work for what we need).
Tony Li wrote: Fri May 24, 2019 10:05 pm I'm finishing work for the day, but I'll check back in the morning.
Not a problem at all, you've been more than helpful already. Thank you again!
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to setup 4 Canvas/UIs.

Post by Tony Li »

Let's give it a try. If it meets all your needs, it will be a simpler solution and it will use standard built-in features instead of having to do something more custom.

It will be a single conversation using a single dialogue UI. The dialogue UI will have four subtitle panels, one for each wall.

One possible catch is that, since it's a single conversation, the dialogue entry nodes are sequential. You can't have two walls typing text at the same time. Is that going to be an issue?

Please remind me how each node advances to the next one. Are some automatic after a certain number of seconds? Or does every node require some kind of user input to advance?
funcookergames
Posts: 12
Joined: Tue May 21, 2019 9:36 pm

Re: How to setup 4 Canvas/UIs.

Post by funcookergames »

Hrm, maybe that won't work then. All four walls should be able to talk to the player at any given time, independently or at the same time, depending on current room/puzzle triggers.

So far my nodes have had requirements before the player can move, even if it's just a delay(2), but I have been including the following to shut off and turn on the continue mode on a node that I allow players to skip.

OnContinueMode(false);
OnContinueMode(true)@2

In the current format, if I remove the above from nodes that I want them to be able to skip, all four walls work, just not on start (only after a level restart). If I toss that code in above, it prevents the secondary panels from firing off at all. Anytime I include a OnContinueMode(true) it fails to let the other conversations work properly.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to setup 4 Canvas/UIs.

Post by Tony Li »

Okay, let's forget the single conversation idea then.

The SetContinueMode() sequencer command works globally, so it affects all active conversations. This is probably why it's causing an issue. Not to worry; I'm sure we can turn off continue mode selectively for an individual conversation.

But, first, what is the intended conversation flow? Would you mind jotting down the timeline that you'd like it to follow? For example, something like:
  • Cube drops to floor.
  • Conversation 1 starts ("Hello cube").
    It waits for the user to press Escape to continue.
  • All walls are blank for 2 seconds.
  • Conversation 1 continues ("Cube can jump") and simultaneously conversation 2 starts ("Space bar").
    It waits for the user to press the space bar.
  • All walls are blank for 2 seconds.
  • Conversation 1 continues ("Cube can move") and simultaneously conversation 2 continues ("Arrow keys").
    It waits for the user to press any arrow key.
    The player can continue to move around using the arrow keys for the rest of the timeline.
  • All walls are blank for 2 seconds.
  • Conversation 1 continues ("Cube can look") and simultaneously conversation 2 continues (???). etc.
funcookergames
Posts: 12
Joined: Tue May 21, 2019 9:36 pm

Re: How to setup 4 Canvas/UIs.

Post by funcookergames »

During any given level, there could be lots of different triggers that may have the conversations on any given wall continue forward, or move to another conversation on that wall. There are no deaths in the game, the player will just need to reset the level to try again if they have blocked themselves in.

Ideally, I'd like to have a fast forward 'continue' function for entries that don't require feedback, as each entry will have a short delay if it continues on its own, and then once the player finishes an entire conversation for the first time, they'd be able to to skip the entire conversation. That way if they are forced to reset a level over and over again, they aren't forced to learn how to jump, move, and look over and over and over again (or whatever I am forcing them to learn). I imagine these will be two different buttons: Skip & Skip All (once unlocked).

NW Wall - Convo 1

"[Blank Wall]" - Cube Drops to Floor, cannot skip.
  • SetContinueMode(false);
    required SendMessage(CubeDrop,,MrSceneManager);
    Delay(1)@Message(CubeLanded);
"Hello Cube" - Can skip.
  • SetContinueMode(true);
    required SetContinueMode(false)@2;
"[Blank Wall]" - Can skip.
  • Delay(2);
"Cube Can Jump." - Jump Unlocks, cannot skip.
  • required SendMessage(CubeCanJump,,MrSceneManager);
    Delay(1)@Message(CubeJumped);
"[Blank Wall]" - Can skip.
  • Delay(2);
"Cube Can Move." - Move Unlocks, cannot skip.
  • required SendMessage(CubeCanMove,,MrSceneManager);
    Delay(1)@Message(CubeMoved);
"[Blank Wall]" - Can skip.
  • Delay(2);
"Cube Can Look." - Move Unlocks, cannot skip.
  • required SendMessage(CubeCanLook,,MrSceneManager);
    WaitForMessage(CubeLooked);
NE Wall - Convo 1

"[Blank Wall]" - Cube is dropping, cannot skip.
  • SetContinueMode(false);
    Delay(1)@Message(CubeLanded);
"[Blank Wall]" - Can skip.
  • Delay(2);
"[Blank Wall]" - Can skip.
  • SetContinueMode(true);
    required SetContinueMode(false)@2;
"[Blank Wall]" - Can skip.
  • Delay(2);
"Space Bar ␣" - Cannot skip.
  • Delay(1)@Message(CubeJumped);
"[Blank Wall]" - Can skip.
  • Delay(2);
"Arrow Keys" - Cannot skip.
  • Delay(1)@Message(CubeMoved);
"[Blank Wall]" - Can skip.
  • Delay(2);
"Arrow Keys & Shift" - Cannot skip.
  • WaitForMessage(CubeLooked);

SW Wall - Convo 1
(note, this could be triggered by the (Cube Looked) Message, but it is always hidden until they look anyway.

"Cube Can Leave" - Cannot skip.
  • WaitForMessage(CubeHasLeft);
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to setup 4 Canvas/UIs.

Post by Tony Li »

When NW Wall and NE Wall are both playing a skippable [Blank Wall], will a single Skip input skip both of them to the next node in their respective conversation?
funcookergames
Posts: 12
Joined: Tue May 21, 2019 9:36 pm

Re: How to setup 4 Canvas/UIs.

Post by funcookergames »

If those respective conversations are synced together, then yes, that's exactly what I am trying to do.
User avatar
Tony Li
Posts: 22055
Joined: Thu Jul 18, 2013 1:27 pm

Re: How to setup 4 Canvas/UIs.

Post by Tony Li »

Great! And by Skip button, you mean an input button like the Escape key, right?

If so, I think I have enough to put together a little test tomorrow morning.
Post Reply