It looks like you're new here. If you want to get involved, click one of these buttons!
Passage A: "Steve chose to punch Bob." Passage B: "Steve did not choose to punch Bob." Passage C: (display conditional text, A or B outcome)
If player chose A, then display "Steve and Bob are enemies." in Passage C. If player chose B, then display "Steve and Bob are friends." in Passage C.I searched the 'Help! with 2.0' category for Snowman, but there wasn't much information; less than six pages total. I'd immensely appreciate any help in figuring this out. I'm not looking to make a complex CYOA game. (at least as far as JavaScript goes) I just need help getting started. Thank you for reading!
Comments
The following example if made up of four passages (Start, Passage A, Passage B, and Passage C)
1. Start
Snowman lets up store information within it's state collection, it makes this collection available to your passages via a s variable that you can extend. The following code creates a punchedBob variable which will default to false: 2. Passage A
In this passage we change the value of the punchedBob variable to true because Steve punched Bob: 3. Passage B
In this passage we change the value of the punchedBob variable to false because Steve did not punch Bob. This assignment is not totally necessary because the default value of the variable is false but it is a good idea to do this assignment anyway: 4. Passage C
We test the current value of the punchedBob variable and display the relevant text: