Script change of conversation
Posted: Wed May 29, 2019 6:24 am
HI PixCrushers.
I have a BarkOnIdle script. The NPC barks random calls to barks like: "Get me out of this oven!!". The BarkOnIdle selects conversation nodes set to 'random'. Once out the NPC follows player, and cracks jokes.
I tried to keep the jokes in the same conversation, using a boolean to defeat access to them, but they are still being selected from the BarkOnIdle random anyway. Not sure if this is intended behaviour?
In any case. It would seem cleaner to switch the NPC conversation from within my scripts to new conversation (the one with jokes). I was trying to work out how to do this?
I've passed a reference to the BarkOnIdle in the code in question
[SerializeField] BarkOnIdle barkOnIdle;
I'm looking for something like
barkOnIdle.conversation = DialogueManager.getConversation("NPCJOKES");
Thanks!
....
I have a BarkOnIdle script. The NPC barks random calls to barks like: "Get me out of this oven!!". The BarkOnIdle selects conversation nodes set to 'random'. Once out the NPC follows player, and cracks jokes.
I tried to keep the jokes in the same conversation, using a boolean to defeat access to them, but they are still being selected from the BarkOnIdle random anyway. Not sure if this is intended behaviour?
In any case. It would seem cleaner to switch the NPC conversation from within my scripts to new conversation (the one with jokes). I was trying to work out how to do this?
I've passed a reference to the BarkOnIdle in the code in question
[SerializeField] BarkOnIdle barkOnIdle;
I'm looking for something like
barkOnIdle.conversation = DialogueManager.getConversation("NPCJOKES");
Thanks!
....