Sequencer Command in code
Posted: Wed Nov 07, 2018 7:08 pm
Hi Tony,
I've been looking around on the site but I can't find an answer to this.
I'm trying to have the player LookAt() the NPC when a conversation is started. I could run the command from the sequencer in the dialogue node but since this is a generic camera controller script I would like to have it assigned automatically so I don't need to add it in at every conversation.
I'm trying:
public void OnConversationStart (Transform actor)
{
DialogueManager.PlaySequence(""LookAt(listener))
}
but I get a message saying: "taget is null". Could you tell me how I could feel the transform position of the NPC into that command? Also, this script is on a game object that is a child of the NPC I am trying to get.
Thanks,
Nathan
I've been looking around on the site but I can't find an answer to this.
I'm trying to have the player LookAt() the NPC when a conversation is started. I could run the command from the sequencer in the dialogue node but since this is a generic camera controller script I would like to have it assigned automatically so I don't need to add it in at every conversation.
I'm trying:
public void OnConversationStart (Transform actor)
{
DialogueManager.PlaySequence(""LookAt(listener))
}
but I get a message saying: "taget is null". Could you tell me how I could feel the transform position of the NPC into that command? Also, this script is on a game object that is a child of the NPC I am trying to get.
Thanks,
Nathan