So here's my dilemma.
Through a common event, I want my NPC to say something when he's first talked to. Then every time after that he says something different. (But never the first thing after that).
For example, you would talk to the NPC and he'd say something like "Hi! Nice to meet you!" And then after that, he'd say different sentences, but never "Hi! Nice to meet you!" ever again.
I know how to do the second part (making an NPC saying something different with variables) but I'm stumped on how to put the whole process together.
I should mention that he also has a routine, and I made a common event for him to show up at a certain place at a certain time, so it may interfere with the first common event. I'm using Vlue's Advanced Game Time script to do this, but for now I need the first question answered, I just listed that I used the script in case it would interfere with the first question and if it does or if I need further questions asked, I'll ask through the script's thread.
Thanks in advance.
First Encounter Dialogue
● ARCHIVED · READ-ONLY
-
-
There's something I didn't get.
I assume you don't mean something you can do through a local switch in the event, right?Through a common event, I want my NPC to say something when he's first talked to. Then every time after that he says something different.
It took me a while, but I found this: (quoting anyways) http://www.rpgmakervx.net/index.php?showtopic=22153
Paste in scripts
Code:You can use it like this in a "Script..." event command.class Game_Interpreter def random(dest_id, min, max) min = min.zero? ? 0 : $game_variables[min] num = [rand($game_variables[max] + 1), min].max $game_variables[dest_id] = num end end
Code:random(result_variable_id, min_variable_id, max_variable_id)
result_variable_id is the id number of the variable that will hold the random number.
min_variable_id is the variable id which holds the minimum number. So, if you wanted a range where the lowest value is 5, you would set a variable to 5 and then pass in its id number. If you pass in 0 the min value will be zero.
max_variable_id is the variable id which holds the upper bound. Set a variable to your max value and pass in its id number.
So, if we wanted a value in the range of 0-10 to be stored in variable 1, we would use...
Code:@> Control Variables: [003:max] = 10@> Script: random(1, 0, 3)
...and if we wanted to use a lower bound...
Code:@> Control Variables: [002:min] = 5@> Control Variables: [003:max] = 10@> Script: random(1, 2, 3)
...and that will return any number in the range of 5-10. -
Sorry. I edited the first post so it was a little clearer. I'm not entirely sure how to do it at all... I mean I'm sure switches would be involved but I'm not sure on how to go about it.There's something I didn't get.
I assume you don't mean something you can do through a local switch in the event, right? -
Hey Random
If I understand the issue correctly, you should be able to use a simple self switch solution.
When you first talk to the player have him say "Hi, Nice to meet you!" then turn on self switch A
On the second page, with Self Switch A active, have the exact same event made, but when he is spoken to use a conditional branch that has however many unique lines you want.
The basic Idea is outlined line this:
Page 1: No condition
Show text: "Hi, Nice to meet you."
Turn Self Switch A ON
Page 2: Condition: Self Switch A ON
Control Variable: Random 0-2
if Control Variable = 0
Show text: How are you?
end
if Control Variable = 1
Show text: Haven't seen you around lately.
end
if Control Variable = 2
Show text: I think you get the idea here.
end
Maybe I am interpreting the issue incorrectly and oversimplifying, but that should accomplish what you want. If there is more to the event like a move route or whatever, you can include them in both, just make sure the only difference is the text options.
~ Dinhbat