I need help with choicescript


#1

so i,m playing around with choicescript trying to get to
know how to do it and i,m having trouble with adding choices
i,m trying to add choices but every time i think i got it tells
me i need one choice. i have read everything i cant figure it out


#2

here is an examle if you want a choice of
1.kill him
2.let him go
you write

 
he attacks you, you.....
\*choice
 #kill him
   you strike him down he dies 
 #let him go
   you let him runawy

#3

so i tried it and it says expected option starting with #


#4

did you write finish after it?


he attacks you, you.....

\*choice
 
#kill him

   you strike him down he dies
   \*finish 

 #let him go

   you let him runawy
   \*finish

#5

you need to have a # in front of each choice


#6

i have a # in front and it still says the same thing


#7

A *finish, or at least a *goto is needed to end each choice, but I suspect it’s the spacing.

*choice
#kill him
…you strike him down he dies
…*finish
#let him go
…you let him runawy
…*finish

It’s hard to see tabs here. But, I suspect it’s this. Make sure you have a tab before the # in the choice. And then two tabs to the result of that choice.


#8

@lucid it worked thank you


#9

oh you prabaly forgot the indents…


#10

what is the coding for a name. like whhat is your name


#11

If you want to add a name choice, you could do this for example…

*choice
-#Make a name (or whatever you want the choice to say)
–*input_text name
–*finish or any other piece of text you’ll want to put, ex. ${name} is a good name!

The purpose for *input_text is to allow the user to place their own value for a variable.
Therefore, the ‘name’ part is the actual name of the variable, however you can name your variable whatever you would like of course. EDIT:( example: i name my variable pizza, I can do
*choice
-#Which type of pizza do you like
–*input_text pizza
)
Of course the variable has to be declared either in the mygame.js or previously in the word document.
*create pizza
*set pizza “None”

After the user places what they want in the text box the variable stated after the code, in this case “name”, picks up that value. The same can be said for the command to input a number.


#12

i wish there was a youtube video for all this #-O


#13

Now I kinda wanna make a tut on choice script via youtube, maybe get more people interested in it as well


#14

yeah that’d be great for the new comers, you will be doing a big favor to the whole cog community


#15

Yeah you will help alot of people like me lol