I want to select choices in the dialog based on the state of my game. Here are two scenarios:
If the player has already gone through the tutorial — which is stored in a global flag somewhere in the game — then I want an NPC to say “welcome back”. If the player hasn’t already gone through the tutorial, then I want the NPC to say “do you want me to explain”. Since that branch will happen within a dialogue, I need the dialogue to be able to get data from the overall game, and not just its own local variables.
I am calling a dialogue in a “start dialogue action” from an FSM on an NPC. Part of the FSM is to move the agent between two points, and then open the dialogue with the player. If the agent’s most recent move was to move to point A, I want him to say “I’m at the first place”. If the agent’s most recent action was to move to point B, I want him to say “I’m at the second place”.
Attachments:
Capture.png
Login
Register
By registering on this website you agree to our Privacy Policy.