The game appears to be jumping variables

So, like I said in the title, when I run the game, it seems to be jumping variables, and I can’t figure out why. Here are the created variables, then below that are the *if’s for said variables:

*set mc_tick_hair true
*comment this is when you pick that your tick is to run your hands through your hair.
*set mc_tick_hands false
*comment this is when you decide for your tick to be ringing your hands.
*set mc_tick_pulse false
*comment this is when you decide to have your tick be tapping your collar bone with your fingertips.
*set mc_tick_rock false
*comment this is when you decide to have your tick to be to shift your weight.

Here are the *if variables:

*if (mc_tick_hair) =true
	running my hands through my hair, before opening my mouth:
	*goto nb3
*elseif (mc_tick_hands)
	ringing my hands together, before opening my mouth:
	*goto nb3
*elseif ( mc_tick_pulse)
	tapping my fingers against my collar bone before opening my mouth:
	*goto nb2
*elseif (mc_tick_rock)
	shifting my weight, before opening my mouth:
	*goto nb3

Tried putting in the true to see if it changed anything, but it didn’t.
Anyway, I hope that someone can point out what’s wrong to me. Probably a misplaced indent or something like that, but it’s the simplisd stuff that gets you, right?
Anyway, I hope all who read this have a good rest of your week.

What do you mean by jumping variables? What is happening that shouldn’t? (What do you expect to happen that isn’t doing so?)

2 Likes

It seems to be working for me. The only observation I can make is that you can replace the last *elseif with an *else and that you could reduce all the 4 variables in one numeric and use multireplace instead of *if

1 Like

If you’re creating one variable with a value of true, then that variable will still be true if the player selects another tic later.

That could lead to the first “if” here being true, even though the player has selected something else. Does creating them all with a value of false solve the problem?

I agree with @Loudbeat about multireplace being better here, though.

It , at least for me, is jumping the *if variables that I put in the first post.
As in, it will be working fine, then just act as if the *if text does not exist, and I am unsure as to why this is.

Are those two blocks of code in the same scene, in that order?
Did you look for those variables being changed somewhere else?
Did you check if you accidentally created them in startup.txt (*create) and at the same time in this other scene (through *temp)?

1 Like

Yes, they are in that order, and no, I didn’t re-create them in temp in that scene.
This is the first time that I’ve used these variables. I have the created ones, then I have them *set, down below a label I have for testing out variables and such, and the create tick hair variable is false while the set tick hair variable is currently true. Just checked that all three are spelled the same, which they are, so it shouldn’t be that.

Also, just tried running the blocks again, first by setting the _hair variable as true for the *create, then re-writing said variable, because sometimes that fixes things? Neither seems to be working. Also tried setting the _hands variable to true, and that did not show up either.
I’ll show you what I’m trying to get, and what it’s not doing, because I seem to be better at showing things then putting them into words:

*label nb2


I, with an effort, stop
*if (mc_tick_hair)
	running my hands through my hair, before opening my mouth:
	*goto nb3
*elseif (mc_tick_hands)
	ringing my hands together, before opening my mouth:
	*goto nb3
*elseif ( mc_tick_pulse)
	tapping my fingers against my collar bone before opening my mouth:
	*goto nb2
*elseif (mc_tick_rock)
	shifting my weight, before opening my mouth:
	*goto nb3
*label nb3
"Because it's not a big deal?" I say: "also, well." I slump.


When I run it, it’s doing this:

I, with an effort, stop "Because it's not a big deal?" I say: "also, well." I slump. 

I want it to trigger the variables in the first block of text, which it does not seem to be doing. Also,

*set mc_tick_hands

was set to true during that test run. I just can’t figure out why it’s seemingly ignoring the variables.

Not the answer, but, it seems if mc_tick_pulse is true, it doesn’t go to same label the others do (and, if the names in the code you posted are correct, instead loops back to the check, which then creates an infinite loop).

Also, just to be clear, you’re using *set mc_tick_hands true and not *set mc_tick_hands, yes?

You could print the variables before the check occurs, just to see if the values are what you expect.

1 Like

Why not use multireplace?

*create mc_tick 0
*comment 0 = hair
*comment 1 = hands
*comment 2 = pulse
*comment 3 = rock

*label nb2

I, with an effort, stop @{mc_tick running my hands through my hair, before opening my mouth:|ringing my hands together, before opening my mouth:|tapping my fingers against my collar bone before opening my mouth:|shifting my weight, before opening my mouth:} 
*goto nb3

*label nb3
"Because it's not a big deal?" I say: "also, well." I slump.

1 Like

I don’t use it because I couldn’t figure out it out before, but I’ll give it a look now.
Also, I’ll check to see that all gotos go to the right labels, so thanks for that.