Dialogue forks, event(ing) question

Hey, I am currently going down the list of Yanflys plugins and installing them one by one then familiarizing myself with them a little before moving on to the next. I was experimenting with some dialogue and ran into a small problem. What I am trying to do is create an Inn Keeper who responds differently depending on who is the party leader. What would be a good way to go about setting this up?
This is actually really easy, you will need a variable, we'll call it "Party Leader ID".


Here's how the Event would work:


Control Variable: "Party Leader ID" Variable = Game Data > Party > Member #1 ID


Conditional Branch: If "Party Leader ID" Variable = 1 (Actor ID goes here)


Message: "Text for when Actor 1 is Party Leader."


End Conditional


Conditional Branch: If "Party Leader ID" Variable = 2 (Actor ID)


Message: "Text for when Actor 2 is Party Leader."


End Conditional


Continue through the characters giving each their own Conditional. You don't really need the Else option on the Conditionals for this.


So simply put, it will set the variable to the ID of the lead member, and display text differently for each actor based on the variable set to their ID.


I hope this helps you out, have a good one.


Z
Fantastic, thank you. I experimented with VXAce for a while last year and knew a lot of this stuff but it's like a second language and if you don't use it you lose I guess.
Just to clarify (I got it working but for future reference), I open the event add an "event command" for "control variable" then create a control variable just like you instructed above THEN create the conditional branch with the dialogue choices/options right below it, right?


So... once I add that control variable to the event will it be usable on other events? And if I delete the "event command" for "control variable" from the original event will it cease to function elsewhere?

Original thread: https://forums.rpgmakerweb.com/threads/dialogue-forks-event-ing-question.59248/