![]() |
PowerQuest 0.18.9
|
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:
OnInteractHotspotDoor()
function automatically.Here's what the code in that image does:
If that's a bit scary, don't worry!
When you open a script from the PowerQuest Editor, it'll open initially in the Quest Script Editor (pictured above). This is a streamlined script editor for quickly editing dialog and quick interactions.
Editor controls:
Auto-Load
is ticked, interacting with things in game will automatically open the script for you to edit.View C#
button to explore the script in 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 than raw c# in a few ways:
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);
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");
P.Door
instead of Props("Door")
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)PQ Tools
-> Editor Settings
. (If you're handy with regular expressions)There ARE certain limitations to the Quest Script Editor though:
Luckily it's easy to switch between them, and the Quest Script editor has a __'View C#'__ button that opens your IDE (VisualStudio,VSCode,etc) at the right file and location.
Next: Look at how to set up your project in the Editor Manual.
Or: Dive further into scripting on the PowerQuest API page, which explains the different objects and functions you can use.