I'm posting some functions I'm using in The Drifter that aren't in core PowerQuest now. Let me know if you find them useful and think they should be in core PowerQuest.
This is an extension to PowerQuest to add functions for starting background sequences. So you can have sequences run in the background, while the player's pointing and clicking and doing stuff. So you have other characters walk, talk wait, turn, animate... all the regular sequence things.
Setup
- Add this package to your project: PowerQuestExBgSequence.unitypackage
Usage
- Create a blocking function, eg: `IEnumerator BackgroundChatter()`
- Call `E.StartCustomBackroundSequence( BackgroundChatter );`
- If you want to interrupt the sequence, call `E.StopCustomBackgroundSequence();
- Only one background sequence can be run at as time (at least, for now)
- Since a regular mouse click skips dialog, and WaitSkip commands, you need to use:
- E.Wait(0.5f) instead of `...` when waiting
- C.SayNoSkip("blah"),
- or C.SayBG("blah"); followed by E.WaitForDialog();
Saving/Restoring
- If the game is saved & restored when the background sequence is running, it'll be restarted.
- If you want to be able to restore midway, you need to either:
- Save a variable to skip over the already-done part of the sequence.
- Or, have a chain of background sequences, so as one stops, it starts the next.