Quote
Originally posted by Debra:
Oh, cool! So I can global Event1 as set to 1. Event1 is a dialogue with NPC1 that must take place before Event2, which is Dialogue 2 with NPC2. So if the Player talks more than once to NPC1, he sees the same dialogue and Event1 is still set to 1.
Correct.
Quote
If the Player talks to NPC2 before he talks to NPC1, then if Event1 = 0, the dialogue can instruct the Player to find NPC1.
Correct.
Quote
So let's say that the Player has talked to NPC1. When the Player has an Event2 dialogue with NPC2 (under the condition that Event1 = 1), then I can change globals in Event2 to have Event1 be set to ADD 1.
No, this you can not do. You can't alter the way an event works from another event. Ie, you can't change the handling of the "Change Globals" from "set" to "add" from an outside event. At least, directly.
If you really wanted to do this, you could create 2 change global events and put them in your linked lists, with one of them able to "set" the global, and the other to "add" to the global. Then you can have a conditional in your main list that checks if "event2" has been run. If it hasn't been run then call the "set" option, and if it has been run then call the "add" option.
Quote
So if the Player returns to NPC1, the Event1 dialogue will be different, because the event will be 2, not one. And if he returns a third time to NPC1, he can have a different dialogue or no dialogue at all. Or if it's the third time, I can specify a dialogue and change global Event1 to SET to 3, and the Player will see the same dialogue every time he tries to talk to NPC1.
This is correct, assuming you do someting like the above. Another method you can do is the following:
- Create a scheme for globals. Something like: (using quotes for easier reading)
Quote
0: Player hasn't talked to NPC1
1: Player has talked to NPC1
2: Player has talked to NPC2 after talking with NPC1
3: Player has talked to NPC1 after talking with NPC2
- Create a dialog structure in your NPCs using a reverse-order for globals(I'll explain why in a moment):
Quote
NPC1
- First check if the global equals or is greater than 3. If so call your dialog scheme for this condition(where the player has spoken with this NPC already, then talked with NPC2, spoke with this NPC again, so everything is probably all done)
- After the above check, place the same check and if true call an End Event from the linked list.
- Check if the global equals 2. If so call your dialog for this condition(which is whatever you want to have happen after talking with this NPC after talking with the 2nd NPC. You will then increment the global to 3 so that you know this has happened)
- Check the global again for 3, and end the event if it is(since you just incremented to 3 above)
- Check the global for the value of 1. If so call your dialog for this condition(which is probably something like, "I told you to go talk with NPC2!").
- Check the global for the value of 1, and end event if true(so we don't continue the event)
- Call dialogs for first time encounter(since at this point only a value of 0 will be possible). Be sure to set the global to 1 at the end so we know this NPC has been spoken to.
NPC2
- Check if global is less than 1. If so shoot your dialog about needing to talk with NPC1 first.
- Check if global is greater than 1 and if so do the dialog(player has already spoken with this NPC).
- Repeat the above check and end the event if true to stop the event from continuing.
- Call dialogs for the encounter with conditions met(since at this point the global can only be 1). Be sure to set the global to 2 at the end of this event.
You use a reverse-order scheme for the global checks so that you can do everything in the same event. Since we increment the globals based on what is happening, if we started out with smaller numbers first we would run into a problem with checking the globals. (ie, if you start out with 0 and change it to 1 and then end the event if it is equal to 1, you won't get to the next check where you look for 1).
Does this make sense?
------------------
(url="http://"http://stark.evula.net/pogwalkthrough.htm")PoG Walkthrough and Compendium(/url) | (url="http://"http://stark.evula.net/plugins/dev_tools.htm")PoG Dev Tools(/url) | (url="http://"http://stark.evula.net/plugins/spells_expander.htm")Spells Expander(/url)
(url="http://"http://stark.evula.net")Stark.evula.net(/url) | (url="http://"http://www.evula.net")EVula.net(/url) | (url="http://"http://mail.ambrosiasw.com/mailman/listinfo/coldstone_dev")Coldstone-dev mailing list(/url)