Forum rules - please read before posting.

[Solved] Renaming an NPC on-the-fly

edited November 2014 in Technical Q&A
I want my NPC character to introduce themselves before their name appears in their speech-box. For example, their speech to be attributed to, say,"Man" instead of their name. Then, once they've said their name switch to using their name.

I've considered just having 2 copies of their NPC prefab one with each 'name' but this seems like a bit of a long-way-round, plus I'm not certain I can easily run the swap in the middle of a conversation.

I'm considering making it possibly easier by forcing the conversation to be less interactive and simply having the mystery character introduce themselves entirely in a cut-scene after which the player will know their name.  However, I wonder if there is a fairly simple method to achieving it more interactively (say where the player might ask something ELSE before their name, given the option).

I guess this might be a feature request, or down to a custom action, because there isn't an Object:Send message "rename" to apply to a character.

Comments

  • There's a Character:Rename action, that might work?

    image
  • Totally missed that!
  • edited November 2014
    Wait. I missed it because it doesn't appear in my Character action options.

    Why do you have it but I don't? The script "ActionCharRename" is present in the Scripts>Actions folder along with all the rest.

    I'm using 2D game-type but I don't think that would matter.

    :-/
  • Ah! For some reason my Actions Manager needed refreshing.

    I had never done that since making the project months ago. I suppose the character:rename action was added after and therefore needed me to manually refresh?

    Anyway, that works. So for logic events/actions (my NPC is a prefab) I assume I can just use the original prefab name/label to identify which character is being "actioned"
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.