Great news everybody, Scripting has finally arrived! For real this time :-).
What is Scripting?
Scripting allows you, as an author, to have much greater control over what happens in your storygame. Just about everything that the StoryViewer "remembers" from page to page (Items, Variables, etc) is avaiable for you to test with just a few lines of script code.
Script Code, eh? What's that?
Unfortunately, writing out a good definition of Script Code is going to take some time. So, instead of that, I'll just show you a few examples ...
Item Script - changes some variables when that item is used
%HEALTH := %HEALTH + 10
%STRENGTH := %STRENGTH - 5
Another Item Script - takes user to save page if he has enough money when item is used
IF %MONEY >= 1 THEN
BEGIN
%MONEY := %MONEY - 1
$DEST := @SAVE
END
Link Script - Change the times Item #4 was used back to zero and subtract money
%MONEY := %MONEY - 10
$ITEMUSED4 := 0
I think I follow that, so how do I get started?
Take a look at the following articles:
- Basics of Scripting (http://chooseyourstory.com/help/articles/article.aspx?ArticleId=45)
- Intermediate Scripting (http://chooseyourstory.com/help/articles/article.aspx?ArticleId=46)
More articles are coming soon, including scripting scenarios you can use in your storygames. In the mean time, post a message in the Advanced Editor forum for help with scripting.
Good luck!