Can still show dialogue when enemy is dead

I have just reached the current last lecture of the Dialogue and Quest tutorial, which is awesome and I am really enjoying.

Sorry if I am getting ahead here, I am not sure if it has just not been covered yet, but when I kill the enemy 6 the one with the dialogue code on, I still get the dialogue cursor and can replay the dialogue even though he is dead. Is there a simple way to fix this? Please let me know if it is in a future video and I can wait until then.
Thank you
Kind Regards

1 Like

Oh, my, you can! This is a simple check in AIConversant…

Add if(GetComponent<Health>().isDead) return; into your HandleRayCast just before the if (Input.GetMouseButtonDown(0)) call.


Hi Brian,
Thank you for your reply. That is a nice simple fix too.

Kind Regards

It’s an important fix, though. We’re making an RPG, not a seance.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms