The game design of my game is such that the player can interact with an “interactive place”, this is an interactive object that stores other interactive objects. In other words, if we create a city, then we place NPCs that you can physically run up to. But I would like a system like the FTK, or the Starsector. A text box that lists interaction options.

It is clear that this can be done through schematics, I have already seen the show dialogue with a choice. But what to do with dynamic objects? For example, a quest character appeared in the city. Normally we would just spawn it as an object. But how to dynamically add/remove things to the interaction text box?
  • edited November 2023
    @BAO One way that I do this on quest npc is the npc prefab itself has an interaction component on it and their own schematic with their quest logic and dialog in it. The schematic is called from interaction machine component on the prefab.

    You could use forks and check nodes and chance nodes and stuff in a schematic if you want to use the same schematic on different npcs or have some randomness on one.

    The point is you're not adding / removing things from a master dialogue choice list, you have a schematic on every interaction machine that can do any number of different things.

    There are other ways to do things depending what exactly you're going for

    You could put an interaction component on all sorts of game objects and spawn them by different means like chance% or from another interaction that spawns an object or an item, a quest, etc. and the choice dialogue for each one is in the schematic called by the interaction component on the prefab when it's interacted with.
    Post edited by GeneralK on
  • There are different ways to do it, e.g.:
    - conditions in choice dialogues
    - selected data choice (i.e. displaying stuff stored in selected data, e.g. NPC game objects)
    - using spawned objects or UI with machine components
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.