Forum rules - please read before posting.

Move NPC with multiple nested NPCs

edited March 2021 in Technical Q&A

I'm asking for your help again. I have a swarm of butterflies:

Parent object 'swarmScene' has moveable and NPC scripts with no sprite child object set at NPC script:

Multiple nested NPCs are butterfly prefabs:

I tried to move the swarm on the path, but it doesn't move (yet cutscene on reaching the final node is being run).

Then I tried to move it with Object -> Transform, but without any luck, unfortunately.

Is there a way to move such a complex construction? =) Or should I move each of the butterflies on its own path?

Thank you!

Comments

  • edited March 2021

    You'll get conflicts with such a set up - each character is attempting to move independently.

    Do each of the butterflies speak, or any other behaviour? From what you've shared, it doesn't look like they need to be NPCs.

    If they're NPCs so that you can have them move along a Path, better to just rely on animation instead. The "base layer" of an Animator could control the position, while a sub-layer could be used to play a looping "fly" sprite animation. If you animate the local position, you should then be able to also animate the parent separately and have all move as one.

  • Thank you very much, Chris! You're always helping me =). Butterfly should be a NPC, but in another scene, not here, so I can remove NPC component totally. Now everything is works fine, thanks!

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.