Problems with getting player input and name change
Problems with getting player input and name change
Hi Tony,
I followed instructions here for getting player input :
https://www.pixelcrushers.com/phpbb/vie ... hp?p=23993
... but it's not working out. The input field appears but if I click the full-screen next button, it just skips ahead. How do I force it to wait for input? (aka: disable the next button for that node only?)
There was also a different way to set up the input where I put the sequence commands into the previous node, but then the text input would appear right away while the text typewriter'd in.
While I'm here, I might as well ask my NEXT question now: I want the input text entered to then replace the Player's Display Name.
I followed instructions here for getting player input :
https://www.pixelcrushers.com/phpbb/vie ... hp?p=23993
... but it's not working out. The input field appears but if I click the full-screen next button, it just skips ahead. How do I force it to wait for input? (aka: disable the next button for that node only?)
There was also a different way to set up the input where I put the sequence commands into the previous node, but then the text input would appear right away while the text typewriter'd in.
While I'm here, I might as well ask my NEXT question now: I want the input text entered to then replace the Player's Display Name.
Last edited by LilGames on Mon Aug 28, 2023 6:44 pm, edited 1 time in total.
Re: Problems with getting player input
Hi,
Set that node's Sequence to:
And set the next node's Sequence to:
This will disable the continue button while waiting for TextInput, and the next node will enable the continue button.
Set that node's Sequence to:
Code: Select all
SetContinueMode(false);
TextInput(Text Field UI, Name:, Conversant)
Code: Select all
{{default}}; SetContinueMode(original)
Re: Problems with getting player input
Thanks, that sent me down a good path. I changed the script to alter a variable instead and then set the Actor Display Name to that variable. However now the Portrait name stays as the old value UNTIL that conversation is ended and restarted. It's like the Conversant name is cached. Is there a way to update it while in the conversation?
I tried this but the second line doesnt work:
Tried this too:
Oh maybe it's the textfield that's set once only on starting the conversation?
I tried this but the second line doesnt work:
Code: Select all
Actor["Player"].Display_Name = Variable["playerName"];
Conversant = Variable["playerName"]
Code: Select all
Variable["Conversant"] = Variable["playerName"]
Re: Problems with getting player input
I also tried this, but it didn't work:
(Variation of example found in DiscoverName package conversation)
Code: Select all
ChangeActorName("Player", Variable["playerName"])
Re: Problems with getting player input
ChangeActorName() should do it.
Are there any errors or warnings in the Console window?
Are you sure Variable["playerName"] contains the correct value?
Are there any errors or warnings in the Console window?
Are you sure Variable["playerName"] contains the correct value?
Re: Problems with getting player input
Yes, "playerName" gets the correct value because I can see it in subsequent conversation nodes if I add [var=playerName]. Also the Actor name IS changed internally, as that is displayed correctly in conversation nodes, if I use [var=Conversant].
HOWEVER what is not instantly reflected, like in your Mephistophles demo, is the Portrait name for the conversant. It stays with the original Actor name UNTIL I trigger another conversation after the previous one has finished. The portrait name is not automatically updating.
HOWEVER what is not instantly reflected, like in your Mephistophles demo, is the Portrait name for the conversant. It stays with the original Actor name UNTIL I trigger another conversation after the previous one has finished. The portrait name is not automatically updating.
Re: Problems with getting player input
In version 2.2.39 and earlier, the portrait name change takes effect the next time the actor shows a subtitle. If your player only shows response menus and not subtitles, it the portrait name won't change.
This patch, which will also be in 2.2.40, changes ChangeActorName() so it updates the portrait name immediately:
DS_ChangeActorNamePatch_2023-08-25.unitypackage
This patch, which will also be in 2.2.40, changes ChangeActorName() so it updates the portrait name immediately:
DS_ChangeActorNamePatch_2023-08-25.unitypackage
Re: Problems with getting player input
Thank you!
Re: Problems with getting player input
Glad to help!
Re: Problems with getting player input
I'm sorry, there's actually a dependency missing:
Code: Select all
Assets\Plugins\Pixel Crushers\Dialogue System\Scripts\Manager\DialogueSystemController.cs(381,60): error CS0117: 'GameObjectUtility' does not contain a definition for 'FindObjectsByType'
Last edited by LilGames on Mon Aug 28, 2023 1:52 pm, edited 2 times in total.