Best Practice to Instantiate NPC
Posted: Mon Mar 22, 2021 8:00 pm
Hello, I'm working on a bus simulator.
What I Want:
The player talks to someone at a station, and then chooses the passengers he wants to carry. Then after the player returns to the bus, he can see the passengers he just chose sitting on the chairs. The player can even interact and talk with the passengers.
Current Issue
How to store the passengers the player has chosen?
The station and bus interior are two scenes, How to pass the data from one scene to another? I know I can use variables, but in the case of my game, it would be a mess to rely on variable.
How to instantiate the passengers in the bus interior scene?
What I Want:
The player talks to someone at a station, and then chooses the passengers he wants to carry. Then after the player returns to the bus, he can see the passengers he just chose sitting on the chairs. The player can even interact and talk with the passengers.
Current Issue
How to store the passengers the player has chosen?
The station and bus interior are two scenes, How to pass the data from one scene to another? I know I can use variables, but in the case of my game, it would be a mess to rely on variable.
How to instantiate the passengers in the bus interior scene?