Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cheat sheet ? #489

Open
Zakwil opened this issue Nov 6, 2018 · 4 comments
Open

Cheat sheet ? #489

Zakwil opened this issue Nov 6, 2018 · 4 comments

Comments

@Zakwil
Copy link

Zakwil commented Nov 6, 2018

Hi,
Its more like an enhancement but, is it possible to have a cheat sheet?

@tentoumushi-dev
Copy link

tentoumushi-dev commented Aug 13, 2019

Well let me start with the basic stuff.
(I will enhance this eventually (hopefully) to the extend that the full guide should be covered, but I think this example covers enough to write a working story, without actually knowing anything about ink or coding in general)

// this is a comment
/* this is also a comment */

VAR my_variable = 1

===i_am_a_knot===
~ my_variable = 2 //this is how you 

this is story text #this is a tag #you can have multiple ones

* this is the choice #my tag will only be read after the choice is taken
    -> the_other_knot // divert only on this choice

+ this is a sticky choice. You can take this path multiple times.

* {my_variable == 1} this is another choice // it is only displayed if the expression is true
- -> the_common_knot // both choices above are put together to this divert

=the_common_knot
story ends here
-> END

===the_other_knot===
story continues here
-> i_am_a_knot.the_common_knot // this accesses a subknot / stitch

@Selsynn
Copy link

Selsynn commented Aug 13, 2019

I would add the modifying of a variable
~ my_variable = 5
and some new line to make it clearer.

Else it is great for a first one.

Note to self: create one for programmer that begins on Ink

@frankbraker
Copy link

add the continuation operator:

<>

which suppresses the line terminator that would normally appear for that line.

@sawradip
Copy link

I have created one. Mainly to look for a specific symbol, so that we can scroll quickly. You can give suggestion to improve more.

https://github.com/sawradip/ink-cheat-sheet/blob/main/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants