PowerQuest  0.12.5
Introduction
title.png

A unity tool for creating 2d point and click adventure games!

Getting Started

This is the home for the PowerQuest Scripting Documentation!

Note, before you jump in:

  • Unity v2018.4 recommended. If you NEED a feature in a later version, try using Unity LTS releases they're more stable.
  • Save early, save often. Definitely use version control like SVN or GIT. Something will sooner or later trash your files or scripts ;)

There's also some older youtube vids I made too if you're keen

Example Games Here's some examples of games made with PowerQuest:

Quest Scripting Basics

The PowerQuest tool manages scripts for you to make it easy to find the bit you want to edit.

The tool has a button for each "interaction" that can be made on each object. Clicking it will open the script editor at the right place for you, so you don't have to go scrawling through scripts to find the right file and function to edit.

So, say you have a prop called "door", clicking the "Use" button next to it in the editor will:

  • Create a .cs script file for that room if it doesn't exist, and add an OnInteractHotspotDoor() function automatically.
  • Open the script editor at the right function so you can start typing your script.

Eg.

WalkToClicked
Dave: I'd better try the door
if ( m_doorUnlocked )
P.Door.PlayAnimation("SwingOpen");
else
Display: The door won't open

The Quest Script Editor

When you open a script from the PowerQuest Editor, it'll open initially in the Quest Script Editor. This is a streamlined script editor for quickly editing dialog and quick interactions. For more complex behaviour and coding, click the "View in Script" button to explore the script in MonoDevelop/Visual Studio. There you have access to the entire files to add your own functions, proper autocomplete, syntax and error highlighting, debugging tools, etc, etc.

The Quest Script Editor makes things easier in a few ways:

  • You don't have to put 'yield return' in front of every blocking function (ones that return Coroutine ) Eg:
    • C.Dave.WalkTo(12,34); instead of yield return C.Dave.WalkTo(12,34);
  • Dialog lines have simple syntax. Eg:
    • Dave: Hello! instead of yield return C.Dave.Say("Hello");
    • Bill: Hi Dave!
    • Display: This is a message box instead of yield return C.Display("This is a message box");
  • Props, Hotspots and Points have simpler access. Eg:
    • P.Door instead of Props("Door")
  • Some other simplified commands:
    • WalkToClicked instead of yield return C.WalkToClicked();
    • FaceClicked instead of C.FaceClicked();
    • ... instead of yield return E.WaitSkip(0.5f); (use more or less dots for longer/shorter pauses)

BUT, there's certain limitations (at least currently):

  • They're only for editing 'Quest Scripts', the ones controlled by PowerQuest. Other unity scripting you do in the normal unity way (MonoDevelop/VisualStudio)
  • You can only access the inside of script functions, and variables at the top of the script file. So adding new functions needs to be done in (MonoDevelop/VisualStudio)
  • Autocomplete is limited to certain things, mainly QuestObjects. So it's not as nice as you'll get in a real IDE

Luckily it's easy to switch between them, and the Quest Script editor has a "View In Editor" button that opens MonoDevelop/VisualStudio at the right file and location.

You can also hold shift while clicking a button that'd open a Quest Script to make it open directly in MonoDevelop/VS.

Next up, have a look at the PowerQuest API page, which explains the different objects and functions you can use.