Hi guys,
This is a bit hard to describe, so I'll try my best to make it clear. I have a section where the player has to gather four items from four different people. They don't have to get them in order. I want to have an event when the player has all the items, the character would mention that he needs to go back and see the quest starter.
How could I do this? :distrust:
If it's all on one map, stick an event with no graphic on some corner somewhere. Have it run as a parallel process that triggers when the four items are gathered. Once it's done its thing, have it flip a self switch to turn itself 'off' so you don't keep processing it.
So the event would have three pages:
1) [optional] does nothing, waiting for the initial switch to be set. It's late, but I think this would require something to be set OFF, rather than simply waiting for a switch to be initialized.
2) the parallel process (edit: or an auto-run) triggered by the item count.
3) back to doing nothing.
Auto-run may be the better way to go; I'm still a little fuzzy on the exact differences between the two. I have a very similar trigger that I have set up the way I described, but without the 1st step (that occurred to me as I was writing this - so it may or may not be worth the trouble). As soon as a variable crosses a threshold, one of the characters speaks some dialog, then the event switches itself off.
you don't need a parallel process for this - it will be much better if you don't use a parallel process.
Define a variable "items collected".
In each of the four events where the player can collect one of those items, have it check the variable first.
If the variable is less than three, add one to the variable and hand out the item, then switch the event to a page that simply tells "you already have the item".
If the variable is three you'll know that this event will give the player the last item, so give the item, add one and have the text that tells the player to go back to the quest starter.
Parallel processes always run, and are executed up to sixty times per second - you don't need to check the items that often, you only need to check them when the player gains a new item. Having that checked sixty times per second only slows down your game, and if you have several such parallels on a map it might become unplayable slow depending on your computer.
If you wanted to make it a cutscene, in multiple areas. You could create an event in each area that's condition was a switch and was on autorun; put the switch into each of the npcs under the condition of the variable being 3. You could just paste the same event in all the areas, or create unique ones for each.
I would suggest that each of the four map events calls a common event for controlling the variable number. That part of the logic is perfect for sharing.
This gives you excellent control and makes changing the number of people or other small general changes way easier + safer.
*hugs*
Thanks for the help, guys. 😀
Looks like it is the easiest way for now, so I'll just go with that.
Once you come up with a solution I suggest you take pictures of it for us to comment on.
*hugs*