Hey!
Im currently making a bouncer game where the bouncer has to check npc's identification to allow entry. Is there any way to assign random names to NPC's? Maybe if i have a text file with just a bunch of full names and the action list editor can pull a random name out of that list and assign it. Can you tell me the best way to tackle this?
Thanks
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @JohnnySins.
This'll require custom coding. Two scripts: first is RandomNames.cs:
This allows for an asset file named "Random names" to be created from the Project window's Create menu. Use it to create a new asset and populate it with names.
Second script is AssignRandomName.cs:
Attach to your NPC and assign the "Random names" asset and "NPC" Inspector fields. Either check "Assign On Start" to randomly assign a name when the scene begins, or use AC's Object: Send message or Object: Call event Actions to call the component's "Assign" function.
Legend Chris! Thanks for the fast response