Hi everyone,
So, super new to MV and never programmed before so stumbling through and I think I worked out this way to do progressing dialogue - but I am not sure if this is the most effective solution, as you will see. Also, I am having a slight problem with some of the dialogue repeating itself.
I hope I explain this clearly, it's a bit wordy!
Okay so the setup:
Characters are trying to solve a murder mystery clue-style and throughout the game, various NPCs die. As NPCs die, the dialogue from the remaining NPCs will temporarily change so each NPC says something about the dead person, and then once you've heard the line of dialogue it reverts back to some default line repeated each time you talk to them.
The problem(s):
1. Because multiple characters will be dying, and you will be talking to multiple characters, I figured a simple "if character is dead turn switch on" for the dead player, and then a simple "turn switch off" once you spoke with an NPC wouldn't work, because that would then turn the switch off for every NPC the player spoke to after.
The only way I could think of to get around this would be
Bob Dies
<Turn bob dies switch on for Sally>
<Turn bob dies switch on for Fred>
<Turn bob dies switch on for Jessica>
so on about 20 times...
Then for each NPC I'll need a statement to check and see if a live/dead switch for each character is on.
- > Talking to Sally
<Is Sally Bob Dies switch on>
If so, do X, then Turn switch off
<Is Sally Fred Dies switch on>
If so, do X, then Turn switch off
<Is Sally Jessica Dies switch on>
If so, do X, then Turn switch off
so forth about 20 times...
Is this the most effective solution? That's a lot of switches
2. If Bob isn't dead, she needs to say something other than her introductory dialogue of "hi I'm sally" so I created a switch to turn introductory dialogue off, then check to see if switch for Bob is on or off. Then created an else statement for some basic text she can say if Bob is alive and this is the second time you've spoken with her.
The problem I am having is getting the dialogue so the basic stand-in text isn't repeated directly after the character death dialogue. To get around this I made an "else" statement, so in the case below, if the "Old Lady" is dead switch is set to off, she will work properly, but if the "Old Man Dies" the NPC will say his death dialogue and then immediately say the "else" statement.
I could probably create new event pages to get around that, but then I run the risk of running out of event pages, so ideally I would like to accomplish this with as few as possible to save room for other events.
I've attached my screenshots, and this is still in setup and mostly placeholder text - I also havent added ALL the switches yet but you can get the general idea.
So, super new to MV and never programmed before so stumbling through and I think I worked out this way to do progressing dialogue - but I am not sure if this is the most effective solution, as you will see. Also, I am having a slight problem with some of the dialogue repeating itself.
I hope I explain this clearly, it's a bit wordy!
Okay so the setup:
Characters are trying to solve a murder mystery clue-style and throughout the game, various NPCs die. As NPCs die, the dialogue from the remaining NPCs will temporarily change so each NPC says something about the dead person, and then once you've heard the line of dialogue it reverts back to some default line repeated each time you talk to them.
The problem(s):
1. Because multiple characters will be dying, and you will be talking to multiple characters, I figured a simple "if character is dead turn switch on" for the dead player, and then a simple "turn switch off" once you spoke with an NPC wouldn't work, because that would then turn the switch off for every NPC the player spoke to after.
The only way I could think of to get around this would be
Bob Dies
<Turn bob dies switch on for Sally>
<Turn bob dies switch on for Fred>
<Turn bob dies switch on for Jessica>
so on about 20 times...
Then for each NPC I'll need a statement to check and see if a live/dead switch for each character is on.
- > Talking to Sally
<Is Sally Bob Dies switch on>
If so, do X, then Turn switch off
<Is Sally Fred Dies switch on>
If so, do X, then Turn switch off
<Is Sally Jessica Dies switch on>
If so, do X, then Turn switch off
so forth about 20 times...
Is this the most effective solution? That's a lot of switches
2. If Bob isn't dead, she needs to say something other than her introductory dialogue of "hi I'm sally" so I created a switch to turn introductory dialogue off, then check to see if switch for Bob is on or off. Then created an else statement for some basic text she can say if Bob is alive and this is the second time you've spoken with her.
The problem I am having is getting the dialogue so the basic stand-in text isn't repeated directly after the character death dialogue. To get around this I made an "else" statement, so in the case below, if the "Old Lady" is dead switch is set to off, she will work properly, but if the "Old Man Dies" the NPC will say his death dialogue and then immediately say the "else" statement.
I could probably create new event pages to get around that, but then I run the risk of running out of event pages, so ideally I would like to accomplish this with as few as possible to save room for other events.
I've attached my screenshots, and this is still in setup and mostly placeholder text - I also havent added ALL the switches yet but you can get the general idea.