Hello there,
I'm trying to tweak a dialog box to resize based on text and working from an older code that works given to me by a colleague. I notice they use this code in several places:
Dialog dialog = GameObject.FindWithTag (Tags.gameEngine).GetComponent <Dialog> ()
But in my version of AC I get an error message saying Tags no definition for gameEngine. Is there a new way I should be doing this?
Additionally, has Dialog.GetLine() been replaced by GetLatestSpeech()?
Thank you for any help you can give!
Comments
Dialog dialog = KickStarter.dialog;
Basic script-accessing is covered on the front page of the scripting guide. The entry for GetLatestSpeech() is here, which will return the SpeechLine class of the last speech to be played.
Any SpeechLine generated by the Speech Manager can also be found by referencing it's ID number:
SpeechLine speechLine = KickStarter.speechManager.GetLine (2);
Another option is to call a custom event whenever a speech line is spoken. This is a new feature, a tutorial for which is available here.