Forum begins after the advertisement:
-
::One of our Patrons, Mika Machaine, asks:
hello in episode 14 we see the shop method how to set up the items on sale by season in the shop (seeds according to season) thank you for the tutorials and for your answer have a good day mickael
hello in part 16 we see how to give gifts to the NPC how can you do the opposite how can you set up one day prescie the NPC offers us a gift thank you again for all the work have a good day mickael
::To have characters give gifts, simply add a condition to InteractableCharacter to trigger that line of dialogue, and add a function to alter the player’s inventory onDialogueEnd. I will go through this in-depth when the series gets to NPC events.
::hello can you elaborate please I’m not too comfortable with the code thank you for your feedback
::So in the TriggerDialogue function, add something along the lines of
if(condition that makes NPC want to give the player a gift){
dialogueToHave = insertDialogueHere;
onDialogueEnd += GiftPlayer;
}
Then on the GiftPlayer function you just need to add the item to the player’s inventory.
Advertisement below: