# Hiding stats picks

**URL:** <https://forum.choiceofgames.com/t/hiding-stats-picks/22664>\
**Category:** ChoiceScript Help\
**Created:** [December 18, 2016, 10:28pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664 "2016-12-18T22:28:14Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 10:28pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/1 "2016-12-18T22:28:14Z")

</div>

Ok, its been a while since I tried to code for this. The ones on the forms seem to only work if there is only a two choices. For my story, I have it where the player can pick 4 different regions to start out. I want to keep this stat hidden and want to carry it over to the other scenes. I have it like the one below for the next scene. I having hard time of getting to work right.

Any help would be much appreciated.

```
*if region = 1
	*goto northern 
	*elseif region = 2
		*goto Southern
	*elseif region = 3
		*goto Western 
	*elseif region = 4
		*goto Eastern
		*finish

```

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 10:31pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/2 "2016-12-18T22:31:00Z")

</div>

Hi, the indentation seems to be the problem here.

```
*if region = 1
	*goto northern 
*elseif region = 2
	*goto Southern
*elseif region = 3
	*goto Western 
*elseif region = 4
	*goto Eastern
	*finish

```

\*if and \*elseif should have the same indentation, hope it works 🙂

I’ll try to find the article on the wiki.

(Here it is [http://choicescriptdev.wikia.com/wiki/If](http://choicescriptdev.wikia.com/wiki/If) )

---

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 10:34pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/3 "2016-12-18T22:34:58Z")

</div>

Thank you for the quick response. I was wondering how I would do this for the stats screen? The one up top is from the next scene.

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 10:36pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/4 "2016-12-18T22:36:23Z")

</div>

It should work the same way, unless you want to do something else?  
You want a specific text to be displayed for each option?

You’re quite welcome 🙂

Edit: I’ve found an older topic that might be useful:

> [@How Do You Hide Stats Until Needed?](https://forum.choiceofgames.com/t/how-do-you-hide-stats-until-needed/12242):
>
> I think I saw this before a couple weeks ago, but I haven’t been able to find it since then. Basically, I’ve created some stats, from relationships, to personal, powers, etc. but, I don’t want to have the stat screen crowded, unless they’re actually being used. So, I was wondering, how would I hide or show them throughout the course of the story, I have them setup in the “mygame.js” file, but I haven’t put them in the stat screen. The first scenario I come to, is that, “Player, has met Charac…

---

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 10:46pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/5 "2016-12-18T22:46:05Z")

</div>

Well I tried doing it how you did it and the next scene just shows all the paths at once. For the stats screen I have this. Nothing to different.

```
*label screen
*stat_chart
	text Name
	percent health
	text leadership
	text strength
	text agility
	text intelligence
	text treasury
	text stealth
	opposed_pair Honor
		Cunning
	opposed_pair favor
		Imperial court: Favor
		Unfavor
	
*line_break

*if region = 1
		text northern
		*finish
*elseif region = 2
		text southern 
		*finish
*elseif region = 3
		text western
		*finish
*elseif region = 4
		text eastern
		*finish

```

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 10:47pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/6 "2016-12-18T22:47:54Z")

</div>

Mmmh.

Can the player have all 4 at once?

---

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 10:49pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/7 "2016-12-18T22:49:56Z")

</div>

Nope, which is why its keeps bugging me. The player only gets to pick only one region he wants to start out at.

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 10:59pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/8 "2016-12-18T22:59:23Z")

</div>

Mmmh. Just tested it in startup.txt file

```
*create region 0

*fake_choice
	#1
		*set region "1"
	#2
		*set region "2"
	#3
		*set region "3"
	#4
		*set region "4"

*if region = 1
		text northern
		*finish
*elseif region = 2
		text southern
		*finish
*elseif region = 3
		text western
		*finish
*elseif region = 4
		text eastern
		*finish

```

It works, though…

---

<div class="post-metadata">

**Author:** ![Gower](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/gower/32/21972_2.png) [@Gower](https://forum.choiceofgames.com/u/Gower)\
**Post date:** [December 18, 2016, 11:20pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/9 "2016-12-18T23:20:22Z")

</div>

Do you need to have an \*else if you have an \*if and one or more \*elseif?

---

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 11:31pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/10 "2016-12-18T23:31:55Z")

</div>

I can get it to work with it on the startup but I need it to work with the next scene. I tried doing something like this below but it still shows it. When I pick the other options, it will show like that path and the ones below it.

“You take the Eastern road  
You take the Western road”

or

“\*  
You take the southern road  
You take the Western road  
You take the Eastern road”

Gower what do you mean?

```
*temp region_location
*if region = 1
		*goto screen
*elseif region = 2
		
		*goto screen
*elseif region = 3
		
		*goto screen
*elseif region = 4
		
		*goto scree

```

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 11:34pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/11 "2016-12-18T23:34:58Z")

</div>

Did you \*create (in “startup.txt”) the “region” variable, or is it only \*temp?

If you didn’t \*create it, the next scene won’t take it into account.

---

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 11:36pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/12 "2016-12-18T23:36:42Z")

</div>

I have it, \*create region 0 in startup.

---

<div class="post-metadata">

**Author:** ![Gower](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/gower/32/21972_2.png) [@Gower](https://forum.choiceofgames.com/u/Gower)\
**Post date:** [December 18, 2016, 11:37pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/13 "2016-12-18T23:37:19Z")

</div>

I think it is best practice, when having an “if” followed by a bunch of "elseif"s, to have the last one be “else” rather than “elseif”–not able to format the code to show you at the moment, alas.

I may just be missing the point, though.

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 11:38pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/14 "2016-12-18T23:38:24Z")

</div>

Then, when the player chooses one path, you did \*set the correct value under each of these choices, right?

Ex:

```
#choice 1
        *set region 1
etc...

```

---

<div class="post-metadata">

**Author:** ![Wakabam45](https://avatars.discourse-cdn.com/v4/letter/w/dc4da7/32.png) [@Wakabam45](https://forum.choiceofgames.com/u/Wakabam45)\
**Post date:** [December 18, 2016, 11:39pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/15 "2016-12-18T23:39:19Z")

</div>

Correct. Under each choice it is: \*set region 1, etc.

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 18, 2016, 11:41pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/16 "2016-12-18T23:41:19Z")

</div>

Could you show me the entire code of the scene? In PM, if you’d prefer.

---

<div class="post-metadata">

**Author:** ![Snowpanther](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/snowpanther/32/16473_2.png) [@Snowpanther](https://forum.choiceofgames.com/u/Snowpanther)\
**Post date:** [December 19, 2016, 12:31am UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/17 "2016-12-19T00:31:10Z")

</div>

Here was the solution! 🎆  
(Just had to add \*goto and a label)

```
*label Northern
You have gone the northern road.
*goto continue

*label Southern
You take the southern road
*goto continue

*label Western
You take the Western road
*goto continue

*label Eastern
You take the Eastern road
*goto continue

*label continue

```

---

<div class="post-metadata">

**Author:** ![RETowers](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/retowers/32/21477_2.png) [@RETowers](https://forum.choiceofgames.com/u/RETowers)\
**Post date:** [December 19, 2016, 5:03pm UTC](https://forum.choiceofgames.com/t/hiding-stats-picks/22664/18 "2016-12-19T17:03:33Z")

</div>

@Snowpanther Bad kitty. 🗞 Don’t encourage the brute force approach. 😛

@Wakabam45 There’s a couple mistakes, so let’s take them one at a time. First, in your stats screen, you have `text northern` on it’s own line. If you want it to appear as a chart, you need:

```
*stat_chart
    text foo <-- Where foo is the variable you want to show.

```

_ **However** _, before that we need to make sure we have the right variable. What I’m assuming you want to show is something like this:

Region: Northern

If that’s the case, you need to `*set region "Northern"` (and southern, eastern, and western). Then, instead of `text northern`, you use:

```
*stat_chart
  text region

```

No ifs or anything else. That work for you?

(Oh, and @Gower is right. If you start an `*elsif` chain, you need to finish it with an `*else` else it’s going to throw and error.)
