Reply To: Question on Chap 5: isTrigger

Home Forums Books Mastering Unity 2D Game Development Question on Chap 5: isTrigger Reply To: Question on Chap 5: isTrigger

#5409

Sounds like you have it set up correctly there.

You have the following:

1:A BoxCollider2D on the LeftBorder as instructed on page 148 with the MessagingClientBroadcast script (this tells the messaging manager that the player is trying to leave the scene)

2: An updated MessagingClientReceiver script attached to the GreyBeard NPC and a conversation component with conversations added to it). So when the broadcast is fired, Greybeard receives it and then this prompts the conversation to start.

Hmm, re-reading that section again (for about the 100th time) I must admit it’s not as clear as it should be, in fact the collider on Greybeard isn’t even used.

You could alternately move the MessagingClientBroadcast script to greybeard (not as a trigger collider since the messaging scripts only use Collision at that point)

 

Hope that helps.

Simon (Darkside) Jackson
@SimonDarksideJ