Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Dynamic Story Scripting with the ink Scripting Language

You're reading from   Dynamic Story Scripting with the ink Scripting Language Create dialogue and procedural storytelling systems for Unity projects

Arrow left icon
Product type Paperback
Published in Nov 2021
Publisher Packt
ISBN-13 9781801819329
Length 272 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Daniel Cox Daniel Cox
Author Profile Icon Daniel Cox
Daniel Cox
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Section 1: ink Language Basics
2. Chapter 1: Text, Flow, Choices, and Weaves FREE CHAPTER 3. Chapter 2: Knots, Diverts, and Looping Patterns 4. Chapter 3: Sequences, Cycles, and Shuffling Text 5. Chapter 4: Variables, Lists, and Functions 6. Chapter 5: Tunnels and Threads 7. Section 2: ink Unity API
8. Chapter 6: Adding and Working with the ink-Unity Integration Plugin 9. Chapter 7: Unity API – Making Choices and Story Progression 10. Chapter 8: Story API – Accessing ink Variables and Functions 11. Chapter 9: Story API – Observing and Reacting to Story Events 12. Section 3: Narrative Scripting with ink
13. Chapter 10: Dialogue Systems with ink 14. Chapter 11: Quest Tracking and Branching Narratives 15. Chapter 12: Procedural Storytelling with ink 16. Assessments 17. Other Books You May Enjoy

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Every time the button is clicked, the Story method ChooseChoiceIndex() will be called with the correct index, and the LoadTextAndWeave() method will be called again, refreshing the value of currentLinesText and updating the current buttons shown on the screen... ."

A block of code is set as follows:

public class InkLoader : MonoBehaviour
{
    public TextAsset InkJSONAsset;
    // Start is called before the first frame update
    void Start()
    {
        Story exampleStory = new Story(InkJSONAsset.text);
    }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

void Start()
{
Story exampleStory = new Story(InkJSONAsset.text);
Debug.Log(exampleStory.Continue());
Debug.Log(exampleStory.Continue());
}

Bold: Indicates a new term, an important word, or words that you see on screen. For instance, words in menus or dialog boxes appear in bold. Here is an example:

  1. Select the Prefab button in the project window.
  2. In the Inspector view, click on the Tag drop-down menu and then click on the Add Tag… option.

    Tips or important notes

    Appear like this.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image