Forum rules - please read before posting.

AC not recording object

Hello,

I am trying to teleport a spawned character to a marker off-screen. However, when I put the prefab in the teleport object field, AC doesn't record the NPC's prefab. Because of this, Zoe (the NPC) doesn't teleport.

There's another NPC named Derek, and he records fine. You can see below:

Comments

  • Does Zoe have a Constant ID component with "Retain in prefab?" checked? This is necessary when prefabs are assigned - and it looks like Derek is set up in this way.

    Though, it should be that you can check "Is Player?" and then select the Player from the drop-down. This is not possible for the "Object: Teleport" Action - but it should be. I will correct this in the next release.

  • Okay I am going to post this here because it might deal with the problem above.

    For the longest time, when Zoe takes the baby out of the room to give it a bath, she would not teleport (even with it recording her ID) and Derek would just spawn randomly at player start despite the action list not asking him to. I couldn't figure out why.

    However, the problem fixed itself when I recorded the video below? I thought that was weird, so I figured I mention it.

    The only problem that remains is that now the baby (or the active player) doesn't teleport away after being picked up.

  • I found another similar problem. When the baby reads a book, a book appears in front of them. When they're done with the animation, I want to remove the book from the scene. The book doesn't remove.

    I notice that when the book is added, AC does not record its ID. However, when I remove it, it does. The book has the constant ID component.


  • The book's ID does not need to be recorded when being added, since the Action is dealing with the prefab directly - not any scene instance of it.

    Check that there aren't any other copies of the book in the scene - the Action will remove the first one it finds.

    An alternative approach to this situation would be to have all of the "pickup-able" objects be part of the character's prefab - hidden by default, and only made visible when perceived to be held.

    This can be done through animation layers. An example of this technique can be found with the "glasses disguise" logic in the Unity Adventure Game tutorial here.

  • Do you suggest making the visibility trick for the player character as well? Because of his teleporting problem? I talked about this in the post above the one where I complain about the book.

  • Try it for the book and see if it suits - certainly the same approach can be used for other objects.

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.