Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
#+TITLE Great test!
:PROPERTIES:
:MACRO-LANGUAGE: boo
:END:
#+BEGIN_SRC boo
import UnityEngine
Debug.Log("entered the epic test dialogue")
unless ludus.dialogue_state:
ludus.dialogue_state = Ludus.Script.Object()
ludus.dialogue_state.likes_turtles = false
ludus.dialogue_state.hates_bacon = true
ludus.dialogue_state.were_mean = false
ludus.dialogue_state.reached_end = false
#+END_SRC
#+WHEN: exit
#+BEGIN_SRC boo
UnityEngine.Debug.Log("I am now exiting the best dialogue ever")
ludus.dialogue_state = null if ludus.dialogue_state.reached_end == true
#+END_SRC
* a
#+ACTOR: npc
#+CONVERSANT: player
I like turtles
And that's the way {{{ script_return "it is!" }}}!
#+WHEN: condition
#+BEGIN_SRC boo
import UnityEngine
script_return ludus.dialogue_state.likes_turtles == false
#+END_SRC
#+BEGIN_SRC boo
ludus.dialogue_state.likes_turtles = true
ludus.dialogue_state.hates_bacon = false
#+END_SRC
** a.a
#+ACTOR: player
#+CONVERSANT: npc
Well isn't that just lovely
** a.b
#+ACTOR:player
#+CONVERSANT: npc
Man you're really lame. Nobody. Likes. Turtles.
#+BEGIN_SRC boo
ludus.dialogue_state.were_mean = true
#+END_SRC
*** a.b.a
#+ACTOR: player
#+CONVERSANT: npc
I'm sorry that wasn't very nice of me.
#+BEGIN_SRC boo
ludus.dialogue_state.were_mean = false
#+END_SRC
* b
#+ACTOR: npc
#+CONVERSANT: player
I hate bacon
#+WHEN: condition
#+BEGIN_SRC boo
script_return ludus.dialogue_state.hates_bacon == false and ludus.dialogue_state.were_mean == false
#+END_SRC
#+BEGIN_SRC boo
import UnityEngine
Debug.Log("Is hating bacon even possible? o_O")
ludus.dialogue_state.hates_bacon = true
ludus.dialogue_state.reached_end = true
#+END_SRC
* c
#+ACTOR: npc
#+CONVERSANT: player
I can't believe you said I'm lame. You're so mean.
#+BEGIN_SRC boo
ludus.dialogue_state.reached_end = true
#+END_SRC
#+WHEN: condition
#+BEGIN_SRC boo
script_return ludus.dialogue_state.were_mean
#+END_SRC
** LINK c.a
[[a.b.a]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment