Hi,
In the event I'm working on, a NPC is spawned into the scene and I want to use that NPC as an actor for dialogue boxes. I've been trying to add the actor in the event settings either using the stored Selected Data when the NPC is spawned, or using the Find Object function. However the event is still failing to recognize the NPC as the actor. Any ideas where I may be messing up?
  • Have an empty object in the scene and add npc component to it. This way you can have it as an actor.

    You could also have npc invisible and turn him visible during cutscene. There is a node for that.
  • The Spawn Prefab node can store the spawned game objects into found/global objects, not selected data. So, you'd have to use a Found Objects actor instead to get this going.

    Also, using Find Object will do this at the start of the event, i.e. when your game object isn't spawned yet. You can use the Re-Find Objects node to search again (after spawning, maybe with a 0 second wait in between to wait for the next frame and give Unity time to spawn them).

    Otherwise, you can have the NPC in the scene already and disable them. Using an Object actor (without using event object) allows you to select that game object in the Event Interaction component, enable it in the event and proceed from there.
    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!
  • Thank you! Disabled trick should do it!!
Sign In or Register to comment.