Forum rules - please read before posting.

Action to add game objects to a scene

My character needs to collect 3 sheep and return them to their pen.  Collecting them is easy enough and when their hotspot is clicked on they are removed from the scene and added to the inventory with a variable increased until it reaches 3.  There is a hotspot at the sheep pen entrance which checks the the variable is 3, and then allows entrance.  I want the sheep to be added to the scene, in the pen, and have tried actions to add object relative to an entered value, a vector variable and a game object (an empty object placed in the pen) but none of these make the sheep appear.  Is there a way to do this which will have the desired result?

Comments

  • edited May 2018
    The Object: Add or remove Action can be used to spawn prefabs in your scene - but it's not intended for adding the same prefab multiple times.  If that's what you're intending to use, you'll need to make sure each sheep is a separate prefab.

    If you can share details on what exactly you've tried already, we can see about giving advice about what might be wrong.  Screenshots, Unity/AC version numbers, Console output will all help.

    It's generally easier, however, to simply keep unwanted objects in the scene, but hidden from view - and then use the Object: Teleport Action to place them in view when ready, as opposed to spawning them at runtime.
  • edited May 2018
    Thank you for the advice.  I'm using Unity 2017.4.1f1 and AC 1.62.6  I prepared screenshots of the actions I am using but when I click on Image above it asks for a website reference which I guess must refer to a file sharing system which I haven't got.
    EDIT - I've used Object:Teleport and that works perfectly.  Thank you
  • No problem.  For future reference, images can be hosted on imgur.com with links posted here.
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.