Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: misterlee on January 11, 2017, 10:21:45 AM

Title: PlayMaker and NPC Chat compatible?
Post by: misterlee on January 11, 2017, 10:21:45 AM
I'm trying to trigger chat 'conversations' (it's actually the player character talking out loud, not to another NPC) and using PlayMaker. Usually it's possible to use 'Send Message' to interact with a script on another Game Object, but the 'ChatManager' that NPC Chat uses is not a Game Object in the scene, it's an object in the assets folder. So I don't seem to be able to use Send Message since that requires a Game Object, not just an Object.

I need to send the ChatManager an int value for which NPC is talking and one for the conversation number to use.

Does anyone know if it's possible to do this some other way or how PlayMaker and NPC chat can work together?
Title: Re: PlayMaker and NPC Chat compatible?
Post by: Fat Pug Studio on January 12, 2017, 02:52:07 AM
Is it this asset?

https://www.assetstore.unity3d.com/en/#!/content/9723
Title: Re: PlayMaker and NPC Chat compatible?
Post by: misterlee on January 12, 2017, 11:51:13 AM
Is it this asset?

https://www.assetstore.unity3d.com/en/#!/content/9723

That's the one, yes.


In the mean time I've had some help from the guy who made the asset, in this thread - https://forum.unity3d.com/threads/npc-chat.231618/ and it's all good now.

Basically I needed a way to send the variables to control which conversation would pop up to the chat manager which is a scriptable object and not in the scene. But PlayMakers 'Send Message' action only works with a game object in the scene (as far as I can tell) so a go-between script was required to forward the variables from the scene to the scriptable object.