In one of my scenes I have an NPC who talks randomly. He's close to a door that takes you to another scene. The problem I'm having is that if I change scenes right when the NPC is saying something, whatever he was saying stays in the screen now forever.
Could this be a bug?
I'm using:
Thank you
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
It could be - but without more detail I won't be able to recreate it.
Please share screenshots showing everything involved - your ActionList for the NPC speaking, ActionList for the scene changing, Settings Manager, and Menu Manager for the Subtitles menu.
Hi @ChrisIceBox - sorry for the delay. Here it goes:
You basically choose either
ANIMATION
orSPEECH
and it runs an assigned Action. The Action is also injected in the Editor.Thank you, and please tell me if you need anything else.
Is the script's purpose to have the character sometimes speak when they're either idle or not speaking?
I don't recommend relying on Animator checks for this, because there may be a slight delay between the state of the character and the state of his Animator.
If you expose a public variable for the NPC:
You can then check if he's idle or talking with:
Try also the latest release of AC. If you make the above changes and it's still occuring in the latest release, we can look into further code changes.
Hi @ChrisIceBox , thanks again for your quick answer. I did both things and it's still happening.
Furthermore, now I have an additional issue with subtitles, because of which, subtitles that offscreen characters are going to say briefly appear on the center of the screen, only to be quickly repositioned on top of their Transforms. It also happens to these NPCs if they are not offscreen. I guess there's a quick fix for this in any case, or maybe it's just some misconfiguration on my part. Also, this happened after updating AC.
Please open up a new thread for the second problem, as it's unrelated to the first - and will be easier for us to discuss/manage. I'll need to see screenshots of your Menu's properties and Unity UI Canvas (if applicable).
I will attempt a recreation of the first issue - what do you have set as your "randomness" value?
Okay @ChrisIceBox , I will create another thread for the other issue later on today.
Regarding your question, I have "99.5", so it should only happen from time to time.
Can't recreate this. Let's see those Menu screenshots, as well as your updated script.
Okay:
The script is attached to a NPC's child object, not the parent wrapper that AC creates via the wizard.
I'm afraid I still cannot recreate this. If you send me a .unitypackage file that includes all files necessary for me to experience the issue, with steps on what to do, I'll take a look.
@ChrisIceBox I'll send you a slice of the project itself containing the area where the problem happens. But before that, could you try something? The character that talks, and whose text gets stuck on the screen forever when I change scene, has all his texts as two-liners. I have AC set so that I can create a single Action when I want the speech to be divided into several paragraphs, instead of having to create several speech Actions. So this guy always says one line of speech, and then another one. Then shuts up for a while. I've just thought that it could be related?
If that still doesn't reproduce it I'll send you the mini-project.
Thanks
In fact if I change all the text to be only one paragraph per Action I can't reproduce.
Very well, I'll give it a go.
No dice, I'm afraid. You'll have to PM the project over.