Advice for *goto

Right now, I have a variable,

*create unit_desc 0

I have 4 different scenes, each of them upping the unit_desc variable by 1. When it gets to 4, a goto leaving triggers. However, It currently isn’t.
I have 2 other variables that might trigger, since for each scene I have a variable turn to true so it can trigger the next scene.
Sorry this is a bit rambly. If anyone could help that would be apreciated. Anyway, I hope you all have a good day.

Please post more code to help us help you debug. :slight_smile:

3 Likes
*label t_desc
*set unit_desc +1
*set t_desc true
flavor text flavor text flavor text
*if (unit_desc) =4

	${t_name} starts to speak,
	*goto leaving
*elseif (l_desc) =false
	${l_name}, if you would kindly continue this? I would apretiate it."

	"Thank you, ${t_name}." ${l_name} says before beginning to speak.
	*goto l_desc
*if (l_desc) =true
	${n_name}, if you would continue this? In a manner that is  conducive to the behavior  of an agent of this orgonization, I would apretiate such."

	"So I should be boring, basically?"

	"As you say."
	${n_name} sighs, mutters something, then starts speaking.
	*goto n_desc
*label l_desc
*set unit_desc +1
*set l_desc true
flavor text flavor text flavor text
*if (unit_desc) =4

	"Is that everyone?"

	"Yes." ${t_name} says.
	${l_name} starts to speak once more,
	*goto leaving
*elseif (n_desc) =false

	"${n_name}, if you would go next?"

	"Would be happy to." ${n_name} says, smirk evident in ${n_their} voice now. "Also, was going to anyway, but thanks for confirming it you know?"

	"I would apretiate it if you did not make.-" ${l_name} trails off.

	"But that's where all the fun is? Anyway, don't you think if ${mc_they} had a problem, ${mc_they} would have spoken up by now?"

	"Please, ${n_name}. Not here, and not now."

	"Fine, if you insist, I'll be boring."

	"Thank you."
	${n_name} sighs, before starting to speak.
	*page_break
	*goto n_desc
*elseif (n_desc) =true

	"Can I go now?" ${d_name} asks.

	"Yes."

	"Good! Also, thanks! Also, I'l keep it, well, what were you going to say?"

	"I wasn't going to say anything, ${d_name}."

	"OK, starting now then!" With that, ${d_name} starts chattering.
	*page_break
	*goto d_desc
*label n_desc
*set unit_desc +1
*set n_desc true
flavor text flavor text flavor text
*if (d_desc) =true
	If you could do your thing now, ${t_name}?"

	"By doing my thing, you wish me to provide my description, yes?"

	"Yeah."

	"As you wish, then." With that, ${t_name} starts to speak.
	*page_break
	*goto t_desc
*elseif (d_desc) =false
	-"

	"My turn!" ${d_name} says, cutting ${n_name} off.

	"I was going to ask you to go." ${n_name} deadpans, "but since your so eager, you can just go I guess."

	"OK, starting now! Also, sorry for cutting you off?"

	"It's good." Is all ${n_name} says. With that, ${d_name} starts speaking.
	*page_break
	*goto d_desc
*elseif (unit_desc) =4
	No, I was the last one." ${n_name} says.

	"That is correct." ${t_name} says.

	"You are right, ${n_name}." ${l_name} says.

	"Last is the best." ${d_name} says.
	${n_name} starts to say something before
	*goto leaving
*label d_desc
*set d_desc true
*set unit_desc +1
flavor text flavor text flavor text
*if (t_desc) =false

	"Hay, ${t_name}? Would you do yours now?"

	"Yes."

	"Do you want me to stay quiet when your talking?"

	"That would be appreciated, yes. However, if you believe that you have something to contribute, I do not object to you doing so."

	"OK, I'l let you talk now."
	With that, ${t_name} starts to speak.
	*goto t_desc
*elseif (unit_desc) =4

	"${l_name}, do you want to go now?"

	"Are you finished with your description?"

	"Yeah, can't think of anything else to say, so I'm done."

	"In that case, I would, yes."

	"OK, now ${mc_they} can be told how adorible and huggible you are!"

	"You know that isn't my aim for doing this, ${d_name}."

	"I know that, but you are!"

	"I am going to start now."

	"OK, I'l let you talk in peace."

	"Thank you." With that, ${l_name} starts speaking.
	*goto l_desc
*elseif ((t_desc =true) and (l_desc =true) and (n_desc =true))
	${d_name} starts to say something, but
	*goto leaving
*label leaving

```I hope that clears some stuff up. Also, there is a *create unit_desc 0 on the startup, if that changes anything.

I’m trying to simplify this code so I can see the flow. Is this right?

*create unit_desc 0
*create t_desc false
*create l_desc false
*create d_desc false
*create n_desc false

*label t_desc
*set unit_desc +1
*set t_desc true
t_desc start,
*if (unit_desc = 4)
  everyone introduced, leaving [n/]
  *goto leaving
*elseif (l_desc = false)
  L has not been introduced, go to L [n/]
  *goto l_desc
*if (l_desc =true)
  L has been introduced, go to N [n/]
  *goto n_desc
*label l_desc
*set unit_desc +1
*set l_desc true
l_desc start,
*if (unit_desc = 4)
  every introduced, leaving [n/]
  *goto leaving
*elseif (n_desc = false)
  N has not been introduced go to N [n/]
  *goto n_desc
*elseif (n_desc =true)
  N has been introduced, go to D [n/]
  *goto d_desc
*label n_desc
*set unit_desc +1
*set n_desc true
n_desc start,
*if (d_desc =true)
  D has been introduced, go to T [n/]
  *goto t_desc
*elseif (d_desc =false)
  D has not been introduced, go to D [n/]
  *goto d_desc
*elseif (unit_desc = 4)
  everyone introduced, leaving [n/]
  *goto leaving
*label d_desc
*set d_desc true
*set unit_desc +1
d_desc start,
*if (t_desc = false)
  T has not been introduced, go to T [n/]
  *goto t_desc
*elseif (unit_desc =4)
  everyone introduced, go to L [n/]
  *goto l_desc
*elseif ((t_desc =true) and (l_desc =true)) and (n_desc =true)
  T introduced, L introduced, N introduced, leaving [n/]
  *goto leaving
*label leaving

Do you anticipate that the order of the introductions might vary between players? Or is this supposed to be the exact flow of team introductions?

It will vary between players. It’s dependent on a choice made earlier involving a phone call, which ever team members phone the MC uses, they will be the first one described.

Was there a *set unit_desc +1 at that point of the phone call?

What if you do *if (unit_desc = 4) as the first conditional check for each of the description segments? Otherwise you could get into an infinite loop situation (when I set d_desc to be true at the beginning of this segment).

Or it might be easier to decide an order of the other three introductions after one of them is introduced over the phone. Then, you just check if it’s d first, then introduce l, n, t. If it’s l first, then introduce d, n, t. If it’s n first, then introduce d, l, t, etc. (the order is up to you, but in this case there should just be 4 possible sequences of introduction, any more complicated and I’ll need to see more of the narrative for context; or maybe I’m not understanding something :sweat_smile: )

The unit_desc is set up as a temp near the beginning, but yeah, I’m running into an infinite loop. Thank’s for the advice, yeah, I will put the unit_desc variable at the beginning to see if that helps.