Interactable objects in world

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Trashrat
Posts: 25
Joined: Fri Oct 13, 2023 11:38 am

Interactable objects in world

Post by Trashrat »

Hi,

I'm creating a msall adventure game that has interactable objects within the world, when the player clicks on certain objects ther will be a line or two of text given about them. In order to not create a new conversation with every object, what would be the best way of organising and going through this?

So far I have tried creating a placeholder actor called Interactive Item, then setting the actor's name to the object's name in Dialogue Actor script on the object. Then in the database i'm checking if the name equals the object name to play the right dialogue entry, but unfortunately it isn't working. I may have my understanding completely wrong.
Attachments
DialogueCapture.JPG
DialogueCapture.JPG (89.5 KiB) Viewed 68851 times
DialogueCapture2.JPG
DialogueCapture2.JPG (49.57 KiB) Viewed 68851 times
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Interactable objects in world

Post by Tony Li »

Hi,

Try:

Code: Select all

Variable["Actor"] == "Fireplace"
Here's an example:

DS_InteractableItemExample_2024-01-10.unitypackage
Trashrat
Posts: 25
Joined: Fri Oct 13, 2023 11:38 am

Re: Interactable objects in world

Post by Trashrat »

That's great, thanks very much for the help. Does this way scale well? If there were say 20-30 or so actors, all checking those saem conditions within the one conversation?

Again, thank you for your time and help that's working great.
User avatar
Tony Li
Posts: 22112
Joined: Thu Jul 18, 2013 1:27 pm

Re: Interactable objects in world

Post by Tony Li »

Each condition takes a little time to evaluate, so you might want to split it up. Maybe 10 actors per conversation, give or take, depending on the CPU budget for your game.
Post Reply