Possibility of making hidden variables until they're unlocked?

Oh, okay! :slight_smile: I’ll give that a try then!

Thank you! :slight_smile: Everyone here is really nice!

2 Likes

Yeah, the code will work with either spaces or tabs, so long as you’re consistent :slight_smile:

Good thing you specified, or I might have a jealous boyfriend :stuck_out_tongue:

(And thanks :smile:)

You caught me at a good time :slight_smile: I’ll just suggest if you have further questions, you can make a general thread for your choicescript questions and have them in one place. (Or if you start a Work in Progress thread… sounds like a fun game!)

1 Like

Okay thanks! :slight_smile: Ummm, ONE LAST THING. The ORIGINAL thought about possibly having the spell names come up as “???” as in unknown, but changing to the actual name after you learn it? Could I do that? :slight_smile:

Like:

*fake_choice
  *selectable_if (expelliarmus = true) #???
      This spell is unknown to you.

But then after you learn it in the narrative, it’ll show the name? Or is that way too complex for me to even try? Cause it’d involve altering a stat name via a game choice which sounds crazy hard?

Let’s see, you could write it like this…

*choice
 *if expelliarmus
  #Expelliarmus
   This spell is usable by you!
   *goto mainpage
 *if not(expelliarmus)
  #???
   No spell for you!
   *goto mainpage
 #See stats.
  *goto mainpage

In this case, you could still click on “???,” but at least the name doesn’t show up. If you want it grayed out, then you can get fancy with something like this:

*choice
 *if expelliarmus
  #Expelliarmus
   This spell is usable by you!
   *goto mainpage
 *if not(expelliarmus)
  *selectable_if (false) #???
   *goto mainpage
 #See stats.
  *goto mainpage

When doing indents, note that anything covered by an *if needs to be one indent further in than the *if itself.

Alternatively, you could do this:

*temp expelliarmusname "???"

*if expelliarmus
  *set expelliarmusname "Expelliarmus"

*choice
 *selectable_if expelliarmus #${expelliarmusname} 
  This spell is usable by you!
  *goto mainpage
 #See stats.
  *goto mainpage
1 Like

Hmmm! Which one would produce less errors? :smile_cat: I’m kinda thinking the temp one? Since I do only want it to be unknown until you learn it, and then the rest of the game it’ll be the name. :slight_smile:

1 Like

I think I’d just say test both and see if they work right, because this is a little sneaky and I’m not 100% positive that they both work anyway :sweat_smile:

1 Like

Well I copied and pasted in the first one you gave, and it works fine! :slight_smile: So I guess I’ll just stick with it? :smiley: Don’t tempt fate and all. :smiley:

1 Like

Okay wow so, you’ve been like the hugest help EVER, soooo now there’s ZERO ERRORS going on here, I’m going to leave and let you like do important stuff! :slight_smile: Thanksy! Also we could like be friends in PM’s? :blush:

1 Like

Right now, important stuff would be :sleeping:

Good luck with your writing, and sure :slight_smile: (and I know there’ll be plenty of people just as helpful as I am who can take over :grin:)

Why don’t you have a variable?

ie *create spell1 “???”

and when you learn it you set it to a name.

For example, you find an old scroll detailing the workings of how to create a sphere of light.
*set spell1 “spell of light”

If you want to check if a player has learned the spell just have something along the lines of

*if (spell1 != “???”)
You race down the darkened tunnel, bringing a ball of light into existence.

*if (spell1 = “???”)
You walk cautiously down the darkened tunnel, wishing you had a light to guide your way.

1 Like

Just to check: are you actually calling a spell “expelliarmus”? I’m not entirely sure how trademark and copyright law work regarding use of invented words, but I’d suggest that it’s probably not worth trying to use it… :sweat_smile:

Either way, good luck with your game.

1 Like

(Hi! :smile:)

Oh… yeah, it’s probably best not to use that exact spell name :sweat_smile: strictly speaking, this is based on two Latin words, but it does’t really mean what it looks like it means (“expelli armus” would mean something like “shoulder be expelled” and I don’t think it’s even grammatical :crazy_face:).

The code should work fine with whatever spell name, though.

2 Likes

Um, I don’t really care? :stuck_out_tongue: I’m just experimenting with making these CYOA’s for MYSELF, on my own computer, for my own entertainment, and that’s it. I write fanfiction, so it’s no different than that. :stuck_out_tongue: I can make CYOA’s of established universes if I want to. :smile: I’m not gonna be like publishing them on Amazon and asking for money or whatever. :slight_smile: It’s just a screw around hobby to have fun with.

J. K. Rowling will be horrified to hear that, I’m sure. :stuck_out_tongue_winking_eye:

1 Like

Good thing I don’t know her! :stuck_out_tongue: Also your name is super cute! Parrot watcher. :smiley: Do you like actually have a pet parrot? :slight_smile:

2 Likes

I’m making a CYOA for Animorphs and Star Wars too! :slight_smile: They’re my favorite universes EVER, and I loooove writing but I also love codestuff, so getting to make a CYOA game is like OMG. :slight_smile:

Oh, well, if it’s fanfiction, I don’t think anyone can object :stuck_out_tongue: (Except the poor expelled shoulders :cry:)

He is super cute :blush:

1 Like

Sadly no; maybe when I get rich… :money_mouth_face:

As in, a crossover? :smile:

You flirt. :stuck_out_tongue_winking_eye:

2 Likes

Oh no, not a crossover! :slight_smile: They’re separate projects! :blush: Each one I’m doing has different experimentation goals and ideas put into them, you know, for getting the hang of certain features or advanced stuff like I needed help with here. :slight_smile: