Forum rules - please read before posting.

Two players talking to each other

Let's say we switch to Player A and walk the player into Scene X. We now switch to Player B and walk him into the same scene. Now let's say we now want these characters talk to each other. The current player can always be made to speak having the Speech action set to IsPlayerAction, but how would we specify that an NPC which wasn't in the scene during build time, should be able to speak in run time?

Thanks!

Comments

  • Use the Player: Check Action to determine which character you are, and therefore which NPC they'll be speaking to.

  • The problem is that I don't have a reference to any of those players/NPCs in design time (since neither player/NPC will be in the scene until they choose to enter the scene in-game).

    So how can I assign a speaker NPC in the editor when the NPC isn't available untill it's associated player have stepped into the scene (and we have switched to a new player)?

    Hope this makes sense :smile:
  • But you know yourself which NPC it is, right? If you use a Player: Check Action, you can decide which NPC should be speaking.

    Assigning an NPC prefab into the Speaker field will cause the local instance of that character to speak, if present in the scene, and if he has a Constant ID value with Retain in prefab? checked.

  • Aha, I did not know you could assign a prefab there, that's great man!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.