DocsPhone examples

Phone examples

Copy these into your script and adjust the character names and text.

Basic conversation

A two-message exchange with a reply choice.

label morning_scene:
    "Her phone buzzes on the desk."

    $ phone.contact(mara, flavour="soda")
    $ phone.typing(mara, 1.0)
    $ phone.message(mara, "You up?")
    $ phone.message(mara, "Coffee in 10?")

    $ answer = phone.choices(["On my way.", "Give me 20."])
    call screen phone_screen

    if answer == "On my way.":
        jump coffee_now
    else:
        jump coffee_later

Notification first, then open the phone

Show a small alert before the player opens the phone.

$ phone.notify(mara)   # Full
call screen phone_screen

Photo message

Send an image inside a conversation.

$ phone.photo(mara, "images/note.png")   # Full
call screen phone_screen

Multiple contacts

Set up several contacts before the story begins.

label start:
    $ phone.contact(mara,  flavour="soda")
    $ phone.contact(sol,   flavour="lilac")
    $ phone.contact(river, flavour="sky")

Sending messages without opening the phone

Messages can be queued while the player is in a scene. They will be there when the player opens the phone later.

label scene_pier:
    mara "The ferry is gone."
    $ phone.message(sol, "Where are you?")
    # The phone stays closed — the player reads this later
    jump next_scene

Flavours

The six available flavours are: soda, lilac, butter, peach, sky, berry.