Forum rules - please read before posting.

Timeline character name.

https://streamable.com/zxpdrp

When I assigned the name of the car to the "driver", it is displayed correctly, and when I added a character, his name is missing. Please tell me what did I do wrong?

Comments

  • The lack of a name showing usually means the character cannot be found in the scene.

    Check that the Constant ID value attached to the NPC (in the scene, not just the prefab) matches that listed in the Speech Track's Inspector, i.e. 578528.


  • In the "game" mode, everything is displayed correctly, but not in the game :( Tell me, what else can I check?

  • edited December 2022

    1) How are you playing the Timeline at runtime?
    2) Open up AC's SpeechTrack script and look for line 94:

    clip.speechTrackPlaybackMode = playbackMode;
    

    Immediately above it, copy/paste the following:

    if (Application.isPlaying) Debug.Log ("Speech CID: " + speakerConstantID + ", Speaker: " + speaker + ", Player line? " + playerID);
    

    When the game runs, look for Console messages that start with "Speech CID", and copy/paste them here.

  • I did as you wrote:

    What else needs to be done?

  • Replace the Debug line with:

    if (Application.isPlaying) Debug.Log ("Speech CID: " + speakerConstantID + ", Speaker: " + speaker + ", In scene? " + speaker.gameObject.activeInHierarchy, speaker);
    

    What does it then say?

    Click the new Debug line that mentions "hero-backpack-intro-01" - this will ping the object it's referring to. Does it "ping" the NPC in the Hierarchy window, or the prefab in the Project window?

    Check the "Speaker name" field for the scene instance of the NPC - that's what will be read, if it's different from that of the prefab.

  • edited December 2022


    and

    Did I do everything right or is there something else I need to fix?

  • You can remove the added line, now. It's not an issue with the Constant ID after all.

    It may be translation-related, since the NPC has a Speech Manager ID while the Car does not.

    Are you running the game in the default language? Find the Speech Manager's entry for the NPC's speaker label (ID = 158), and share a screenshot of it.

  • edited December 2022

    Yes, I'm running the game in the original language.

    Find the Speech Manager's entry for the NPC's speaker label (ID = 158), and share a screenshot of it.

  • I'm referring to the entry in the Speech Manager, i.e:

    Let's see your Speech Manager's "Languages" panel as well.

  • edited December 2022


    Is that what you meant?

  • Click on the entry (158: 'Max') to display its properties.


  • What else do you need to see to get the name in the game?

  • edited December 2022

    Enter some text into the English box in the line's entry. Does that resolve it?

    If not, open up Char.cs and look for the following inside the GetName function (around line 4137):

    if (string.IsNullOrEmpty (speechLabel))
    

    Immediately above it, copy/paste:

    Debug.Log ("Character: " + this.name + ", Language: " + languageNumber + ", Current: " + Options.GetLanguage () + ", Label: " + speechLabel + ", cached: " + cachedLabel + ", Translation: " + KickStarter.runtimeLanguages.GetTranslation (gameObject.name, displayLineID, languageNumber, GetTranslationType (0)));
    

    What shows in the Console when the character speaks?

  • edited December 2022


    Everything works in the log file, but the name of the character does not appear.

    It's kind of weird that the NPC car "Driver" works correctly, but the "Character" can't see the name.

  • The difference between the two is that the character has been added to the Speech Manager, and has no translation, while the car has not.

    I'm running the game in the original language.

    The Console message suggests you're running in English, which means that it'll rely on the English translation listed in the Speech Manager, which is currently empty.

    Did you try adding text into the English translation box?

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.