[sequencer] find objects and actor accross scene possible ?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
Strook
Posts: 70
Joined: Fri Nov 08, 2019 10:51 am

[sequencer] find objects and actor accross scene possible ?

Post by Strook »

Hello ! Im digging into sequences and wanted something really simple like :

Code: Select all

LookAt(Player,1)
This dialogue is triggered from an NPC that is not the player. The player has a dialogue actor component and is set to "Player".
However the Player is on different scene (DontDestroyOnLoad) from the NPC (SceneA).

I tried a lot of thing (this was very helpful btw, https://www.pixelcrushers.com/phpbb/vie ... 274#p20274) however it seems i cannot manage to ever find an object that is on another scene. It work fine when both object are in the same scene (SceneA).

Am i missing something ?
thanks, and sorry for spamming with questions !
Currently working on ->Squeakross: Home Squeak Home<- Using Dialogue System Save System and other features.
Previous game made with Dialogue system ->The Spirit and The mouse<-
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: [sequencer] find objects and actor accross scene possible ?

Post by Tony Li »

Hi,

The LookAt() sequencer command looks at a GameObject with the specific name (e.g., named exactly "Player"). Or you can specify the special keyword 'speaker' or 'listener' to use the GameObjects that the conversation is using as the speaker or listener.

You probably want to use: LookAt(listener,1)
This will make the speaker (NPC in this case) look at the listener (presumably the player in this case).

See Character GameObject Assignments for details on how to make sure the right GameObjects are used as the speaker and listener.
Post Reply