I hit a snag while doing *if statements

So after studying all the scripting guides I decided to revamp my code just to make things easier and more organized. However during the process I hit a tiny snag. I’m using quite a bit *if *else statements and at this point I know how they work. For some odd reason when I try to use a > or < paired with a number it won’t work? I have two variables Intimidation and Persuasion and I’m trying to do a different thing for each.I’m wondering if perhaps the inability in this situation to use the *else would cause issues? So I did both, one in a slightly unorthodox way, and neither worked. I’ve read through the wonderful guide by R.E Towers, and I just don’t see what I’m doing wrong. Here is both of the coding…

You turn to look back at the three men
*if (Persuasion>7)
*goto pers
*else
*goto intim

*label pers
and you force a charming smile on your face.

*label intim
and
*if (Intimidation>7)
*goto intimzwei

*label intimzwei
you take a step, jaw dropping into an angry line.

And then the second

You turn to look back at the three men
*if (Persuasion>7)
*goto pers

*if (Intimidation>7)
*goto intim

*label pers
and you force a charming smile on your face.

*label intim
and you take a step, jaw dropping into an angry line.

(the indents dont show up but they are indeed there btw.]
Neither seems to work at this point, both showing up despite specifying to show up only if Intim and Pers is greater than 7 in both of their respective places/times. I’m probably just missing something, I’m known to do that, so I will change it to an opposing pair and see if I can crudely slide by until I actually need those variables.

Ok… first thing first, you can block your texts and hit the </> button to apply the unformatted text
This will help a lot, especially so we can identify your indentation.

And about your problem, I assume you’re encountering an “ignored *if command”, right?
You might want to look at this thread for that one.

1 Like

And about your code

You turn to look back at the three men 
*if (Persuasion>7)
   *goto pers
*else 
   *goto intim

*label pers
and you force a charming smile on your face.

*label intim
and
*if (Intimidation>7)
   *goto intimzwei

*label intimzwei
you take a step, jaw dropping into an angry line.

In both case, I’ll assume that I have either high [Intimidation] or [Persuasion], right?
Now, for the first code, let’s say I have high Intimidation. Thus, I don’t pass Persuasion.

This should result in
You turn to look back at the three men and you take a step, jaw dropping into an angry line

However, if I have high Persuasion and don’t pass Intimidation, the code should result in
You turn to look back at the three men and you force a charming smile on your face. and you take a step, jaw dropping into an angry line


[details=Compare to the second code]```
You turn to look back at the three men
*if (Persuasion>7)
*goto pers

*if (Intimidation>7)
*goto intim

*label pers
and you force a charming smile on your face.

*label intim
and you take a step, jaw dropping into an angry line.

[/details]
Having a high Persuasion will result me the both `*label` [pers] and [intimzwei]
While having the vice versa will get me directly to the `*label intimzwei` only.

How can this happen? Check my above link :point_up_2: :point_up:
1 Like

Thanks a ton. Once I get some coffee in my I’ll start this endeavor. In the end, changing it to an opposing pair should also make this easier correct?

1 Like

Well, if the PC can’t be both Persuasive and Intimidating enough, I think there’s no hurt in doing that

So i got it working, but for some alien reason my percents keep getting effed up. Normally when I have a percent I do this

*set Persuasion%+5

for some unknown reason no matter which I choose the intimidation goes up to 92% and persuasion down to 8%. None of my other percents thus far have done that and they are all formatted the same. Why would that be?

Well, what I can think of:

  1. This [Persuasion] variable, is actually [Intimidation] opposed to “fake” [Persuasion] variable.
  2. The *set commands might be similar and no difference of it at all of your choice options.

You might want to take a look back to the variable and your choices.
And is it okay declaring *set Persuasion%+5 without a space?

Huh when I fixed the percent it went back to displaying both and I am now using *elseif this is strange. Ill take another look at the thread.

You might yet to update the game files :stuck_out_tongue_winking_eye:

Reading the thread a second time helped. All good! Thanks for your help.

1 Like