Do you need a separate scene for each NPC?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By garrettewallen

I am curious, I have one NPC made, which I created in a new scene titled NPC with an attached script with the same name .gd. I am wondering if I need to create a new scene every time I want to add more NPC’s or is there a way to use my already made code, because for right now I do want them to all act about the same until I get around to everything else.

:bust_in_silhouette: Reply From: Inces

Typical approach is to create NPC class containing only parts of code, that will be shared amongst all types of NPCs. You can use export values to assign individual properties for each instance of NPC. Finally You can use additional childed scripts with more code, to modify their behavior in even more individual way,