On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

PowerQuest

A Nifty 2D Adventure Toolkit for Unity · By Powerhoof

Extension: Background Sequences

A topic by Powerhoof created Jan 10, 2022 Views: 538 Replies: 3
Viewing posts 1 to 5
(1 edit) (+1)

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

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.

Totally should be added.

I agree. This is really useful functionality, so I think it would make sense to add it to core PowerQuest.  

yep, this is good. I'd like to have it in the core :)

moved this topic to Extensions and Templates