Creating a reusable "You got an item!" message
Posted: Thu Feb 15, 2024 3:48 pm
Hi! So I'm currently working on an RPG with a text system very similar to the Pokémon Series. One feature from that dialogue system I'm looking to duplicate is the sequence when you pick up an item: It shows the name of the item you just got, and the amount, in the same generic textbox (without any name or picture attached to it), it plays a jingle and waits for an input.
I was wondering what steps I could take to automatically use this template multiple times. At the moment, I have created a sequencer command that takes the item's name and amount and adds it to the players inventory, and it also saves the name and amount in a variable inside the Dialogue Database ("LastItemGivenName" and "LastItemGivenAmount"). At the moment, after calling the sequences command, the next dialogue block just shows the player what they just got ("You got [var=LastItemGivenName]! (x[var=LastItemGivenAmount])"), which results in "You got Potion! (x2)" or something like that.
Now, my question is what other changes I could do to automate this further because my players will presumibly gain items many, many times during the game.
- Would it be possible to "buffer" a dialogue node (or even just text) in the sequencer command between its dialogue node and the following one via code? Since the text will always be the same. I have found no ways to do that though in the documentation.
- Is doing this inside of the Dialogue actually useful? Could I pause the dialogue until I show and put away an alert? Is it possible for the alert to wait for a continue button?
- How would I get rid of the picture and name for the invisible "narrator"? Following a previous forum post I created a Narrator Actor and tried attaching the Override Dialogue UI component to use a different Dialogue UI (one without a background graphic for the Character name, f.e.), but the component did not work like that from what I tried out.
I'm very grateful for any input!
I was wondering what steps I could take to automatically use this template multiple times. At the moment, I have created a sequencer command that takes the item's name and amount and adds it to the players inventory, and it also saves the name and amount in a variable inside the Dialogue Database ("LastItemGivenName" and "LastItemGivenAmount"). At the moment, after calling the sequences command, the next dialogue block just shows the player what they just got ("You got [var=LastItemGivenName]! (x[var=LastItemGivenAmount])"), which results in "You got Potion! (x2)" or something like that.
Now, my question is what other changes I could do to automate this further because my players will presumibly gain items many, many times during the game.
- Would it be possible to "buffer" a dialogue node (or even just text) in the sequencer command between its dialogue node and the following one via code? Since the text will always be the same. I have found no ways to do that though in the documentation.
- Is doing this inside of the Dialogue actually useful? Could I pause the dialogue until I show and put away an alert? Is it possible for the alert to wait for a continue button?
- How would I get rid of the picture and name for the invisible "narrator"? Following a previous forum post I created a Narrator Actor and tried attaching the Override Dialogue UI component to use a different Dialogue UI (one without a background graphic for the Character name, f.e.), but the component did not work like that from what I tried out.
I'm very grateful for any input!