Cutscene question?

Announcements, support questions, and discussion for the Dialogue System.
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Cutscene question?

Post by hrohibil »

Hi Toni

How would I achieve following scenario:

My player is on a spaceship above a city.
He approaches a jump platform where an NPC should start giving him the first objective goal. After the dialogue text is read, then I want a cutscene where the camera shows a an enemy patrolling a building rooftop, the objective is to parachute down to a nearby rooftop and snipe the enemy.

Thanks Toni

Cheers
User avatar
Tony Li
Posts: 21058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cutscene question?

Post by Tony Li »

Hi,

You can run the cutscene in the conversation. During the conversation, the camera and character are not under Invector control, so you can move them wherever you want.

For example, after the dialogue text is read, the next dialogue entry node could have blank text and a Sequence like this:

Code: Select all

Camera(Rooftop Camera Angle,,2)
This will move the camera to match the position of an (empty) GameObject named "Rooftop Camera Angle" over a duration of 2 seconds.

If your rooftop enemy is AI-controlled, then it can just walk its regular waypoints.

If it's not controlled by AI, you can animate it by changing the Sequence to something like:

Code: Select all

Camera(Rooftop Camera Angle,,2);
AnimatorPlay(Walk, RooftopEnemy);
MoveTo(Waypoint1, Rooftopenemy, 3);
AnimatorPlay(Idle, RooftopEnemy)@3
Or you could use a cutscene editor such as SLATE or Timeline and configure the sequence to run it. Example:

Code: Select all

Camera(Rooftop Camera Angle,,2);
Timeline(Rooftop Cutscene)
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: Cutscene question?

Post by hrohibil »

Wow thank you.

I will try it out today and get back to you
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: Cutscene question?

Post by hrohibil »

Ok Toni. ¨

I started truly my Dialogue journey today with this task. I am so hyped.... And very late to the game.. why have i not seen this gem before.

Ok...

I made the initial database. I am following the quick start tutorial.
I set up NPC and player, names and picture.
But already i am stuck , i cant get any message to display. I tried Ontrigger, oncollision, but nothing happens when my player comes near the npc??

How is this supposed to trigger? I want that when my player approaches the NPC ,then the conversation should start..


EDIT1: I also noticed that when dialogue text comes up in top and bottom that the Invector UI is in front. How do i make DS to always be in front?

EDIT2:
I use on Collison and i think that works now. I am just gathering questions here so i might be lucky you can answer more than one :-)
During the conversation, i want the movement and camera to freeze, is that possible? Right now when i move mouse the player is all over the place...
Also if i don't want the message to display again, so only once, is that possible?

EDIT3:
I copied the Dialogue manager from main scene and pasted into level1. Or do i not need that?
As you know i am using invector.
I played the scene, dies and restarted, but now i don't get the dialogue up at all. The console says that i am missing the database myfirst conversation ?? Can it be due to the spawn?? Cause in the dialouge "actors" tab i can see that it kept my NPC settings and text (desciption) but the player description is blank??

I will leave you be for now Toni...
Man i just want this to work so bad.............!!!!

Sorry...
There will be a lot of follow up question, but with this task, i believe when its over i would have learn most of the fundamentals..
User avatar
Tony Li
Posts: 21058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cutscene question?

Post by Tony Li »

Hi,

Examine the example scene included in the Invector Support folder. It demonstrates how to set up the player and NPC. Briefly:
  • Add the Dialogue Manager prefab to the scene.
    • Assign your dialogue database.
    • Set the Dialogue Manager's Canvas > Sort Order to a higher value than Invector's Canvas.
    • Untick the Input Device Manager component's Control Cursor State checkbox.
    • Also add a copy of this same Dialogue Manager prefab (now that you have it configured) to the Start scene.
  • Add a Dialogue System Invector Bridge component to the player GameObject.
    • Optional: Add a Dialogue System Events component to hide Invector's UI during conversations.
  • On the NPC, add a trigger collider, vTriggerGenericAction, and Dialogue System Trigger. See the section titled "To set up interactable NPCs" in the manual.
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: Cutscene question?

Post by hrohibil »

Wow..

Thank you sooooo much........

Right now i am stuck with two things.

Setting up the NPC following the manual point number 4: Configure the vTriggerGenericAction's OnPressActionInput() event to call the DialogueSystemTrigger's OnUse method and deactivate vActionText.
I drag the diallouge Manger into the OnPressAction Input field, but fro here i cant find the onUse??

Also when i hit play the NPC sinks slowly though the platform until he falls down completely. When i disable the vTriggerGenericAction he does not??:
FIXED the falling: I had to add the vTriggerGeneric on its on empty gameobject and not directly on the NPC.

Please see images below: How i setup my NPC, does all the components look correct, there are two images.
I added a box collider and made it a trigger.
I added a actionText_examaple as a child gameobject and set it to inactive as per manual.

NEW UPDATE (NEW ISSUE):
After all the above, i noticed now that my menu dont work any more. When i am in gameplay and press the BACSPACE i get a console error "Arguementexception: methid are incompatible.... see below





Image
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: Cutscene question?

Post by hrohibil »

Ok I got a lot of it solved.

When copy the DS manager from scene to main title some of the events got missing.

So at this point it’s still this step I can’t figure out?

Setting up the NPC following the manual point number 4: Configure the vTriggerGenericAction's OnPressActionInput() event to call the DialogueSystemTrigger's OnUse method and deactivate vActionText.
I drag the diallouge Manger into the OnPressAction Input field, but fro here i cant find the onUse??

Cheers...
User avatar
Tony Li
Posts: 21058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cutscene question?

Post by Tony Li »

Hi,

Add a Dialogue System Trigger to the NPC. Configure it to play a conversation. Configure the OnPressAction() to call this Dialogue System Trigger's OnUse.

Don't point the OnPressAction() to the Dialogue Manager.
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: Cutscene question?

Post by hrohibil »

Ok I did all that.
Only thing is that in the drop down the “start conversation” is the only option which is greyed out.. ?

What actually will this do? It seems like as it is now the dialogue starts as intended when my player enters the trigger area??
User avatar
Tony Li
Posts: 21058
Joined: Thu Jul 18, 2013 1:27 pm

Re: Cutscene question?

Post by Tony Li »

If you've configured the Dialogue System Trigger to start the conversation when entering a trigger area, that's fine. You don't need to do anything else.

The link I provided describes how to use Invector's interaction system to start conversations instead of just entering a trigger area.
Post Reply